summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/backlight.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index edf8ff3744..f43c8a06fc 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -74,7 +74,7 @@ void backlight_thread(void)
74 /* Disable square wave */ 74 /* Disable square wave */
75 rtc_write(0x0a, rtc_read(0x0a) & ~0x40); 75 rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
76#else 76#else
77 or_b(0x40, &PADRH); 77 and_b(~0x40, &PAIORH);
78#endif 78#endif
79 } 79 }
80 /* else if(backlight_timer) */ 80 /* else if(backlight_timer) */
@@ -85,6 +85,7 @@ void backlight_thread(void)
85 rtc_write(0x0a, rtc_read(0x0a) | 0x40); 85 rtc_write(0x0a, rtc_read(0x0a) | 0x40);
86#else 86#else
87 and_b(~0x40, &PADRH); 87 and_b(~0x40, &PADRH);
88 or_b(0x40, &PAIORH);
88#endif 89#endif
89 } 90 }
90 break; 91 break;
@@ -94,7 +95,7 @@ void backlight_thread(void)
94 /* Disable square wave */ 95 /* Disable square wave */
95 rtc_write(0x0a, rtc_read(0x0a) & ~0x40); 96 rtc_write(0x0a, rtc_read(0x0a) & ~0x40);
96#else 97#else
97 or_b(0x40, &PADRH); 98 and_b(~0x40, &PAIORH);
98#endif 99#endif
99 break; 100 break;
100 101
@@ -172,10 +173,5 @@ void backlight_init(void)
172 create_thread(backlight_thread, backlight_stack, 173 create_thread(backlight_thread, backlight_stack,
173 sizeof(backlight_stack), backlight_thread_name); 174 sizeof(backlight_stack), backlight_thread_name);
174 175
175#ifndef HAVE_RTC
176
177 or_b(0x40, &PAIORH); /* Set data direction of PA14 */
178#endif
179
180 backlight_on(); 176 backlight_on();
181} 177}