1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Jens Arnold 2006-04-08 09:08:38 +00:00
parent 37e386f3d8
commit 4ac150e8d3
14 changed files with 13 additions and 27 deletions

View file

@ -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;

View file

@ -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

View file

@ -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);

View file

@ -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;

View file

@ -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

View file

@ -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
}

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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);