summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-04-08 09:08:38 +0000
committerJens Arnold <amiconn@rockbox.org>2006-04-08 09:08:38 +0000
commit4ac150e8d3549eb9c06fba71aca88337b59bf7eb (patch)
tree047d2991af1660aaf90b3f830dfbfb7e82db1a57
parent37e386f3d81ebe7ad4f32e919d529391f8f4ced0 (diff)
downloadrockbox-4ac150e8d3549eb9c06fba71aca88337b59bf7eb.tar.gz
rockbox-4ac150e8d3549eb9c06fba71aca88337b59bf7eb.zip
Get rid of the redundant APPLE_* macros. * Fix wrong comments in lcd-ipod.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9561 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c2
-rw-r--r--apps/plugins/pacbox/pacbox.h2
-rw-r--r--firmware/drivers/ata.c4
-rw-r--r--firmware/drivers/i2c-pp5020.c2
-rw-r--r--firmware/drivers/lcd-ipod.c6
-rw-r--r--firmware/drivers/power.c4
-rw-r--r--firmware/export/config-ipod3g.h2
-rw-r--r--firmware/export/config-ipod4g.h2
-rw-r--r--firmware/export/config-ipodcolor.h2
-rw-r--r--firmware/export/config-ipodmini.h2
-rwxr-xr-xfirmware/export/config-ipodmini2g.h2
-rw-r--r--firmware/export/config-ipodnano.h2
-rw-r--r--firmware/export/config-ipodvideo.h2
-rw-r--r--firmware/usb.c6
14 files changed, 13 insertions, 27 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 008e0a2518..9ad1c5f94c 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1353,7 +1353,7 @@ bool view_battery(void)
lcd_puts(0, 6, buf);
lcd_puts(0, 7, power_message);
#else /* !HAVE_CHARGE_CTRL */
-#if defined APPLE_IPODNANO || defined APPLE_IPODVIDEO
+#if defined IPOD_NANO || defined IPOD_VIDEO
int usb_pwr = (GPIOL_INPUT_VAL & 0x10)?true:false;
int ext_pwr = (GPIOL_INPUT_VAL & 0x08)?false:true;
int dock = (GPIOA_INPUT_VAL & 0x10)?true:false;
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h
index c852608680..8712448b5b 100644
--- a/apps/plugins/pacbox/pacbox.h
+++ b/apps/plugins/pacbox/pacbox.h
@@ -106,7 +106,7 @@
/* How many video frames (out of a possible 60) we display each second.
NOTE: pacbox.c assumes this is an integer divisor of 60
*/
-#ifdef APPLE_IPOD_NANO
+#ifdef IPOD_NANO
/* The Nano can manage full-speed at 30fps (1 in 2 frames) */
#define FPS 30
#else
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 87f41b4ff1..d4a3856a76 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -1452,7 +1452,7 @@ void ata_poweroff(bool enable)
bool ata_disk_is_active(void)
{
-#ifdef APPLE_IPODNANO
+#ifdef IPOD_NANO
return false;
#else
return !sleeping;
@@ -1465,7 +1465,7 @@ static int ata_perform_sleep(void)
/* ATA sleep is currently broken on Nano, and will hang all subsequent
accesses, so disable until we find a cure. */
-#ifndef APPLE_IPODNANO
+#ifndef IPOD_NANO
mutex_lock(&ata_mtx);
SET_REG(ATA_SELECT, ata_device);
diff --git a/firmware/drivers/i2c-pp5020.c b/firmware/drivers/i2c-pp5020.c
index 8b48375e3d..e81783dba0 100644
--- a/firmware/drivers/i2c-pp5020.c
+++ b/firmware/drivers/i2c-pp5020.c
@@ -195,7 +195,7 @@ void i2c_init(void)
{
/* From ipodlinux */
-#if defined(APPLE_IPODMINI)
+#ifdef IPOD_MINI
/* GPIO port C disable port 0x10 */
GPIOC_ENABLE &= ~0x10;
diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c
index 74bda3bfb9..67f9e7c23f 100644
--- a/firmware/drivers/lcd-ipod.c
+++ b/firmware/drivers/lcd-ipod.c
@@ -134,7 +134,7 @@ void lcd_init_device(void)
lcd_set_flip(false);
lcd_cmd_and_data(R_ENTRY_MODE, 0x0000);
-#ifdef APPLE_IPOD4G
+#ifdef IPOD_4G
outl(inl(0x6000d004) | 0x4, 0x6000d004); /* B02 enable */
outl(inl(0x6000d004) | 0x8, 0x6000d004); /* B03 enable */
outl(inl(0x70000084) | 0x2000000, 0x70000084); /* D01 enable */
@@ -184,12 +184,12 @@ void lcd_set_flip(bool yesno)
if (yesno) {
/* 168x128, inverse SEG & COM order */
lcd_cmd_and_data(R_DRV_OUTPUT_CONTROL, 0x030f);
- lcd_cmd_and_data(R_1ST_SCR_DRV_POS, 0x8304); /* 0..127 */
+ lcd_cmd_and_data(R_1ST_SCR_DRV_POS, 0x8304); /* 4..131 */
addr_offset = (4 << 5) | (20 - 1);
} else {
/* 168x128 */
lcd_cmd_and_data(R_DRV_OUTPUT_CONTROL, 0x000f);
- lcd_cmd_and_data(R_1ST_SCR_DRV_POS, 0x7f00); /* 4..131 */
+ lcd_cmd_and_data(R_1ST_SCR_DRV_POS, 0x7f00); /* 0..127 */
addr_offset = 20;
}
#endif
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index cf90e0fc8c..9cc751e41e 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -123,7 +123,7 @@ bool charger_inserted(void)
return (adc_read(ADC_CHARGE_REGULATOR) < 0x1FF);
#elif defined(TOSHIBA_GIGABEAT_F)
return false;
-#elif defined(APPLE_IPODVIDEO)
+#elif defined(IPOD_VIDEO)
return (GPIOL_INPUT_VAL & 0x08)?false:true;
#elif defined(IPOD_ARCH)
/* This needs filling in for other ipods. */
@@ -158,7 +158,7 @@ bool charging_state(void) {
return charger_inserted();
#elif defined(IRIVER_H300_SERIES)
return (GPIO_READ & 0x00800000)?true:false;
-#elif defined(APPLE_IPODVIDEO)
+#elif defined(IPOD_VIDEO)
return (GPIOB_INPUT_VAL & 0x01)?false:true;
#endif
}
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h
index 8cca000961..ad555d875a 100644
--- a/firmware/export/config-ipod3g.h
+++ b/firmware/export/config-ipod3g.h
@@ -1,8 +1,6 @@
/*
* This config file is for the Apple iPod 3g
*/
-#define APPLE_IPOD3G 1
-
#define IPOD_ARCH 1
/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h
index d4d4f28629..370d46a08c 100644
--- a/firmware/export/config-ipod4g.h
+++ b/firmware/export/config-ipod4g.h
@@ -1,8 +1,6 @@
/*
* This config file is for the Apple iPod Color/Photo
*/
-#define APPLE_IPOD4G 1
-
#define IPOD_ARCH 1
/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h
index a48bde5f4b..ff5a0c5d37 100644
--- a/firmware/export/config-ipodcolor.h
+++ b/firmware/export/config-ipodcolor.h
@@ -1,8 +1,6 @@
/*
* This config file is for the Apple iPod Color/Photo
*/
-#define APPLE_IPODCOLOR 1
-
#define IPOD_ARCH 1
/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h
index 1cb18a7a89..ced21425f0 100644
--- a/firmware/export/config-ipodmini.h
+++ b/firmware/export/config-ipodmini.h
@@ -1,8 +1,6 @@
/*
* This config file is for the Apple iPod Mini (1st Gen)
*/
-#define APPLE_IPODMINI 1
-
#define IPOD_ARCH 1
/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h
index 5afc672fd6..ac69bc38ba 100755
--- a/firmware/export/config-ipodmini2g.h
+++ b/firmware/export/config-ipodmini2g.h
@@ -1,8 +1,6 @@
/*
* This config file is for the Apple iPod Mini 2nd Gen
*/
-#define APPLE_IPODMINI 1
-
#define IPOD_ARCH 1
/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h
index 7264beaa88..a801cc23b9 100644
--- a/firmware/export/config-ipodnano.h
+++ b/firmware/export/config-ipodnano.h
@@ -1,8 +1,6 @@
/*
* This config file is for the Apple iPod Nano
*/
-#define APPLE_IPODNANO 1
-
#define IPOD_ARCH 1
/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h
index 9536cc8b8f..071a8a3273 100644
--- a/firmware/export/config-ipodvideo.h
+++ b/firmware/export/config-ipodvideo.h
@@ -1,8 +1,6 @@
/*
* This config file is for the Apple iPod Video
*/
-#define APPLE_IPODVIDEO 1
-
#define IPOD_ARCH 1
/* For Rolo and boot loader */
diff --git a/firmware/usb.c b/firmware/usb.c
index 18f2a2aa07..a8a3e6b3eb 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -176,10 +176,10 @@ void usb_enable(bool on)
if (on)
{
/* The following code is copied from ipodlinux */
-#if defined(APPLE_IPODCOLOR) || defined(APPLE_IPOD3G) || \
- defined(APPLE_IPOD4G) || defined(IPOD_MINI)
+#if defined(IPOD_COLOR) || defined(IPOD_3G) || \
+ defined(IPOD_4G) || defined(IPOD_MINI)
unsigned char* storage_ptr = (unsigned char *)0x40017F00;
-#elif defined(APPLE_IPODNANO) || defined(APPLE_IPODVIDEO) || defined(IPOD_MINI2G)
+#elif defined(IPOD_NANO) || defined(IPOD_VIDEO) || defined(IPOD_MINI2G)
unsigned char* storage_ptr = (unsigned char *)0x4001FF00;
#endif
memcpy(storage_ptr, "diskmode\0\0hotstuff\0\0\1", 21);