mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
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
This commit is contained in:
parent
a25700e4a0
commit
d245b7a2a1
1 changed files with 9 additions and 11 deletions
|
|
@ -124,17 +124,15 @@ void system_exception_wait(void)
|
||||||
lcd_update();
|
lcd_update();
|
||||||
backlight_hw_on();
|
backlight_hw_on();
|
||||||
backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING);
|
backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING);
|
||||||
/* wait until button release (if a button is pressed) */
|
/* wait until button release (if a button is pressed)
|
||||||
#ifdef HAVE_BUTTON_DATA
|
* NOTE at this point, interrupts are off so that rules out touchpad and
|
||||||
int data;
|
* ADC, so we are pretty much left with PSWITCH only. If other buttons are
|
||||||
while(button_read_device(&data));
|
* wanted, it is possible to implement a busy polling version of button
|
||||||
/* then wait until next button press */
|
* reading for GPIO and ADC in button-imx233 but this is not done at the
|
||||||
while(!button_read_device(&data));
|
* moment. */
|
||||||
#else
|
while(imx233_power_read_pswitch() != 0) {}
|
||||||
while(button_read_device());
|
while(imx233_power_read_pswitch() == 0) {}
|
||||||
/* then wait until next button press */
|
while(imx233_power_read_pswitch() != 0) {}
|
||||||
while(!button_read_device());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int system_memory_guard(int newmode)
|
int system_memory_guard(int newmode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue