Patch #1435744 from Andrew Scott - initial iPod Mini support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8764 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c7fd0fee7a
commit
8b1297a0b6
|
@ -3,6 +3,8 @@
|
|||
/* Rockbox logo */
|
||||
#if (LCD_DEPTH == 1)
|
||||
rockboxlogo.112x37x1.bmp
|
||||
#elif (LCD_WIDTH == 138) && (LCD_DEPTH == 2)
|
||||
rockboxlogo.112x37x1.bmp
|
||||
#elif (LCD_WIDTH == 160) && (LCD_DEPTH == 2)
|
||||
rockboxlogo.160x53x2.bmp
|
||||
#elif (LCD_WIDTH == 160) && (LCD_DEPTH == 16)
|
||||
|
|
|
@ -33,10 +33,14 @@ mandelbrot.c
|
|||
#endif
|
||||
|
||||
solitaire.c
|
||||
#if (LCD_WIDTH != 138)
|
||||
/* These need adjusting for the Mini's screen */
|
||||
bejeweled.c
|
||||
#endif
|
||||
bounce.c
|
||||
/* H300, H100 and iPod Nano/Color/Video only */
|
||||
#if ((LCD_WIDTH >= 176) && (LCD_HEIGHT >= 132) && (LCD_DEPTH == 16)) || ((LCD_WIDTH == 160) && (LCD_HEIGHT == 128) && (LCD_DEPTH==2))
|
||||
#if ((LCD_WIDTH >= 176) && (LCD_HEIGHT >= 132) && (LCD_DEPTH == 16)) || \
|
||||
((LCD_WIDTH == 160) && (LCD_HEIGHT == 128) && (LCD_DEPTH==2))
|
||||
brickmania.c
|
||||
#endif
|
||||
calculator.c
|
||||
|
@ -59,8 +63,8 @@ snake2.c
|
|||
sokoban.c
|
||||
star.c
|
||||
starfield.c
|
||||
#if (LCD_WIDTH != 176)
|
||||
/* These need adjusting for the Nano's screen */
|
||||
#if (LCD_WIDTH != 176) && (LCD_WIDTH != 138)
|
||||
/* These need adjusting for the iPod Nano and Mini */
|
||||
sudoku.c
|
||||
#endif
|
||||
#if CONFIG_LCD == LCD_SSD1815
|
||||
|
|
|
@ -325,6 +325,10 @@ void* main(void)
|
|||
/* set port B03 on */
|
||||
outl(((0x100 | 1) << 3), 0x6000d824);
|
||||
|
||||
#elif CONFIG_BACKLIGHT==BL_IPODMINI
|
||||
/* set port B03 on */
|
||||
outl(((0x100 | 1) << 3), 0x6000d824);
|
||||
|
||||
#elif CONFIG_BACKLIGHT==BL_IPODNANO
|
||||
|
||||
/* set port B03 on */
|
||||
|
|
|
@ -170,3 +170,4 @@ Nikolaj Christensen
|
|||
Mikael Magnusson
|
||||
Dominik Wenger
|
||||
Henrico Witvliet
|
||||
Andrew Scott
|
||||
|
|
|
@ -236,6 +236,9 @@ static void __backlight_on(void)
|
|||
|
||||
/* set port b bit 3 on */
|
||||
outl(((0x100 | 1) << 3), 0x6000d824);
|
||||
#elif CONFIG_BACKLIGHT==BL_IPODMINI
|
||||
/* set port B03 on */
|
||||
outl(((0x100 | 1) << 3), 0x6000d824);
|
||||
#elif CONFIG_BACKLIGHT==BL_IPODNANO
|
||||
/* set port B03 on */
|
||||
outl(((0x100 | 1) << 3), 0x6000d824);
|
||||
|
@ -287,6 +290,9 @@ static void __backlight_off(void)
|
|||
GPIO3_CLR = 1;
|
||||
#elif CONFIG_BACKLIGHT==BL_IPOD3G
|
||||
lcd_enable(false);
|
||||
#elif CONFIG_BACKLIGHT==BL_IPODMINI
|
||||
/* set port B03 off */
|
||||
outl(((0x100 | 0) << 3), 0x6000d824);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -105,8 +105,13 @@ static void lcd_cmd_and_data(int cmd, int data_lo, int data_hi)
|
|||
* LCD init
|
||||
**/
|
||||
void lcd_init_device(void){
|
||||
#ifdef APPLE_IPODMINI
|
||||
lcd_cmd_and_data(0x1, 0x0, 0xd);
|
||||
#else
|
||||
/* driver output control - 160x128 */
|
||||
lcd_cmd_and_data(0x1, 0x1, 0xf);
|
||||
#endif
|
||||
|
||||
lcd_cmd_and_data(0x5, 0x0, 0x10);
|
||||
|
||||
#ifdef APPLE_IPOD4G
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#define BL_IPOD3G 7 /* Apple iPod 3g with dock */
|
||||
#define BL_IRIVER_H300 8 /* IRiver PWM */
|
||||
#define BL_IRIVER_IFP7XX 9 /* IRiver GPIO */
|
||||
#define BL_IPODMINI 10 /* Apple iPod Mini */
|
||||
|
||||
/* CONFIG_I2C */
|
||||
#define I2C_PLAYREC 0 /* Archos Player/Recorder style */
|
||||
|
@ -159,6 +160,8 @@
|
|||
#include "config-ipod4g.h"
|
||||
#elif defined(IRIVER_IFP7XX)
|
||||
#include "config-ifp7xx.h"
|
||||
#elif defined(IPOD_MINI)
|
||||
#include "config-ipodmini.h"
|
||||
#else
|
||||
/* no known platform */
|
||||
#endif
|
||||
|
|
|
@ -172,7 +172,8 @@ void usb_enable(bool on)
|
|||
if (on)
|
||||
{
|
||||
/* The following code is copied from ipodlinux */
|
||||
#if defined (APPLE_IPODCOLOR) || defined(APPLE_IPOD3G) || defined(APPLE_IPOD4G)
|
||||
#if defined(APPLE_IPODCOLOR) || defined(APPLE_IPOD3G) || \
|
||||
defined(APPLE_IPOD4G) || defined(APPLE_IPODMINI)
|
||||
unsigned char* storage_ptr = (unsigned char *)0x40017F00;
|
||||
#elif defined(APPLE_IPODNANO) || defined(APPLE_IPODVIDEO)
|
||||
unsigned char* storage_ptr = (unsigned char *)0x4001FF00;
|
||||
|
|
|
@ -455,7 +455,8 @@ toolsdir='\$(ROOTDIR)/tools'
|
|||
echo "15 - iPod Video"
|
||||
echo "16 - iPod 3G"
|
||||
echo "17 - iPod 4G (Grayscale)"
|
||||
echo "18 - iriver iFP-790"
|
||||
echo "18 - iPod Mini (1G/2G)"
|
||||
echo "19 - iriver iFP-790"
|
||||
|
||||
target_id=`input`;
|
||||
|
||||
|
@ -799,6 +800,25 @@ toolsdir='\$(ROOTDIR)/tools'
|
|||
;;
|
||||
|
||||
18)
|
||||
archos="ipodmini"
|
||||
target="-DIPOD_MINI"
|
||||
memory=32 # always
|
||||
arm7tdmicc
|
||||
tool="$rootdir/tools/scramble -add=mini"
|
||||
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
||||
bmp2rb_native="$rootdir/tools/bmp2rb -f 6"
|
||||
output="rockbox.ipod"
|
||||
appextra="recorder:gui"
|
||||
archosrom=""
|
||||
flash=""
|
||||
plugins="yes"
|
||||
codecs="libmad liba52 libffmpegFLAC libTremor libwavpack dumb libmusepack libalac libfaad libm4a"
|
||||
# toolset is the tools within the tools directory that we build for
|
||||
# this particular target.
|
||||
toolset=$ipodbitmaptools
|
||||
;;
|
||||
|
||||
19)
|
||||
archos="ifp7xx"
|
||||
target="-DIRIVER_IFP7XX"
|
||||
memory=1
|
||||
|
@ -872,7 +892,7 @@ fi
|
|||
case $option in
|
||||
[Bb])
|
||||
case $archos in
|
||||
h100|h120|h300|x5|ipodcolor|ipodnano|ipodvideo|ipod3g|ipod4g)
|
||||
h100|h120|h300|x5|ipodcolor|ipodnano|ipodvideo|ipod3g|ipod4g|ipodmini)
|
||||
extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES
|
||||
appsdir='\$(ROOTDIR)/bootloader'
|
||||
apps="bootloader"
|
||||
|
|
|
@ -72,7 +72,7 @@ void usage(void)
|
|||
"\t-iaudio iAudio format\n"
|
||||
"\t-add=X Rockbox generic \"add-up\" checksum format\n"
|
||||
"\t (X values: h100, h120, h140, h300, ipco, nano, ipvd\n"
|
||||
"\t ip3g, ip4g)\n"
|
||||
"\t ip3g, ip4g, mini)\n"
|
||||
"\nNo option results in Archos standard player/recorder format.\n");
|
||||
|
||||
exit(1);
|
||||
|
@ -178,6 +178,8 @@ int main (int argc, char** argv)
|
|||
modelnum = 7;
|
||||
else if(!strcmp(&argv[1][5], "ip4g"))
|
||||
modelnum = 8;
|
||||
else if(!strcmp(&argv[1][5], "mini"))
|
||||
modelnum = 9;
|
||||
else {
|
||||
fprintf(stderr, "unsupported model: %s\n", &argv[1][5]);
|
||||
return 2;
|
||||
|
|
Loading…
Reference in New Issue