diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-11-05 19:34:12 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-11-05 19:34:12 +1000 |
commit | a8e860678df38fdb44f94cacae52e8d54f4374ff (patch) | |
tree | aa718324e163f6c4b9b06805674655dce17e2c96 /drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c | |
parent | 250adaf028848c0aa0dfa2029b722274cb7a6d6a (diff) | |
download | uGFX-a8e860678df38fdb44f94cacae52e8d54f4374ff.tar.gz uGFX-a8e860678df38fdb44f94cacae52e8d54f4374ff.tar.bz2 uGFX-a8e860678df38fdb44f94cacae52e8d54f4374ff.zip |
New GDISP now supports multiple controllers with different pixel formats.
You can now have a main color display and a secondary monochrome display.
You can now optionally set GDISP_PIXELFORMAT to any color or grayscale format for your application and the driver will internally convert to the display hardware format.
Diffstat (limited to 'drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c')
-rw-r--r-- | drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c b/drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c index a18c2d82..e65e0a77 100644 --- a/drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c +++ b/drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c @@ -204,7 +204,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { #endif } LLDSPEC void gdisp_lld_write_color(GDisplay *g) { - write_data(g, g->p.color); + write_data(g, COLOR2NATIVE(g->p.color)); } LLDSPEC void gdisp_lld_write_stop(GDisplay *g) { release_bus(g); @@ -225,7 +225,10 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { dummy_read(g); } LLDSPEC color_t gdisp_lld_read_color(GDisplay *g) { - return read_data(g); + uint16_t data; + + data = read_data(g); + return NATIVE2COLOR(data); } LLDSPEC void gdisp_lld_read_stop(GDisplay *g) { setwritemode(g); |