diff options
Diffstat (limited to 'firmware/scroll_engine.c')
-rw-r--r-- | firmware/scroll_engine.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c index d134f7b2ce..d1bc2976a1 100644 --- a/firmware/scroll_engine.c +++ b/firmware/scroll_engine.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * | 23 | * |
24 | ****************************************************************************/ | 24 | ****************************************************************************/ |
25 | 25 | ||
26 | #include <stdio.h> | ||
26 | #include "config.h" | 27 | #include "config.h" |
27 | #include "gcc_extensions.h" | 28 | #include "gcc_extensions.h" |
28 | #include "cpu.h" | 29 | #include "cpu.h" |
@@ -36,16 +37,20 @@ | |||
36 | #endif | 37 | #endif |
37 | #include "scroll_engine.h" | 38 | #include "scroll_engine.h" |
38 | 39 | ||
40 | |||
41 | /* private helper function for the scroll engine. Do not use in apps/. | ||
42 | * defined in lcd-bitmap-common.c */ | ||
43 | extern struct viewport *lcd_get_viewport(bool *is_defaut); | ||
44 | #ifdef HAVE_REMOTE_LCD | ||
45 | extern struct viewport *lcd_remote_get_viewport(bool *is_defaut); | ||
46 | #endif | ||
47 | |||
39 | static const char scroll_tick_table[18] = { | 48 | static const char scroll_tick_table[18] = { |
40 | /* Hz values [f(x)=100.8/(x+.048)]: | 49 | /* Hz values [f(x)=100.8/(x+.048)]: |
41 | 1, 1.25, 1.55, 2, 2.5, 3.12, 4, 5, 6.25, 8.33, 10, 12.5, 16.7, 20, 25, 33, 49.2, 96.2 */ | 50 | 1, 1.25, 1.55, 2, 2.5, 3.12, 4, 5, 6.25, 8.33, 10, 12.5, 16.7, 20, 25, 33, 49.2, 96.2 */ |
42 | 100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3, 2, 1 | 51 | 100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3, 2, 1 |
43 | }; | 52 | }; |
44 | 53 | ||
45 | /* imported private functions from lcd-bitmap-common.c */ | ||
46 | extern struct viewport *lcd_get_viewport(void); | ||
47 | extern struct viewport *lcd_remote_get_viewport(void); | ||
48 | |||
49 | static void scroll_thread(void); | 54 | static void scroll_thread(void); |
50 | static char scroll_stack[DEFAULT_STACK_SIZE*3]; | 55 | static char scroll_stack[DEFAULT_STACK_SIZE*3]; |
51 | static const char scroll_name[] = "scroll"; | 56 | static const char scroll_name[] = "scroll"; |
@@ -156,7 +161,7 @@ static void scroll_thread(void) | |||
156 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 161 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
157 | if (lcd_active()) | 162 | if (lcd_active()) |
158 | #endif | 163 | #endif |
159 | lcd_scroll_fn(); | 164 | lcd_scroll_worker(); |
160 | lcd_scroll_info.last_scroll = current_tick; | 165 | lcd_scroll_info.last_scroll = current_tick; |
161 | } | 166 | } |
162 | 167 | ||
@@ -165,7 +170,7 @@ static void scroll_thread(void) | |||
165 | 170 | ||
166 | if (scroll & SCROLL_LCD_REMOTE) | 171 | if (scroll & SCROLL_LCD_REMOTE) |
167 | { | 172 | { |
168 | lcd_remote_scroll_fn(); | 173 | lcd_remote_scroll_worker(); |
169 | lcd_remote_scroll_info.last_scroll = current_tick; | 174 | lcd_remote_scroll_info.last_scroll = current_tick; |
170 | } | 175 | } |
171 | } | 176 | } |
@@ -179,7 +184,7 @@ static void scroll_thread(void) | |||
179 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 184 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
180 | if (lcd_active()) | 185 | if (lcd_active()) |
181 | #endif | 186 | #endif |
182 | lcd_scroll_fn(); | 187 | lcd_scroll_worker(); |
183 | } | 188 | } |
184 | } | 189 | } |
185 | #endif /* HAVE_REMOTE_LCD */ | 190 | #endif /* HAVE_REMOTE_LCD */ |