summaryrefslogtreecommitdiff
path: root/firmware/drivers
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 /firmware/drivers
parent37e386f3d81ebe7ad4f32e919d529391f8f4ced0 (diff)
downloadrockbox-4ac150e8d3549eb9c06fba71aca88337b59bf7eb.zip
rockbox-4ac150e8d3549eb9c06fba71aca88337b59bf7eb.tar.gz
rockbox-4ac150e8d3549eb9c06fba71aca88337b59bf7eb.tar.bz2
rockbox-4ac150e8d3549eb9c06fba71aca88337b59bf7eb.tar.xz
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
Diffstat (limited to 'firmware/drivers')
-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
4 files changed, 8 insertions, 8 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 87f41b4..d4a3856 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 8b48375..e81783d 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 74bda3b..67f9e7c 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 cf90e0f..9cc751e 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
}