diff options
Diffstat (limited to 'drivers/gdisp/ST7735/gdisp_lld_ST7735.c')
-rw-r--r-- | drivers/gdisp/ST7735/gdisp_lld_ST7735.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gdisp/ST7735/gdisp_lld_ST7735.c b/drivers/gdisp/ST7735/gdisp_lld_ST7735.c index c0bf2164..ea1966a5 100644 --- a/drivers/gdisp/ST7735/gdisp_lld_ST7735.c +++ b/drivers/gdisp/ST7735/gdisp_lld_ST7735.c @@ -43,19 +43,19 @@ // Define one of supported type, if not defined yet #if !defined(ST7735_TYPE_R) && !defined(ST7735_TYPE_B) // It seems all modern boards is 7735R - #define ST7735_TYPE_R TRUE + #define ST7735_TYPE_R GFXON #endif // Define one of supported color packing, if not defined yet #if !defined(ST7735_COLOR_RGB) && !defined(ST7735_COLOR_BRG) // It seems all modern boards is RGB - #define ST7735_COLOR_RGB TRUE + #define ST7735_COLOR_RGB GFXON #endif // Strange boars with shifted coords #if !defined (ST7735_SHIFTED_COORDS) - #define ST7735_SHIFTED_COORDS FALSE + #define ST7735_SHIFTED_COORDS GFXOFF #endif @@ -193,12 +193,12 @@ static const unsigned char ST7735_NORON , DELAY, // 3: Normal display on, no args, w/delay 10, // 10 ms delay ST7735_DISPON , DELAY, // 4: Main screen turn on, no args w/delay - 100 + 100 }; // 100 ms delay #endif -static void execute_cmds (const uint8_t *addr) { +static void execute_cmds(GDisplay *g, const uint8_t *addr) { unsigned int cmds = *addr++; while (cmds--) { @@ -211,7 +211,7 @@ static void execute_cmds (const uint8_t *addr) { if (ms) { ms = *addr++; gfxSleepMilliseconds(ms==255?500:ms); - } + } } } @@ -231,7 +231,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { // Get the bus for the following initialisation commands acquire_bus(g); - execute_cmds (init_cmds); + execute_cmds(g, init_cmds); release_bus(g); // Finish Init @@ -252,7 +252,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { static void set_viewport(GDisplay *g) { write_cmd (g, ST7735_CASET); - write_data (g, g->p.x+ST7735_COL_SHIFT); + write_data (g, g->p.x+ST7735_COL_SHIFT); write_data (g, g->p.x+g->p.cx-1+ST7735_COL_SHIFT); write_cmd (g, ST7735_RASET); write_data (g, g->p.y+ST7735_ROW_SHIFT); |