summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/imx233/system-imx233.c20
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
140int system_memory_guard(int newmode) 138int system_memory_guard(int newmode)