From 8b1297a0b683c03f320b502652113633032411a7 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Tue, 21 Feb 2006 15:01:25 +0000 Subject: Patch #1435744 from Andrew Scott - initial iPod Mini support git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8764 a1c6a512-1295-4272-9138-f99709370657 --- firmware/backlight.c | 6 ++++++ firmware/drivers/lcd-ipod.c | 5 +++++ firmware/export/config.h | 3 +++ firmware/usb.c | 3 ++- 4 files changed, 16 insertions(+), 1 deletion(-) (limited to 'firmware') diff --git a/firmware/backlight.c b/firmware/backlight.c index daf987791d..0049f78607 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c @@ -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 } diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c index d1d63b9911..4df47f9f20 100644 --- a/firmware/drivers/lcd-ipod.c +++ b/firmware/drivers/lcd-ipod.c @@ -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 diff --git a/firmware/export/config.h b/firmware/export/config.h index b1cca7b288..0e673cb988 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -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 diff --git a/firmware/usb.c b/firmware/usb.c index 5157eeec63..f98bfa39b1 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -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; -- cgit v1.2.3