diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/button.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-scroll.c | 13 |
2 files changed, 0 insertions, 17 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index c81b629f6d..f2408d891e 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -50,9 +50,7 @@ struct event_queue button_queue SHAREDBSS_ATTR; | |||
50 | static long lastbtn; /* Last valid button status */ | 50 | static long lastbtn; /* Last valid button status */ |
51 | static long last_read; /* Last button status, for debouncing/filtering */ | 51 | static long last_read; /* Last button status, for debouncing/filtering */ |
52 | static intptr_t button_data; /* data value from last message dequeued */ | 52 | static intptr_t button_data; /* data value from last message dequeued */ |
53 | #ifdef HAVE_LCD_BITMAP | ||
54 | static bool flipped; /* buttons can be flipped to match the LCD flip */ | 53 | static bool flipped; /* buttons can be flipped to match the LCD flip */ |
55 | #endif | ||
56 | #ifdef HAVE_BACKLIGHT | 54 | #ifdef HAVE_BACKLIGHT |
57 | static bool filter_first_keypress; | 55 | static bool filter_first_keypress; |
58 | #ifdef HAVE_REMOTE_LCD | 56 | #ifdef HAVE_REMOTE_LCD |
@@ -535,9 +533,7 @@ void button_init(void) | |||
535 | 533 | ||
536 | reset_poweroff_timer(); | 534 | reset_poweroff_timer(); |
537 | 535 | ||
538 | #ifdef HAVE_LCD_BITMAP | ||
539 | flipped = false; | 536 | flipped = false; |
540 | #endif | ||
541 | #ifdef HAVE_BACKLIGHT | 537 | #ifdef HAVE_BACKLIGHT |
542 | filter_first_keypress = false; | 538 | filter_first_keypress = false; |
543 | #ifdef HAVE_REMOTE_LCD | 539 | #ifdef HAVE_REMOTE_LCD |
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c index 7916556dfb..5d66788093 100644 --- a/firmware/drivers/lcd-scroll.c +++ b/firmware/drivers/lcd-scroll.c | |||
@@ -39,9 +39,7 @@ struct scroll_screen_info LCDFN(scroll_info) = | |||
39 | .ticks = 12, | 39 | .ticks = 12, |
40 | .delay = HZ/2, | 40 | .delay = HZ/2, |
41 | .bidir_limit = 50, | 41 | .bidir_limit = 50, |
42 | #ifdef HAVE_LCD_BITMAP | ||
43 | .step = 6, | 42 | .step = 6, |
44 | #endif | ||
45 | }; | 43 | }; |
46 | 44 | ||
47 | 45 | ||
@@ -100,12 +98,10 @@ void LCDFN(scroll_speed)(int speed) | |||
100 | LCDFN(scroll_info).ticks = scroll_tick_table[speed]; | 98 | LCDFN(scroll_info).ticks = scroll_tick_table[speed]; |
101 | } | 99 | } |
102 | 100 | ||
103 | #if defined(HAVE_LCD_BITMAP) | ||
104 | void LCDFN(scroll_step)(int step) | 101 | void LCDFN(scroll_step)(int step) |
105 | { | 102 | { |
106 | LCDFN(scroll_info).step = step; | 103 | LCDFN(scroll_info).step = step; |
107 | } | 104 | } |
108 | #endif | ||
109 | 105 | ||
110 | void LCDFN(scroll_delay)(int ms) | 106 | void LCDFN(scroll_delay)(int ms) |
111 | { | 107 | { |
@@ -162,7 +158,6 @@ bool LCDFN(scroll_now)(struct scrollinfo *s) | |||
162 | 158 | ||
163 | /* Stash and restore these three, so that the scroll_func | 159 | /* Stash and restore these three, so that the scroll_func |
164 | * can do whatever it likes without destroying the state */ | 160 | * can do whatever it likes without destroying the state */ |
165 | #ifdef HAVE_LCD_BITMAP | ||
166 | unsigned drawmode; | 161 | unsigned drawmode; |
167 | #if LCD_DEPTH > 1 | 162 | #if LCD_DEPTH > 1 |
168 | unsigned fg_pattern, bg_pattern; | 163 | unsigned fg_pattern, bg_pattern; |
@@ -170,18 +165,15 @@ bool LCDFN(scroll_now)(struct scrollinfo *s) | |||
170 | bg_pattern = s->vp->bg_pattern; | 165 | bg_pattern = s->vp->bg_pattern; |
171 | #endif | 166 | #endif |
172 | drawmode = s->vp->drawmode; | 167 | drawmode = s->vp->drawmode; |
173 | #endif | ||
174 | s->scroll_func(s); | 168 | s->scroll_func(s); |
175 | 169 | ||
176 | LCDFN(update_viewport_rect)(s->x, s->y, s->width, s->height); | 170 | LCDFN(update_viewport_rect)(s->x, s->y, s->width, s->height); |
177 | 171 | ||
178 | #ifdef HAVE_LCD_BITMAP | ||
179 | #if LCD_DEPTH > 1 | 172 | #if LCD_DEPTH > 1 |
180 | s->vp->fg_pattern = fg_pattern; | 173 | s->vp->fg_pattern = fg_pattern; |
181 | s->vp->bg_pattern = bg_pattern; | 174 | s->vp->bg_pattern = bg_pattern; |
182 | #endif | 175 | #endif |
183 | s->vp->drawmode = drawmode; | 176 | s->vp->drawmode = drawmode; |
184 | #endif | ||
185 | 177 | ||
186 | return ended; | 178 | return ended; |
187 | } | 179 | } |
@@ -216,12 +208,7 @@ static void LCDFN(scroll_worker)(void) | |||
216 | LCDFN(set_viewport)(s->vp); | 208 | LCDFN(set_viewport)(s->vp); |
217 | 209 | ||
218 | makedelay = false; | 210 | makedelay = false; |
219 | #ifdef HAVE_LCD_BITMAP | ||
220 | step = si->step; | 211 | step = si->step; |
221 | #else | ||
222 | step = 1; | ||
223 | #endif | ||
224 | |||
225 | 212 | ||
226 | if (s->backward) | 213 | if (s->backward) |
227 | s->offset -= step; | 214 | s->offset -= step; |