diff --git a/firmware/config-recorder.h b/firmware/config-recorder.h index 9bcfc7bc60..566758156c 100644 --- a/firmware/config-recorder.h +++ b/firmware/config-recorder.h @@ -16,3 +16,5 @@ /* Define this if you have charging control */ #define HAVE_CHARGE_CTRL +/* Define this if you have ATA power-off control */ +#define HAVE_ATA_POWER_OFF diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 216bf180bf..173dab9be3 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -83,7 +83,7 @@ bool old_recorder = false; static bool sleeping = false; static int sleep_timeout = 5*HZ; static bool poweroff = false; -#ifdef ARCHOS_RECORDER +#ifdef HAVE_ATA_POWER_OFF static int poweroff_timeout = 2*HZ; #endif static char ata_stack[DEFAULT_STACK_SIZE]; @@ -411,6 +411,7 @@ void ata_spindown(int seconds) sleep_timeout = seconds * HZ; } +#ifdef HAVE_ATA_POWER_OFF void ata_poweroff(bool enable) { if (enable) @@ -418,6 +419,7 @@ void ata_poweroff(bool enable) else poweroff_timeout = 0; } +#endif bool ata_disk_is_active(void) {