aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp/ST7735/gdisp_lld_ST7735.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gdisp/ST7735/gdisp_lld_ST7735.c')
-rw-r--r--drivers/gdisp/ST7735/gdisp_lld_ST7735.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gdisp/ST7735/gdisp_lld_ST7735.c b/drivers/gdisp/ST7735/gdisp_lld_ST7735.c
index df4b75ef..bc6b8084 100644
--- a/drivers/gdisp/ST7735/gdisp_lld_ST7735.c
+++ b/drivers/gdisp/ST7735/gdisp_lld_ST7735.c
@@ -260,7 +260,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
/* Initialise the GDISP structure */
g->g.Width = GDISP_SCREEN_WIDTH;
g->g.Height = GDISP_SCREEN_HEIGHT;
- g->g.Orientation = GDISP_ROTATE_0;
+ g->g.Orientation = gOrientation0;
g->g.Powermode = gPowerOn;
g->g.Backlight = GDISP_INITIAL_BACKLIGHT;
g->g.Contrast = GDISP_INITIAL_CONTRAST;
@@ -344,10 +344,10 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
return;
case GDISP_CONTROL_ORIENTATION:
- if (g->g.Orientation == (orientation_t)g->p.ptr)
+ if (g->g.Orientation == (gOrientation)g->p.ptr)
return;
- switch((orientation_t)g->p.ptr) {
- case GDISP_ROTATE_0:
+ switch((gOrientation)g->p.ptr) {
+ case gOrientation0:
acquire_bus(g);
write_cmd(g, ST7735_MADCTL);
write_data_byte(g, 0xC0|ST7735_MADCTRL_COLOR);
@@ -355,7 +355,7 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
g->g.Width = GDISP_SCREEN_WIDTH;
release_bus(g);
break;
- case GDISP_ROTATE_90:
+ case gOrientation90:
acquire_bus(g);
write_cmd(g, ST7735_MADCTL);
write_data_byte(g, 0xA0|ST7735_MADCTRL_COLOR);
@@ -363,7 +363,7 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
g->g.Width = GDISP_SCREEN_HEIGHT;
release_bus(g);
break;
- case GDISP_ROTATE_180:
+ case gOrientation180:
acquire_bus(g);
write_cmd(g, ST7735_MADCTL);
write_data_byte(g, 0x00|ST7735_MADCTRL_COLOR);
@@ -371,7 +371,7 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
g->g.Width = GDISP_SCREEN_WIDTH;
release_bus(g);
break;
- case GDISP_ROTATE_270:
+ case gOrientation270:
acquire_bus(g);
write_cmd(g, ST7735_MADCTL);
write_data_byte(g, 0x60|ST7735_MADCTRL_COLOR);
@@ -382,7 +382,7 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
default:
return;
}
- g->g.Orientation = (orientation_t)g->p.ptr;
+ g->g.Orientation = (gOrientation)g->p.ptr;
return;
case GDISP_CONTROL_BACKLIGHT:
if ((unsigned)g->p.ptr > 100)