diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-05-02 21:41:02 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2016-05-28 17:19:48 +0200 |
commit | d245b7a2a1113b6dbdbfb10f5ee984a00c987844 (patch) | |
tree | e3e65496c688fb34adfc65f95130199c9a088deb /firmware | |
parent | a25700e4a04145fcf59e4674a88f55dd088a9c08 (diff) | |
download | rockbox-d245b7a2a1113b6dbdbfb10f5ee984a00c987844.tar.gz rockbox-d245b7a2a1113b6dbdbfb10f5ee984a00c987844.zip |
imx233: fix system_exception_wait()
The old code used button_get() to read the button status and wait for a
key to leave the panic screen. This is broken since when IRQ are disable,
the button mask is not updated anymore for touchpad and adc buttons. For
now, only use pswitch: this should be good enough for all targets.
Change-Id: I0ae179e24555ac20c3d2bf2d267c1bb0e2ceded0
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/imx233/system-imx233.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/firmware/target/arm/imx233/system-imx233.c b/firmware/target/arm/imx233/system-imx233.c index 1174d1c93c..2264f7cacd 100644 --- a/firmware/target/arm/imx233/system-imx233.c +++ b/firmware/target/arm/imx233/system-imx233.c | |||
@@ -124,17 +124,15 @@ void system_exception_wait(void) | |||
124 | lcd_update(); | 124 | lcd_update(); |
125 | backlight_hw_on(); | 125 | backlight_hw_on(); |
126 | backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); | 126 | backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING); |
127 | /* wait until button release (if a button is pressed) */ | 127 | /* wait until button release (if a button is pressed) |
128 | #ifdef HAVE_BUTTON_DATA | 128 | * NOTE at this point, interrupts are off so that rules out touchpad and |
129 | int data; | 129 | * ADC, so we are pretty much left with PSWITCH only. If other buttons are |
130 | while(button_read_device(&data)); | 130 | * wanted, it is possible to implement a busy polling version of button |
131 | /* then wait until next button press */ | 131 | * reading for GPIO and ADC in button-imx233 but this is not done at the |
132 | while(!button_read_device(&data)); | 132 | * moment. */ |
133 | #else | 133 | while(imx233_power_read_pswitch() != 0) {} |
134 | while(button_read_device()); | 134 | while(imx233_power_read_pswitch() == 0) {} |
135 | /* then wait until next button press */ | 135 | while(imx233_power_read_pswitch() != 0) {} |
136 | while(!button_read_device()); | ||
137 | #endif | ||
138 | } | 136 | } |
139 | 137 | ||
140 | int system_memory_guard(int newmode) | 138 | int system_memory_guard(int newmode) |