summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/screen_access.h4
-rw-r--r--firmware/export/scroll_engine.h8
-rw-r--r--firmware/scroll_engine.c15
3 files changed, 15 insertions, 12 deletions
diff --git a/apps/screen_access.h b/apps/screen_access.h
index 0002e71991..07fc36451d 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -138,8 +138,8 @@ struct screen
void (*stop_scroll)(void);
void (*clear_display)(void);
void (*clear_viewport)(void);
- void (*scroll_stop)(struct viewport* vp);
- void (*scroll_stop_line)(struct viewport* vp, int y);
+ void (*scroll_stop)(const struct viewport* vp);
+ void (*scroll_stop_line)(const struct viewport* vp, int y);
void (*update)(void);
void (*update_viewport)(void);
void (*backlight_on)(void);
diff --git a/firmware/export/scroll_engine.h b/firmware/export/scroll_engine.h
index 762761f213..0fcb06af81 100644
--- a/firmware/export/scroll_engine.h
+++ b/firmware/export/scroll_engine.h
@@ -29,13 +29,13 @@
#include "file.h"
void scroll_init(void);
-void lcd_scroll_stop(struct viewport* vp);
-void lcd_scroll_stop_line(struct viewport* vp, int y);
+void lcd_scroll_stop(const struct viewport* vp);
+void lcd_scroll_stop_line(const struct viewport* vp, int y);
void lcd_scroll_fn(void);
#ifdef HAVE_REMOTE_LCD
void lcd_remote_scroll_fn(void);
-void lcd_remote_scroll_stop(struct viewport* vp);
-void lcd_remote_scroll_stop_line(struct viewport* vp, int y);
+void lcd_remote_scroll_stop(const struct viewport* vp);
+void lcd_remote_scroll_stop_line(const struct viewport* vp, int y);
#endif
/* internal usage, but in multiple drivers */
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c
index 8d84c797e9..b7e0601150 100644
--- a/firmware/scroll_engine.c
+++ b/firmware/scroll_engine.c
@@ -85,7 +85,7 @@ void lcd_stop_scroll(void)
}
/* Stop scrolling line y in the specified viewport, or all lines if y < 0 */
-void lcd_scroll_stop_line(struct viewport* current_vp, int y)
+void lcd_scroll_stop_line(const struct viewport* current_vp, int y)
{
int i = 0;
@@ -98,7 +98,8 @@ void lcd_scroll_stop_line(struct viewport* current_vp, int y)
the last item to position i */
if ((i + 1) != lcd_scroll_info.lines)
{
- lcd_scroll_info.scroll[i] = lcd_scroll_info.scroll[lcd_scroll_info.lines-1];
+ lcd_scroll_info.scroll[i] =
+ lcd_scroll_info.scroll[lcd_scroll_info.lines-1];
}
lcd_scroll_info.lines--;
@@ -115,7 +116,7 @@ void lcd_scroll_stop_line(struct viewport* current_vp, int y)
}
/* Stop all scrolling lines in the specified viewport */
-void lcd_scroll_stop(struct viewport* vp)
+void lcd_scroll_stop(const struct viewport* vp)
{
lcd_scroll_stop_line(vp, -1);
}
@@ -161,7 +162,7 @@ void lcd_remote_stop_scroll(void)
}
/* Stop scrolling line y in the specified viewport, or all lines if y < 0 */
-void lcd_remote_scroll_stop_line(struct viewport* current_vp, int y)
+void lcd_remote_scroll_stop_line(const struct viewport* current_vp, int y)
{
int i = 0;
@@ -174,7 +175,8 @@ void lcd_remote_scroll_stop_line(struct viewport* current_vp, int y)
the last item to position i */
if ((i + 1) != lcd_remote_scroll_info.lines)
{
- lcd_remote_scroll_info.scroll[i] = lcd_remote_scroll_info.scroll[lcd_remote_scroll_info.lines-1];
+ lcd_remote_scroll_info.scroll[i] =
+ lcd_remote_scroll_info.scroll[lcd_remote_scroll_info.lines-1];
}
lcd_remote_scroll_info.lines--;
@@ -191,7 +193,7 @@ void lcd_remote_scroll_stop_line(struct viewport* current_vp, int y)
}
/* Stop all scrolling lines in the specified viewport */
-void lcd_remote_scroll_stop(struct viewport* vp)
+void lcd_remote_scroll_stop(const struct viewport* vp)
{
lcd_remote_scroll_stop_line(vp, -1);
}
@@ -346,3 +348,4 @@ void scroll_init(void)
IF_PRIO(, PRIORITY_USER_INTERFACE)
IF_COP(, CPU));
}
+