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)