diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/config-h100.h | 3 | ||||
-rw-r--r-- | firmware/export/config-h300.h | 3 | ||||
-rw-r--r-- | firmware/powermgmt.c | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h index 2dea66beca..b97ad90548 100644 --- a/firmware/export/config-h100.h +++ b/firmware/export/config-h100.h | |||
@@ -39,6 +39,9 @@ | |||
39 | /* Define this if the platform can charge batteries */ | 39 | /* Define this if the platform can charge batteries */ |
40 | #define HAVE_CHARGING 1 | 40 | #define HAVE_CHARGING 1 |
41 | 41 | ||
42 | /* define this if the hardware can be powered off while charging */ | ||
43 | #define HAVE_POWEROFF_WHILE_CHARGING | ||
44 | |||
42 | /* The start address index for ROM builds */ | 45 | /* The start address index for ROM builds */ |
43 | #define ROM_START 0x11010 | 46 | #define ROM_START 0x11010 |
44 | 47 | ||
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h index de54e7740f..92f2cc03eb 100644 --- a/firmware/export/config-h300.h +++ b/firmware/export/config-h300.h | |||
@@ -39,6 +39,9 @@ | |||
39 | /* Define this if the platform can charge batteries */ | 39 | /* Define this if the platform can charge batteries */ |
40 | #define HAVE_CHARGING 1 | 40 | #define HAVE_CHARGING 1 |
41 | 41 | ||
42 | /* define this if the hardware can be powered off while charging */ | ||
43 | #define HAVE_POWEROFF_WHILE_CHARGING | ||
44 | |||
42 | /* The start address index for ROM builds */ | 45 | /* The start address index for ROM builds */ |
43 | #define ROM_START 0x11010 | 46 | #define ROM_START 0x11010 |
44 | 47 | ||
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 2d7e5dfe6e..37bbbe2e2c 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -399,7 +399,7 @@ static void handle_auto_poweroff(void) | |||
399 | if(TIME_AFTER(current_tick, sleeptimer_endtick)) | 399 | if(TIME_AFTER(current_tick, sleeptimer_endtick)) |
400 | { | 400 | { |
401 | audio_stop(); | 401 | audio_stop(); |
402 | #ifdef HAVE_CHARGING | 402 | #if defined(HAVE_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING) |
403 | if((charger_input_state == CHARGER) || | 403 | if((charger_input_state == CHARGER) || |
404 | (charger_input_state == CHARGER_PLUGGED)) | 404 | (charger_input_state == CHARGER_PLUGGED)) |
405 | { | 405 | { |