1
0
Fork 0
forked from len0rd/rockbox

Code cleanup

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5454 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2004-11-21 09:22:50 +00:00
parent 61753a893e
commit 14c72f277c
2 changed files with 5 additions and 4 deletions

View file

@ -119,7 +119,7 @@ void ide_power_enable(bool on)
if(on) if(on)
{ {
#ifdef ATA_POWER_PLAYERSTYLE #ifdef ATA_POWER_PLAYERSTYLE
if (read_rom_version() > 451) /* new players only */ if (has_ata_power_control())
{ {
or_b(0x10, &PBDRL); or_b(0x10, &PBDRL);
touched = true; touched = true;
@ -134,7 +134,7 @@ void ide_power_enable(bool on)
if(!on) if(!on)
{ {
#ifdef ATA_POWER_PLAYERSTYLE #ifdef ATA_POWER_PLAYERSTYLE
if (read_rom_version() > 451) /* new players only */ if (has_ata_power_control())
{ {
and_b(~0x10, &PBDRL); and_b(~0x10, &PBDRL);
touched = true; touched = true;
@ -166,7 +166,7 @@ bool ide_powered(void)
{ {
#if defined(NEEDS_ATA_POWER_ON) || defined(HAVE_ATA_POWER_OFF) #if defined(NEEDS_ATA_POWER_ON) || defined(HAVE_ATA_POWER_OFF)
#ifdef ATA_POWER_PLAYERSTYLE #ifdef ATA_POWER_PLAYERSTYLE
if (read_rom_version() > 451) /* new players only */ if (has_ata_power_control())
{ {
if ((PBCR2 & 0x0300) || !(PBIOR & 0x0010)) /* not configured for output */ if ((PBCR2 & 0x0300) || !(PBIOR & 0x0010)) /* not configured for output */
return false; /* would be floating low, disk off */ return false; /* would be floating low, disk off */

View file

@ -33,8 +33,9 @@
int read_rom_version(void); int read_rom_version(void);
int read_hw_mask(void); int read_hw_mask(void);
#ifdef HAVE_LCD_CHARCELLS #ifdef ARCHOS_PLAYER
bool has_new_lcd(void); bool has_new_lcd(void);
bool has_ata_power_control(void) __attribute__ ((alias ("has_new_lcd")));
#endif #endif
#endif #endif