diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/lcd-remote.h | 33 | ||||
-rw-r--r-- | firmware/export/lcd.h | 10 |
2 files changed, 26 insertions, 17 deletions
diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h index c5793eda93..17025a7421 100644 --- a/firmware/export/lcd-remote.h +++ b/firmware/export/lcd-remote.h | |||
@@ -26,9 +26,9 @@ | |||
26 | 26 | ||
27 | #ifdef HAVE_REMOTE_LCD | 27 | #ifdef HAVE_REMOTE_LCD |
28 | 28 | ||
29 | #define REMOTE_DRAW_PIXEL(x,y) lcd_remote_framebuffer[(y)/8][(x)] |= (1<<((y)&7)) | 29 | #define REMOTE_DRAW_PIXEL(x,y) lcd_remote_framebuffer[(y)>>3][(x)] |= (1<<((y)&7)) |
30 | #define REMOTE_CLEAR_PIXEL(x,y) lcd_remote_framebuffer[(y)/8][(x)] &= ~(1<<((y)&7)) | 30 | #define REMOTE_CLEAR_PIXEL(x,y) lcd_remote_framebuffer[(y)>>3][(x)] &= ~(1<<((y)&7)) |
31 | #define REMOTE_INVERT_PIXEL(x,y) lcd_remote_framebuffer[(y)/8][(x)] ^= (1<<((y)&7)) | 31 | #define REMOTE_INVERT_PIXEL(x,y) lcd_remote_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7)) |
32 | 32 | ||
33 | #define STYLE_DEFAULT 0 | 33 | #define STYLE_DEFAULT 0 |
34 | #define STYLE_INVERT 1 | 34 | #define STYLE_INVERT 1 |
@@ -48,11 +48,11 @@ extern void lcd_remote_stop_scroll(void); | |||
48 | extern void lcd_remote_scroll_speed(int speed); | 48 | extern void lcd_remote_scroll_speed(int speed); |
49 | extern void lcd_remote_scroll_delay(int ms); | 49 | extern void lcd_remote_scroll_delay(int ms); |
50 | extern void lcd_remote_puts_scroll(int x, int y, const unsigned char* string); | 50 | extern void lcd_remote_puts_scroll(int x, int y, const unsigned char* string); |
51 | extern void lcd_remote_puts_scroll_style(int x, int y, const unsigned char* string, | 51 | extern void lcd_remote_puts_scroll_style(int x, int y, |
52 | int style); | 52 | const unsigned char* string, int style); |
53 | 53 | ||
54 | extern void lcd_remote_update(void); | 54 | extern void lcd_remote_update(void); |
55 | extern void lcd_remote_update_rect(int x_start, int y, int width, int height); | 55 | extern void lcd_remote_update_rect(int x, int y, int width, int height); |
56 | 56 | ||
57 | /* Memory copy of display bitmap */ | 57 | /* Memory copy of display bitmap */ |
58 | extern unsigned char lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH]; | 58 | extern unsigned char lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH]; |
@@ -60,23 +60,28 @@ extern unsigned char lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDT | |||
60 | extern void lcd_remote_set_invert_display(bool yesno); | 60 | extern void lcd_remote_set_invert_display(bool yesno); |
61 | extern void lcd_remote_set_flip(bool yesno); | 61 | extern void lcd_remote_set_flip(bool yesno); |
62 | extern void lcd_remote_roll(int pixels); | 62 | extern void lcd_remote_roll(int pixels); |
63 | |||
64 | extern void lcd_remote_set_drawmode(int mode); | ||
65 | extern int lcd_remote_get_drawmode(void); | ||
63 | extern void lcd_remote_setmargins(int xmargin, int ymargin); | 66 | extern void lcd_remote_setmargins(int xmargin, int ymargin); |
64 | extern int lcd_remote_getxmargin(void); | 67 | extern int lcd_remote_getxmargin(void); |
65 | extern int lcd_remote_getymargin(void); | 68 | extern int lcd_remote_getymargin(void); |
66 | extern void lcd_remote_setfont(int font); | 69 | extern void lcd_remote_setfont(int font); |
67 | extern int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h); | 70 | extern int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h); |
71 | |||
68 | extern void lcd_remote_drawpixel(int x, int y); | 72 | extern void lcd_remote_drawpixel(int x, int y); |
69 | extern void lcd_remote_clearpixel(int x, int y); | ||
70 | extern void lcd_remote_invertpixel(int x, int y); | ||
71 | extern void lcd_remote_drawline(int x1, int y1, int x2, int y2); | 73 | extern void lcd_remote_drawline(int x1, int y1, int x2, int y2); |
72 | extern void lcd_remote_clearline(int x1, int y1, int x2, int y2); | 74 | extern void lcd_remote_hline(int x1, int x2, int y); |
73 | extern void lcd_remote_drawrect(int x, int y, int nx, int ny); | 75 | extern void lcd_remote_vline(int x, int y1, int y2); |
74 | extern void lcd_remote_clearrect(int x, int y, int nx, int ny); | 76 | extern void lcd_remote_drawrect(int x, int y, int width, int height); |
75 | extern void lcd_remote_fillrect(int x, int y, int nx, int ny); | 77 | extern void lcd_remote_fillrect(int x, int y, int width, int height); |
76 | extern void lcd_remote_invertrect(int x, int y, int nx, int ny); | 78 | extern void lcd_remote_bitmap_part(const unsigned char *src, int src_x, |
79 | int src_y, int stride, int x, int y, | ||
80 | int width, int height); | ||
77 | extern void lcd_remote_bitmap(const unsigned char *src, int x, int y, | 81 | extern void lcd_remote_bitmap(const unsigned char *src, int x, int y, |
78 | int nx, int ny, bool clear); | 82 | int width, int height); |
79 | extern void lcd_remote_putsxy(int x, int y, const unsigned char *string); | 83 | extern void lcd_remote_putsxy(int x, int y, const unsigned char *string); |
84 | |||
80 | extern void lcd_remote_invertscroll(int x, int y); | 85 | extern void lcd_remote_invertscroll(int x, int y); |
81 | extern void lcd_remote_bidir_scroll(int threshold); | 86 | extern void lcd_remote_bidir_scroll(int threshold); |
82 | extern void lcd_remote_scroll_step(int pixels); | 87 | extern void lcd_remote_scroll_step(int pixels); |
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 6a6a8e8697..77e79799f8 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -122,9 +122,9 @@ extern void lcd_jump_scroll_delay(int ms); | |||
122 | #define DRMODE_SOLID 3 | 122 | #define DRMODE_SOLID 3 |
123 | #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */ | 123 | #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */ |
124 | 124 | ||
125 | #define DRAW_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] |= (1<<((y)&7)) | 125 | #define DRAW_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] |= (1<<((y)&7)) |
126 | #define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] &= ~(1<<((y)&7)) | 126 | #define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] &= ~(1<<((y)&7)) |
127 | #define INVERT_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] ^= (1<<((y)&7)) | 127 | #define INVERT_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7)) |
128 | 128 | ||
129 | typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */ | 129 | typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */ |
130 | typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits); | 130 | typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits); |
@@ -144,6 +144,10 @@ extern int lcd_getymargin(void); | |||
144 | extern void lcd_setfont(int font); | 144 | extern void lcd_setfont(int font); |
145 | extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); | 145 | extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); |
146 | 146 | ||
147 | /* low level drawing function pointer arrays */ | ||
148 | extern lcd_pixelfunc_type* lcd_pixelfuncs[8]; | ||
149 | extern lcd_blockfunc_type* lcd_blockfuncs[8]; | ||
150 | |||
147 | extern void lcd_drawpixel(int x, int y); | 151 | extern void lcd_drawpixel(int x, int y); |
148 | extern void lcd_drawline(int x1, int y1, int x2, int y2); | 152 | extern void lcd_drawline(int x1, int y1, int x2, int y2); |
149 | extern void lcd_hline(int x1, int x2, int y); | 153 | extern void lcd_hline(int x1, int x2, int y); |