summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-02-21 15:01:25 +0000
committerDave Chapman <dave@dchapman.com>2006-02-21 15:01:25 +0000
commit8b1297a0b683c03f320b502652113633032411a7 (patch)
treed6d4104d8b7519c2edb56fa6b83e61a41615b4fd /firmware
parentc7fd0fee7ad2581889e84748ab64e10003d9d526 (diff)
downloadrockbox-8b1297a0b683c03f320b502652113633032411a7.tar.gz
rockbox-8b1297a0b683c03f320b502652113633032411a7.tar.bz2
rockbox-8b1297a0b683c03f320b502652113633032411a7.zip
Patch #1435744 from Andrew Scott - initial iPod Mini support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8764 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/backlight.c6
-rw-r--r--firmware/drivers/lcd-ipod.c5
-rw-r--r--firmware/export/config.h3
-rw-r--r--firmware/usb.c3
4 files changed, 16 insertions, 1 deletions
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;