SSD1289 fixes
This commit is contained in:
parent
0f7777395b
commit
3b1b5a4208
1 changed files with 8 additions and 8 deletions
|
@ -47,7 +47,7 @@
|
||||||
#define delay(us) gfxSleepMicroseconds(us)
|
#define delay(us) gfxSleepMicroseconds(us)
|
||||||
#define delayms(ms) gfxSleepMilliseconds(ms)
|
#define delayms(ms) gfxSleepMilliseconds(ms)
|
||||||
|
|
||||||
static inline void set_cursor(coord_t x, coord_t y) {
|
static inline void set_cursor(GDISPDriver* g, coord_t x, coord_t y) {
|
||||||
/* Reg 0x004E is an 8 bit value
|
/* Reg 0x004E is an 8 bit value
|
||||||
* Reg 0x004F is 9 bit
|
* Reg 0x004F is 9 bit
|
||||||
* Use a bit mask to make sure they are not set too high
|
* Use a bit mask to make sure they are not set too high
|
||||||
|
@ -72,7 +72,7 @@ static inline void set_cursor(coord_t x, coord_t y) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
|
static void set_viewport(GDISPDriver* g, coord_t x, coord_t y, coord_t cx, coord_t cy) {
|
||||||
|
|
||||||
//set_cursor(x, y);
|
//set_cursor(x, y);
|
||||||
|
|
||||||
|
@ -108,11 +108,11 @@ static void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_cursor(x, y);
|
set_cursor(g, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void reset_viewport(void) {
|
static inline void reset_viewport(GDISPDriver* g) {
|
||||||
set_viewport(0, 0, g->g.Width, g->g.Height);
|
set_viewport(g, 0, 0, g->g.Width, g->g.Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -197,11 +197,11 @@ LLDSPEC bool_t gdisp_lld_init(GDISPDriver *g) {
|
||||||
#if GDISP_HARDWARE_STREAM_WRITE
|
#if GDISP_HARDWARE_STREAM_WRITE
|
||||||
LLDSPEC void gdisp_lld_write_start(GDISPDriver *g) {
|
LLDSPEC void gdisp_lld_write_start(GDISPDriver *g) {
|
||||||
acquire_bus();
|
acquire_bus();
|
||||||
set_viewport(g->p.x, g->p.y, g->p.cx, g->p.cy);
|
set_viewport(g, g->p.x, g->p.y, g->p.cx, g->p.cy);
|
||||||
stream_start();
|
stream_start();
|
||||||
}
|
}
|
||||||
LLDSPEC void gdisp_lld_write_color(GDISPDriver *g) {
|
LLDSPEC void gdisp_lld_write_color(GDISPDriver *g) {
|
||||||
write_data(color);
|
write_data(g->p.color);
|
||||||
}
|
}
|
||||||
LLDSPEC void gdisp_lld_write_stop(GDISPDriver *g) {
|
LLDSPEC void gdisp_lld_write_stop(GDISPDriver *g) {
|
||||||
stream_stop();
|
stream_stop();
|
||||||
|
@ -214,7 +214,7 @@ LLDSPEC bool_t gdisp_lld_init(GDISPDriver *g) {
|
||||||
uint16_t dummy;
|
uint16_t dummy;
|
||||||
|
|
||||||
acquire_bus();
|
acquire_bus();
|
||||||
set_viewport(g->p.x, g->p.y, g->p.cx, g->p.cy);
|
set_viewport(g, g->p.x, g->p.y, g->p.cx, g->p.cy);
|
||||||
stream_start();
|
stream_start();
|
||||||
setreadmode();
|
setreadmode();
|
||||||
dummy = read_data(); // dummy read
|
dummy = read_data(); // dummy read
|
||||||
|
|
Loading…
Add table
Reference in a new issue