summaryrefslogtreecommitdiff
path: root/firmware/backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r--firmware/backlight.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index e47a58adbf..db190226f0 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -24,6 +24,7 @@
24#include "i2c.h" 24#include "i2c.h"
25#include "debug.h" 25#include "debug.h"
26#include "rtc.h" 26#include "rtc.h"
27#include "usb.h"
27 28
28#define BACKLIGHT_ON 1 29#define BACKLIGHT_ON 1
29#define BACKLIGHT_OFF 2 30#define BACKLIGHT_OFF 2
@@ -55,6 +56,7 @@ void backlight_thread(void)
55#endif 56#endif
56 } 57 }
57 break; 58 break;
59
58 case BACKLIGHT_OFF: 60 case BACKLIGHT_OFF:
59#ifdef HAVE_RTC 61#ifdef HAVE_RTC
60 rtc_write(0x13, 0x00); 62 rtc_write(0x13, 0x00);
@@ -62,6 +64,16 @@ void backlight_thread(void)
62 PADR &= ~0x40; 64 PADR &= ~0x40;
63#endif 65#endif
64 break; 66 break;
67
68 case SYS_USB_CONNECTED:
69 /* Tell the USB thread that we are safe */
70 DEBUGF("backlight_thread got SYS_USB_CONNECTED\n");
71 usb_acknowledge(SYS_USB_CONNECTED_ACK);
72
73 /* Wait until the system reboots */
74 while(1)
75 yield();
76 break;
65 } 77 }
66 } 78 }
67} 79}