diff options
Diffstat (limited to 'firmware/target/arm/as3525')
9 files changed, 18 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sansa-c200v2/backlight-target.h b/firmware/target/arm/as3525/sansa-c200v2/backlight-target.h index c09e759138..4a098f7f28 100644 --- a/firmware/target/arm/as3525/sansa-c200v2/backlight-target.h +++ b/firmware/target/arm/as3525/sansa-c200v2/backlight-target.h | |||
@@ -27,6 +27,13 @@ bool _backlight_init(void); | |||
27 | void _backlight_pwm(int on); | 27 | void _backlight_pwm(int on); |
28 | void _backlight_on(void); | 28 | void _backlight_on(void); |
29 | void _backlight_off(void); | 29 | void _backlight_off(void); |
30 | |||
31 | static inline void _backlight_panic_on(void) | ||
32 | { | ||
33 | _backlight_on(); | ||
34 | _backlight_pwm(1); | ||
35 | } | ||
36 | |||
30 | void _backlight_set_brightness(int brightness); | 37 | void _backlight_set_brightness(int brightness); |
31 | int __backlight_is_on(void); | 38 | int __backlight_is_on(void); |
32 | 39 | ||
diff --git a/firmware/target/arm/as3525/sansa-clip/backlight-target.h b/firmware/target/arm/as3525/sansa-clip/backlight-target.h index f836fb9ab2..00c6e5cc44 100644 --- a/firmware/target/arm/as3525/sansa-clip/backlight-target.h +++ b/firmware/target/arm/as3525/sansa-clip/backlight-target.h | |||
@@ -35,6 +35,8 @@ static inline void _backlight_off(void) | |||
35 | lcd_enable(false); | 35 | lcd_enable(false); |
36 | } | 36 | } |
37 | 37 | ||
38 | #define _backlight_panic_on() _backlight_on() | ||
39 | |||
38 | static inline bool _backlight_init(void) | 40 | static inline bool _backlight_init(void) |
39 | { | 41 | { |
40 | GPIOD_DIR |= (1<<7); /* for button light */ | 42 | GPIOD_DIR |= (1<<7); /* for button light */ |
diff --git a/firmware/target/arm/as3525/sansa-clipplus/backlight-target.h b/firmware/target/arm/as3525/sansa-clipplus/backlight-target.h index 2990083440..3dd9240bd8 100644 --- a/firmware/target/arm/as3525/sansa-clipplus/backlight-target.h +++ b/firmware/target/arm/as3525/sansa-clipplus/backlight-target.h | |||
@@ -25,5 +25,6 @@ | |||
25 | 25 | ||
26 | void _backlight_on(void); | 26 | void _backlight_on(void); |
27 | void _backlight_off(void); | 27 | void _backlight_off(void); |
28 | #define _backlight_panic_on() _backlight_on() | ||
28 | 29 | ||
29 | #endif | 30 | #endif |
diff --git a/firmware/target/arm/as3525/sansa-clipv2/backlight-target.h b/firmware/target/arm/as3525/sansa-clipv2/backlight-target.h index d8c013a64a..3000b575c7 100644 --- a/firmware/target/arm/as3525/sansa-clipv2/backlight-target.h +++ b/firmware/target/arm/as3525/sansa-clipv2/backlight-target.h | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | void _backlight_on(void); | 27 | void _backlight_on(void); |
28 | void _backlight_off(void); | 28 | void _backlight_off(void); |
29 | #define _backlight_panic_on() _backlight_on() | ||
29 | 30 | ||
30 | static inline bool _backlight_init(void) | 31 | static inline bool _backlight_init(void) |
31 | { | 32 | { |
diff --git a/firmware/target/arm/as3525/sansa-e200v2/backlight-target.h b/firmware/target/arm/as3525/sansa-e200v2/backlight-target.h index db2cecc07a..227a154197 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/backlight-target.h +++ b/firmware/target/arm/as3525/sansa-e200v2/backlight-target.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define _backlight_init() true | 24 | #define _backlight_init() true |
25 | void _backlight_on(void); | 25 | void _backlight_on(void); |
26 | void _backlight_off(void); | 26 | void _backlight_off(void); |
27 | #define _backlight_panic_on() _backlight_on() | ||
27 | void _backlight_set_brightness(int brightness); | 28 | void _backlight_set_brightness(int brightness); |
28 | int __backlight_is_on(void); | 29 | int __backlight_is_on(void); |
29 | 30 | ||
diff --git a/firmware/target/arm/as3525/sansa-fuze/backlight-target.h b/firmware/target/arm/as3525/sansa-fuze/backlight-target.h index 2d60ac35c2..df6df573b0 100644 --- a/firmware/target/arm/as3525/sansa-fuze/backlight-target.h +++ b/firmware/target/arm/as3525/sansa-fuze/backlight-target.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define _backlight_init() true | 24 | #define _backlight_init() true |
25 | void _backlight_on(void); | 25 | void _backlight_on(void); |
26 | void _backlight_off(void); | 26 | void _backlight_off(void); |
27 | #define _backlight_panic_on() _backlight_on() | ||
27 | void _backlight_set_brightness(int brightness); | 28 | void _backlight_set_brightness(int brightness); |
28 | #ifdef HAVE_BUTTON_LIGHT | 29 | #ifdef HAVE_BUTTON_LIGHT |
29 | void _buttonlight_on(void); | 30 | void _buttonlight_on(void); |
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h b/firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h index e4ed7870ec..f9d7005f79 100644 --- a/firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h +++ b/firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h | |||
@@ -28,6 +28,7 @@ | |||
28 | bool _backlight_init(void); | 28 | bool _backlight_init(void); |
29 | void _backlight_on(void); | 29 | void _backlight_on(void); |
30 | void _backlight_off(void); | 30 | void _backlight_off(void); |
31 | #define _backlight_panic_on() _backlight_on() | ||
31 | void _backlight_set_brightness(int brightness); | 32 | void _backlight_set_brightness(int brightness); |
32 | #ifdef HAVE_BUTTON_LIGHT | 33 | #ifdef HAVE_BUTTON_LIGHT |
33 | void _buttonlight_on(void); | 34 | void _buttonlight_on(void); |
diff --git a/firmware/target/arm/as3525/sansa-m200v4/backlight-target.h b/firmware/target/arm/as3525/sansa-m200v4/backlight-target.h index 50404f7090..b5560bd037 100644 --- a/firmware/target/arm/as3525/sansa-m200v4/backlight-target.h +++ b/firmware/target/arm/as3525/sansa-m200v4/backlight-target.h | |||
@@ -37,4 +37,6 @@ static inline void _backlight_off(void) | |||
37 | GPIOD_PIN(1) = 0x00; | 37 | GPIOD_PIN(1) = 0x00; |
38 | } | 38 | } |
39 | 39 | ||
40 | #define _backlight_panic_on() _backlight_on() | ||
41 | |||
40 | #endif | 42 | #endif |
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 5eae1a35b3..3ba56cf30a 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c | |||
@@ -392,6 +392,8 @@ void system_reboot(void) | |||
392 | 392 | ||
393 | void system_exception_wait(void) | 393 | void system_exception_wait(void) |
394 | { | 394 | { |
395 | /* make sure lcd+backlight are on */ | ||
396 | _backlight_panic_on(); | ||
395 | /* wait until button release (if a button is pressed) */ | 397 | /* wait until button release (if a button is pressed) */ |
396 | while(button_read_device()); | 398 | while(button_read_device()); |
397 | /* then wait until next button press */ | 399 | /* then wait until next button press */ |