diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-23 00:30:47 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-23 00:30:47 +0000 |
commit | b70a0466159e4d557aa30f53c104191965468241 (patch) | |
tree | b68aa97107b63e9ef1c8b012f57a228b14f8ab81 /firmware/backlight.c | |
parent | 50ba8da88c73c32d00da77b29a6fb75915e5f964 (diff) | |
download | rockbox-b70a0466159e4d557aa30f53c104191965468241.tar.gz rockbox-b70a0466159e4d557aa30f53c104191965468241.zip |
Backlight fix for Players by Grant Wier
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1412 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r-- | firmware/backlight.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c index 32a222929b..ccdf7a44ea 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -53,27 +53,27 @@ void backlight_thread(void) | |||
53 | #ifdef HAVE_RTC | 53 | #ifdef HAVE_RTC |
54 | rtc_write(0x13, 0x10); | 54 | rtc_write(0x13, 0x10); |
55 | #else | 55 | #else |
56 | PADR |= 0x40; | 56 | PADR &= ~0x4000; |
57 | #endif | 57 | #endif |
58 | } | 58 | } |
59 | break; | 59 | break; |
60 | 60 | ||
61 | case BACKLIGHT_OFF: | 61 | case BACKLIGHT_OFF: |
62 | #ifdef HAVE_RTC | 62 | #ifdef HAVE_RTC |
63 | rtc_write(0x13, 0x00); | 63 | rtc_write(0x13, 0x00); |
64 | #else | 64 | #else |
65 | PADR &= ~0x40; | 65 | PADR |= 0x4000; |
66 | #endif | 66 | #endif |
67 | break; | 67 | break; |
68 | 68 | ||
69 | case SYS_USB_CONNECTED: | 69 | case SYS_USB_CONNECTED: |
70 | /* Tell the USB thread that we are safe */ | 70 | /* Tell the USB thread that we are safe */ |
71 | DEBUGF("backlight_thread got SYS_USB_CONNECTED\n"); | 71 | DEBUGF("backlight_thread got SYS_USB_CONNECTED\n"); |
72 | usb_acknowledge(SYS_USB_CONNECTED_ACK); | 72 | usb_acknowledge(SYS_USB_CONNECTED_ACK); |
73 | 73 | ||
74 | /* Wait until the USB cable is extracted again */ | 74 | /* Wait until the USB cable is extracted again */ |
75 | usb_wait_for_disconnect(&backlight_queue); | 75 | usb_wait_for_disconnect(&backlight_queue); |
76 | break; | 76 | break; |
77 | } | 77 | } |
78 | } | 78 | } |
79 | } | 79 | } |
@@ -113,6 +113,9 @@ void backlight_init(void) | |||
113 | #endif | 113 | #endif |
114 | queue_init(&backlight_queue); | 114 | queue_init(&backlight_queue); |
115 | create_thread(backlight_thread, backlight_stack, | 115 | create_thread(backlight_thread, backlight_stack, |
116 | sizeof(backlight_stack), backlight_thread_name); | 116 | sizeof(backlight_stack), backlight_thread_name); |
117 | |||
118 | PAIOR |= 0x4000; | ||
119 | |||
117 | backlight_on(); | 120 | backlight_on(); |
118 | } | 121 | } |