diff --git a/apps/tree.c b/apps/tree.c index b096b8927f..1332fc07ba 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -820,7 +820,7 @@ static bool dirbrowse(void) break; #ifdef TREE_OFF -#ifndef HAVE_SW_POWEROFF +#if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF) case TREE_OFF: if (*tc.dirfilter < NUM_FILTER_MODES) { @@ -839,7 +839,7 @@ static bool dirbrowse(void) } break; #endif -#if defined(HAVE_CHARGING) && !defined(IRIVER_H100) +#if defined(HAVE_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING) case TREE_OFF | BUTTON_REPEAT: if (charger_inserted()) { charging_splash(); diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index b7f8621f67..914ef60f79 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -14,6 +14,9 @@ /* define this if you have a real-time clock */ #define HAVE_RTC 1 +/* Define this if you have a software controlled poweroff */ +#define HAVE_SW_POWEROFF + #ifndef SIMULATOR /* Define this if you have a MAS3587F */ @@ -73,9 +76,6 @@ /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_RTC /* on I2C controlled RTC port */ -/* Define this if you have a software controlled poweroff */ -#define HAVE_SW_POWEROFF - #define CONFIG_LCD LCD_SSD1815 #define BOOTFILE_EXT ".ajz" diff --git a/firmware/export/config-gmini120.h b/firmware/export/config-gmini120.h index f1c20ee240..93b8727b63 100644 --- a/firmware/export/config-gmini120.h +++ b/firmware/export/config-gmini120.h @@ -16,6 +16,9 @@ #define CONFIG_KEYPAD GMINI100_PAD +/* Define this if you have a software controlled poweroff */ +#define HAVE_SW_POWEROFF + #ifndef SIMULATOR /* Define this if you have a TCC730 (CalmRISC16) */ @@ -40,9 +43,6 @@ #define CPU_FREQ 30000000 /* approximate value (and false in general since freq is variable) */ -/* Define this if you have a software controlled poweroff */ -#define HAVE_SW_POWEROFF - /* Always enable debug till we stabilize */ #define EMULATOR diff --git a/firmware/export/config-gminisp.h b/firmware/export/config-gminisp.h index 5cf8a76204..6a1105f30a 100644 --- a/firmware/export/config-gminisp.h +++ b/firmware/export/config-gminisp.h @@ -10,6 +10,9 @@ #define CONFIG_KEYPAD GMINI100_PAD +/* Define this if you have a software controlled poweroff */ +#define HAVE_SW_POWEROFF + #ifndef SIMULATOR /* Define this if you have a TCC730 (CalmRISC16) */ @@ -34,9 +37,6 @@ #define CPU_FREQ 30000000 /* approximate value (and false in general since freq is variable) */ -/* Define this if you have a software controlled poweroff */ -#define HAVE_SW_POWEROFF - /* Always enable debug till we stabilize */ #define EMULATOR diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h index 82247cf497..552eea1166 100644 --- a/firmware/export/config-h100.h +++ b/firmware/export/config-h100.h @@ -24,6 +24,9 @@ #define CONFIG_LCD LCD_S1D15E06 +/* Define this if you have a software controlled poweroff */ +#define HAVE_SW_POWEROFF + #ifndef SIMULATOR /* Define this if you have a Motorola SCF5249 */ @@ -64,9 +67,6 @@ #define USB_IRIVERSTYLE -/* Define this if you have a software controlled poweroff */ -#define HAVE_SW_POWEROFF - /* Define this if you have adjustable CPU frequency */ #define HAVE_ADJUSTABLE_CPU_FREQ diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h index 92f2cc03eb..015f31ad8a 100644 --- a/firmware/export/config-h300.h +++ b/firmware/export/config-h300.h @@ -22,6 +22,9 @@ /* Define this if you have an remote lcd */ #define HAVE_REMOTE_LCD +/* Define this if you have a software controlled poweroff */ +#define HAVE_SW_POWEROFF + #ifndef SIMULATOR /* Define this if you have a Motorola SCF5249 */ @@ -64,9 +67,6 @@ #define USB_IRIVERSTYLE -/* Define this if you have a software controlled poweroff */ -#define HAVE_SW_POWEROFF - /* Define this if you have adjustable CPU frequency */ #define HAVE_ADJUSTABLE_CPU_FREQ diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index 2380f220c0..b052832bbc 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h @@ -11,6 +11,9 @@ /* define this if you have an Ondio style 6-key keyboard */ #define CONFIG_KEYPAD ONDIO_PAD +/* Define this if you have a software controlled poweroff */ +#define HAVE_SW_POWEROFF + #ifndef SIMULATOR /* Define this if you have a SH7034 */ @@ -76,9 +79,6 @@ /* Define this if the MAS SIBI line can be controlled via PB8 */ #define HAVE_MAS_SIBI_CONTROL -/* Define this if you have a software controlled poweroff */ -#define HAVE_SW_POWEROFF - /* define this if more than one device/partition can be used */ #define HAVE_MULTIVOLUME diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h index 66062fa0f3..6c800b3a53 100644 --- a/firmware/export/config-ondiosp.h +++ b/firmware/export/config-ondiosp.h @@ -8,6 +8,9 @@ /* define this if you have an Ondio style 6-key keyboard */ #define CONFIG_KEYPAD ONDIO_PAD +/* Define this if you have a software controlled poweroff */ +#define HAVE_SW_POWEROFF + #ifndef SIMULATOR /* Define this if you have a SH7034 */ @@ -64,9 +67,6 @@ /* Define this if the MAS SIBI line can be controlled via PB8 */ #define HAVE_MAS_SIBI_CONTROL -/* Define this if you have a software controlled poweroff */ -#define HAVE_SW_POWEROFF - /* define this if more than one device/partition can be used */ #define HAVE_MULTIVOLUME diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index e042a78ead..450222dd38 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h @@ -14,6 +14,9 @@ /* define this if you have a real-time clock */ #define HAVE_RTC 1 +/* Define this if you have a software controlled poweroff */ +#define HAVE_SW_POWEROFF + #ifndef SIMULATOR /* Define this if you have a SH7034 */ @@ -73,9 +76,6 @@ /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_RTC /* on I2C controlled RTC port */ -/* Define this if you have a software controlled poweroff */ -#define HAVE_SW_POWEROFF - #define CONFIG_LCD LCD_SSD1815 #define BOOTFILE_EXT ".ajz"