Enable ATA poweroff option on H10 for a nice increase in battery life.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11107 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Barry Wardell 2006-10-02 16:19:36 +00:00
parent ba0d55510f
commit c6ebfcce2c
3 changed files with 12 additions and 4 deletions

View file

@ -116,6 +116,9 @@
* We can currently put the lcd to sleep but it won't wake up properly */
#define HAVE_LCD_SLEEP
/* We're able to shut off power to the HDD */
#define HAVE_ATA_POWER_OFF
/* Offset ( in the firmware file's header ) to the file length */
#define FIRMWARE_OFFSET_FILE_LENGTH 0

View file

@ -97,6 +97,9 @@
/* Type of LCD */
#define CONFIG_LCD LCD_H10_5GB
/* We're able to shut off power to the HDD */
#define HAVE_ATA_POWER_OFF
/* Offset ( in the firmware file's header ) to the file length */
#define FIRMWARE_OFFSET_FILE_LENGTH 0

View file

@ -76,15 +76,17 @@ bool charger_inserted(void)
void ide_power_enable(bool on)
{
(void)on;
/* We do nothing on the iPod */
if(on){
GPIOF_OUTPUT_VAL &=~ 0x1;
} else {
GPIOF_OUTPUT_VAL |= 0x1;
}
}
bool ide_powered(void)
{
/* pretend we are always powered - we don't turn it off on the ipod */
return true;
return ((GPIOF_INPUT_VAL & 0x1) == 0);
}
void power_off(void)