aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-02-24 11:31:34 +1000
committerinmarket <andrewh@inmarket.com.au>2018-02-24 11:31:34 +1000
commit891b78a62c5f65163f81e39b3fa679210611f1d6 (patch)
tree25e60abdfcb9f21a0db5337dcaba3ece512b4c03 /drivers
parent013bac84cefa14d333a59e16c3fca1b85f05a090 (diff)
downloaduGFX-891b78a62c5f65163f81e39b3fa679210611f1d6.tar.gz
uGFX-891b78a62c5f65163f81e39b3fa679210611f1d6.tar.bz2
uGFX-891b78a62c5f65163f81e39b3fa679210611f1d6.zip
Fix for ST7735 driver
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gdisp/ST7735/gdisp_lld_ST7735.c10
1 files 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);