From 891b78a62c5f65163f81e39b3fa679210611f1d6 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 24 Feb 2018 11:31:34 +1000 Subject: [PATCH] Fix for ST7735 driver --- drivers/gdisp/ST7735/gdisp_lld_ST7735.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gdisp/ST7735/gdisp_lld_ST7735.c b/drivers/gdisp/ST7735/gdisp_lld_ST7735.c index c0bf2164..5d97df48 100644 --- a/drivers/gdisp/ST7735/gdisp_lld_ST7735.c +++ b/drivers/gdisp/ST7735/gdisp_lld_ST7735.c @@ -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);