diff options
author | Barry Wardell <rockbox@barrywardell.net> | 2006-10-02 16:19:36 +0000 |
---|---|---|
committer | Barry Wardell <rockbox@barrywardell.net> | 2006-10-02 16:19:36 +0000 |
commit | c6ebfcce2cd6fbf4fe5faf9b120b0bdd567ecafe (patch) | |
tree | c6c40203310230bf73d41e880d695e57522e9cdb /firmware | |
parent | ba0d55510f98282b60ac42b7ee97b25cf9ed3522 (diff) | |
download | rockbox-c6ebfcce2cd6fbf4fe5faf9b120b0bdd567ecafe.tar.gz rockbox-c6ebfcce2cd6fbf4fe5faf9b120b0bdd567ecafe.zip |
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
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/config-h10.h | 3 | ||||
-rw-r--r-- | firmware/export/config-h10_5gb.h | 3 | ||||
-rw-r--r-- | firmware/target/arm/iriver/h10/power-h10.c | 10 |
3 files changed, 12 insertions, 4 deletions
diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h index 86d7cddca1..d29bd6c22d 100644 --- a/firmware/export/config-h10.h +++ b/firmware/export/config-h10.h @@ -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 diff --git a/firmware/export/config-h10_5gb.h b/firmware/export/config-h10_5gb.h index aefc21cef3..e40fdeab86 100644 --- a/firmware/export/config-h10_5gb.h +++ b/firmware/export/config-h10_5gb.h @@ -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 diff --git a/firmware/target/arm/iriver/h10/power-h10.c b/firmware/target/arm/iriver/h10/power-h10.c index 143248efcd..9470c0a67d 100644 --- a/firmware/target/arm/iriver/h10/power-h10.c +++ b/firmware/target/arm/iriver/h10/power-h10.c @@ -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) |