aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c')
-rw-r--r--drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c7
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);