diff options
author | Joel Bodenmann <joel@unormal.org> | 2013-09-29 18:43:59 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2013-09-29 18:43:59 +0200 |
commit | 3b1b5a4208ab8c29c9bb2f6eb448fd60e6cfe490 (patch) | |
tree | 655143d78560c9ad705028195141beb87ee55605 /drivers/gdisp | |
parent | 0f7777395b30ea8cec02b3230ed250eee7d34f16 (diff) | |
download | uGFX-3b1b5a4208ab8c29c9bb2f6eb448fd60e6cfe490.tar.gz uGFX-3b1b5a4208ab8c29c9bb2f6eb448fd60e6cfe490.tar.bz2 uGFX-3b1b5a4208ab8c29c9bb2f6eb448fd60e6cfe490.zip |
SSD1289 fixes
Diffstat (limited to 'drivers/gdisp')
-rw-r--r-- | drivers/gdisp/SSD1289/gdisp_lld.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gdisp/SSD1289/gdisp_lld.c b/drivers/gdisp/SSD1289/gdisp_lld.c index 84ffa6d1..72db9914 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld.c +++ b/drivers/gdisp/SSD1289/gdisp_lld.c @@ -47,7 +47,7 @@ #define delay(us) gfxSleepMicroseconds(us)
#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 0x004F is 9 bit
* 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);
@@ -108,11 +108,11 @@ static void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) { break;
}
- set_cursor(x, y);
+ set_cursor(g, x, y);
}
-static inline void reset_viewport(void) {
- set_viewport(0, 0, g->g.Width, g->g.Height);
+static inline void reset_viewport(GDISPDriver* g) {
+ 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
LLDSPEC void gdisp_lld_write_start(GDISPDriver *g) {
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();
}
LLDSPEC void gdisp_lld_write_color(GDISPDriver *g) {
- write_data(color);
+ write_data(g->p.color);
}
LLDSPEC void gdisp_lld_write_stop(GDISPDriver *g) {
stream_stop();
@@ -214,7 +214,7 @@ LLDSPEC bool_t gdisp_lld_init(GDISPDriver *g) { uint16_t dummy;
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();
setreadmode();
dummy = read_data(); // dummy read
|