Improving UC8173 driver
This commit is contained in:
parent
6956df1652
commit
7cc28e8f0d
@ -32,7 +32,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PRIV(g) ((UC8173_Private*)((g)->priv))
|
#define PRIV(g) ((UC8173_Private*)((g)->priv))
|
||||||
#define FRAMEBUFFER(g) (PRIV(g)->framebuffer)
|
#define FRAMEBUFFER(g) ((uint8_t*)(PRIV(g))+1)
|
||||||
#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER << 0)
|
#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER << 0)
|
||||||
|
|
||||||
#if GDISP_LLD_PIXELFORMAT == GDISP_PIXELFORMAT_MONO
|
#if GDISP_LLD_PIXELFORMAT == GDISP_PIXELFORMAT_MONO
|
||||||
@ -56,7 +56,6 @@ typedef struct UC8173_Private {
|
|||||||
coord_t flushWindowY;
|
coord_t flushWindowY;
|
||||||
coord_t flushWindowWidth;
|
coord_t flushWindowWidth;
|
||||||
coord_t flushWindowHeight;
|
coord_t flushWindowHeight;
|
||||||
uint8_t* framebuffer;
|
|
||||||
} UC8173_Private;
|
} UC8173_Private;
|
||||||
|
|
||||||
// This function rounds a given integer up to a specified multiple. Note, multiple must be a power of 2!
|
// This function rounds a given integer up to a specified multiple. Note, multiple must be a power of 2!
|
||||||
@ -149,7 +148,6 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay* g)
|
|||||||
PRIV(g)->flushWindowY = 0;
|
PRIV(g)->flushWindowY = 0;
|
||||||
PRIV(g)->flushWindowWidth = GDISP_SCREEN_WIDTH;
|
PRIV(g)->flushWindowWidth = GDISP_SCREEN_WIDTH;
|
||||||
PRIV(g)->flushWindowHeight = GDISP_SCREEN_HEIGHT;
|
PRIV(g)->flushWindowHeight = GDISP_SCREEN_HEIGHT;
|
||||||
PRIV(g)->framebuffer = (uint8_t*)(PRIV(g) + offsetof(UC8173_Private, framebuffer));
|
|
||||||
|
|
||||||
// Initialise the board interface
|
// Initialise the board interface
|
||||||
if (!init_board(g)) {
|
if (!init_board(g)) {
|
||||||
@ -368,7 +366,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay* g)
|
|||||||
y = g->p.x;
|
y = g->p.x;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modify the framebuffer content
|
// Modify the framebuffer content
|
||||||
p = &FRAMEBUFFER(g)[xyaddr(x,y)];
|
p = &FRAMEBUFFER(g)[xyaddr(x,y)];
|
||||||
*p &=~ xybit(x, LLDCOLOR_MASK());
|
*p &=~ xybit(x, LLDCOLOR_MASK());
|
||||||
|
Loading…
Reference in New Issue
Block a user