1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Index: firmware/target/arm/tcc780x/cowond2/button-cowond2.c
===================================================================
--- firmware/target/arm/tcc780x/cowond2/button-cowond2.c	(revision 21983)
+++ firmware/target/arm/tcc780x/cowond2/button-cowond2.c	(working copy)
@@ -103,10 +103,23 @@
 {
     int btn = BUTTON_NONE;
     int adc;
+
+    static bool hold_button = false;
+    bool hold_button_old;
+    
     *data = 0;
-    
-    if (button_hold()) return BUTTON_NONE;

+    hold_button_old = hold_button;
+    hold_button = button_hold();
+
+#ifndef BOOTLOADER
+    if (hold_button != hold_button_old)
+        backlight_hold_changed(hold_button);
+#endif
+
+    if (hold_button)
+        return BUTTON_NONE;
+
     if (GPIOB & 0x4)
     {
         adc = adc_read(ADC_BUTTONS);