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/ILI9481 | |
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/ILI9481')
-rw-r--r-- | drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c b/drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c index 49e28b23..2b2f0917 100644 --- a/drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c +++ b/drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c @@ -211,7 +211,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { set_viewport(g); } 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); @@ -226,7 +226,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); |