diff options
Diffstat (limited to 'firmware/export/lcd.h')
-rw-r--r-- | firmware/export/lcd.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 77e79799f8..5f93e7cbc3 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -113,22 +113,23 @@ extern void lcd_jump_scroll(int mode); /* 0=off, 1=once, ..., ALWAYS */ | |||
113 | extern void lcd_jump_scroll_delay(int ms); | 113 | extern void lcd_jump_scroll_delay(int ms); |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) | 116 | /* Draw modes */ |
117 | |||
118 | /* draw modes */ | ||
119 | #define DRMODE_COMPLEMENT 0 | 117 | #define DRMODE_COMPLEMENT 0 |
120 | #define DRMODE_BG 1 | 118 | #define DRMODE_BG 1 |
121 | #define DRMODE_FG 2 | 119 | #define DRMODE_FG 2 |
122 | #define DRMODE_SOLID 3 | 120 | #define DRMODE_SOLID 3 |
123 | #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */ | 121 | #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */ |
124 | 122 | ||
123 | /* Low-level drawing function types */ | ||
124 | typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */ | ||
125 | typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits); | ||
126 | |||
127 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) | ||
128 | |||
125 | #define DRAW_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] |= (1<<((y)&7)) | 129 | #define DRAW_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] |= (1<<((y)&7)) |
126 | #define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] &= ~(1<<((y)&7)) | 130 | #define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] &= ~(1<<((y)&7)) |
127 | #define INVERT_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7)) | 131 | #define INVERT_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7)) |
128 | 132 | ||
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); | ||
131 | |||
132 | /* Memory copy of display bitmap */ | 133 | /* Memory copy of display bitmap */ |
133 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 134 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; |
134 | 135 | ||
@@ -156,7 +157,8 @@ extern void lcd_drawrect(int x, int y, int width, int height); | |||
156 | extern void lcd_fillrect(int x, int y, int width, int height); | 157 | extern void lcd_fillrect(int x, int y, int width, int height); |
157 | extern void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, | 158 | extern void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, |
158 | int stride, int x, int y, int width, int height); | 159 | int stride, int x, int y, int width, int height); |
159 | extern void lcd_bitmap(const unsigned char *src, int x, int y, int nx, int ny); | 160 | extern void lcd_bitmap(const unsigned char *src, int x, int y, int width, |
161 | int height); | ||
160 | extern void lcd_putsxy(int x, int y, const unsigned char *string); | 162 | extern void lcd_putsxy(int x, int y, const unsigned char *string); |
161 | 163 | ||
162 | extern void lcd_invertscroll(int x, int y); | 164 | extern void lcd_invertscroll(int x, int y); |