add hardware clear
This commit is contained in:
parent
96a5f5fbea
commit
3b12678e6e
2 changed files with 12 additions and 1 deletions
|
@ -151,6 +151,16 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if GDISP_HARDWARE_CLEARS
|
||||
LLDSPEC void gdisp_lld_clear(GDisplay *g) {
|
||||
uint8_t fill = (g->p.color == Black) ? 0 : 0xff;
|
||||
int bytes = GDISP_SCREEN_WIDTH * GDISP_SCREEN_HEIGHT/8;
|
||||
int off;
|
||||
for (off = 0; off < bytes; off++)
|
||||
RAM(g)[off] = fill;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if GDISP_HARDWARE_DRAWPIXEL
|
||||
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
|
||||
coord_t x, y;
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
#define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing
|
||||
#define GDISP_HARDWARE_DRAWPIXEL TRUE
|
||||
#define GDISP_HARDWARE_PIXELREAD TRUE
|
||||
#define GDISP_HARDWARE_CONTROL TRUE
|
||||
#define GDISP_HARDWARE_CONTROL TRUE
|
||||
#define GDISP_HARDWARE_CLEARS TRUE
|
||||
|
||||
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue