aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/modules/graph/result-640x480.gifbin11300 -> 11301 bytes
-rw-r--r--drivers/gdisp/ILI9320/gdisp_lld.c48
-rw-r--r--drivers/gdisp/ILI9320/gdisp_lld_board_example.h12
-rw-r--r--drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h12
-rw-r--r--drivers/gdisp/ILI9320/gdisp_lld_config.h1
-rw-r--r--drivers/gdisp/ILI9325/gdisp_lld.c48
-rw-r--r--drivers/gdisp/ILI9325/gdisp_lld_board_example.h12
-rw-r--r--drivers/gdisp/ILI9325/gdisp_lld_board_hy_stm32_100p.h12
-rw-r--r--drivers/gdisp/ILI9325/gdisp_lld_config.h1
-rw-r--r--drivers/gdisp/Nokia6610GE12/gdisp_lld.c16
-rw-r--r--drivers/gdisp/Nokia6610GE12/gdisp_lld_config.h1
-rw-r--r--drivers/gdisp/Nokia6610GE8/gdisp_lld.c16
-rw-r--r--drivers/gdisp/Nokia6610GE8/gdisp_lld_config.h1
-rw-r--r--drivers/gdisp/S6D1121/gdisp_lld.c18
-rw-r--r--drivers/gdisp/S6D1121/gdisp_lld_config.h1
-rw-r--r--drivers/gdisp/SSD1289/gdisp_lld.c18
-rw-r--r--drivers/gdisp/SSD1289/gdisp_lld_config.h1
-rw-r--r--drivers/gdisp/SSD1963/gdisp_lld.c14
-rw-r--r--drivers/gdisp/TestStub/gdisp_lld.c8
-rw-r--r--drivers/gdisp/TestStub/gdisp_lld_config.h1
-rw-r--r--drivers/gdisp/VMT/gdisp_lld.c271
-rw-r--r--drivers/gdisp/VMT/gdisp_lld.mk7
-rw-r--r--drivers/gdisp/VMT/gdisp_lld_config.h71
-rw-r--r--drivers/gdisp/VMT/gdisp_lld_driver1.c52
-rw-r--r--drivers/gdisp/VMT/gdisp_lld_driver2.c52
-rw-r--r--drivers/gdisp/VMT/readme.txt23
-rw-r--r--drivers/multiple/Win32/gdisp_lld.c16
-rw-r--r--drivers/multiple/Win32/gdisp_lld_config.h1
-rw-r--r--gfxconf.example.h210
-rw-r--r--include/gdisp/gdisp.h38
-rw-r--r--include/gdisp/lld/emulation.c182
-rw-r--r--include/gdisp/lld/gdisp_lld.h53
-rw-r--r--include/gdisp/options.h7
-rw-r--r--releases.txt2
-rw-r--r--src/gdisp/gdisp.c42
-rw-r--r--src/gwin/gwin.mk2
36 files changed, 389 insertions, 881 deletions
diff --git a/demos/modules/graph/result-640x480.gif b/demos/modules/graph/result-640x480.gif
index d96c7c5a..6fc8b30c 100644
--- a/demos/modules/graph/result-640x480.gif
+++ b/demos/modules/graph/result-640x480.gif
Binary files differ
diff --git a/drivers/gdisp/ILI9320/gdisp_lld.c b/drivers/gdisp/ILI9320/gdisp_lld.c
index 202f06dd..6a324cd4 100644
--- a/drivers/gdisp/ILI9320/gdisp_lld.c
+++ b/drivers/gdisp/ILI9320/gdisp_lld.c
@@ -81,28 +81,28 @@ static __inline void lld_lcdDelay(uint16_t us) {
}
static __inline void lld_lcdWriteIndex(uint16_t index) {
- GDISP_LLD(write_index)(index);
+ lld_gdisp_write_index(index);
}
static __inline void lld_lcdWriteData(uint16_t data) {
- GDISP_LLD(write_data)(data);
+ lld_gdisp_write_data(data);
}
static __inline void lld_lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
- GDISP_LLD(write_index)(lcdReg);
- GDISP_LLD(write_data)(lcdRegValue);
+ lld_gdisp_write_index(lcdReg);
+ lld_gdisp_write_data(lcdRegValue);
}
static __inline uint16_t lld_lcdReadData(void) {
/* fix this! */
- //return GDISP_LLD(read_data);
+ //return lld_gdisp_read_data;
return GDISP_RAM;
}
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
volatile uint16_t dummy;
- GDISP_LLD(write_index)(lcdReg);
+ lld_gdisp_write_index(lcdReg);
dummy = lld_lcdReadData();
(void)dummy;
@@ -143,14 +143,14 @@ static __inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
buffer[i] = lld_lcdReadData();
}
-bool_t GDISP_LLD(init)(void) {
+bool_t lld_gdisp_init(void) {
/* Initialise your display */
- GDISP_LLD(init_board)();
+ lld_gdisp_init_board();
/* Hardware reset */
- GDISP_LLD(setpin_reset)(TRUE);
+ lld_gdisp_reset_pin(TRUE);
lld_lcdDelay(1000);
- GDISP_LLD(setpin_reset)(FALSE);
+ lld_gdisp_reset_pin(FALSE);
lld_lcdDelay(1000);
DISPLAY_CODE = lld_lcdReadReg(0);
@@ -215,7 +215,7 @@ bool_t GDISP_LLD(init)(void) {
lld_lcdWriteReg(0x0007, 0x0173); //display On
// Turn on the backlight
- GDISP_LLD(set_backlight)(GDISP_INITIAL_BACKLIGHT);
+ lld_gdisp_backlight(GDISP_INITIAL_BACKLIGHT);
/* Initialise the GDISP structure */
GDISP.Width = GDISP_SCREEN_WIDTH;
@@ -298,7 +298,7 @@ static __inline void lld_lcdResetViewPort(void) {
}
}
-void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
+void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0 || y < GDISP.clipy0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return;
#endif
@@ -307,7 +307,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
}
#if GDISP_HARDWARE_CLEARS || defined(__DOXYGEN__)
- void GDISP_LLD(clear)(color_t color) {
+ void lld_gdisp_clear(color_t color) {
unsigned i;
lld_lcdSetCursor(0, 0);
@@ -321,7 +321,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if GDISP_HARDWARE_FILLS || defined(__DOXYGEN__)
- void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
+ void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0) { cx -= GDISP.clipx0 - x; x = GDISP.clipx0; }
if (y < GDISP.clipy0) { cy -= GDISP.clipy0 - y; y = GDISP.clipy0; }
@@ -343,7 +343,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if GDISP_HARDWARE_BITFILLS || defined(__DOXYGEN__)
- void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
+ void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
coord_t endx, endy;
unsigned lg;
@@ -372,7 +372,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if (GDISP_NEED_PIXELREAD && GDISP_HARDWARE_PIXELREAD) || defined(__DOXYGEN__)
- color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
+ color_t lld_gdisp_get_pixel_color(coord_t x, coord_t y) {
color_t color;
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
@@ -392,7 +392,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if (GDISP_NEED_SCROLL && GDISP_HARDWARE_SCROLL) || defined(__DOXYGEN__)
- void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
+ void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
static color_t buf[((GDISP_SCREEN_HEIGHT > GDISP_SCREEN_WIDTH ) ? GDISP_SCREEN_HEIGHT : GDISP_SCREEN_WIDTH)];
coord_t row0, row1;
unsigned i, gap, abslines;
@@ -445,7 +445,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if (GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL) || defined(__DOXYGEN__)
- void GDISP_LLD(control)(unsigned what, void *value) {
+ void lld_gdisp_control(unsigned what, void *value) {
switch(what) {
case GDISP_CONTROL_POWER:
if(GDISP.Powermode == (gdisp_powermode_t)value)
@@ -457,7 +457,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
lld_lcdWriteReg(0x0011, 0x0000);
lld_lcdWriteReg(0x0012, 0x0000);
lld_lcdWriteReg(0x0013, 0x0000);
- GDISP_LLD(set_backlight)(0);
+ lld_gdisp_backlight(0);
break;
case powerOn:
@@ -476,9 +476,9 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
lld_lcdWriteReg(0x0029, 0x0009); /* VCM[4:0] for VCOMH */
lld_lcdDelay(500);
lld_lcdWriteReg(0x0007, 0x0173); /* 262K color and display ON */
- GDISP_LLD(set_backlight)(GDISP.Backlight);
+ lld_gdisp_backlight(GDISP.Backlight);
if(GDISP.Powermode != powerSleep || GDISP.Powermode != powerDeepSleep)
- GDISP_LLD(init)();
+ lld_gdisp_init();
break;
case powerSleep:
@@ -489,7 +489,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
lld_lcdWriteReg(0x0013, 0x0000); /* VDV[4:0] for VCOM amplitude */
lld_lcdDelay(2000); /* Dis-charge capacitor power voltage */
lld_lcdWriteReg(0x0010, 0x0002); /* SAP, BT[3:0], APE, AP, DSTB, SLP */
- GDISP_LLD(set_backlight)(0);
+ lld_gdisp_backlight(0);
break;
case powerDeepSleep:
@@ -500,7 +500,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
lld_lcdWriteReg(0x0013, 0x0000); /* VDV[4:0] for VCOM amplitude */
lld_lcdDelay(2000); /* Dis-charge capacitor power voltage */
lld_lcdWriteReg(0x0010, 0x0004); /* SAP, BT[3:0], APE, AP, DSTB, SLP */
- GDISP_LLD(set_backlight)(0);
+ lld_gdisp_backlight(0);
break;
default:
@@ -554,7 +554,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
case GDISP_CONTROL_BACKLIGHT:
if((unsigned)value > 100) value = (void *)100;
- GDISP_LLD(set_backlight)((unsigned)value);
+ lld_gdisp_backlight((unsigned)value);
GDISP.Backlight = (unsigned)value;
break;
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_board_example.h b/drivers/gdisp/ILI9320/gdisp_lld_board_example.h
index a79e557b..f07b34c6 100644
--- a/drivers/gdisp/ILI9320/gdisp_lld_board_example.h
+++ b/drivers/gdisp/ILI9320/gdisp_lld_board_example.h
@@ -29,28 +29,28 @@
#ifndef GDISP_LLD_BOARD_H
#define GDISP_LLD_BOARD_H
-static __inline void GDISP_LLD(init_board)(void) {
+static __inline void lld_gdisp_init_board(void) {
#error "ILI9320: You must implement the init_board routine for your board"
}
-static __inline void GDISP_LLD(setpin_reset)(bool_t state) {
+static __inline void lld_gdisp_reset_pin(bool_t state) {
#error "ILI9320: You must implement setpin_reset routine for your board"
}
-static __inline void GDISP_LLD(write_index)(uint16_t data) {
+static __inline void lld_gdisp_write_index(uint16_t data) {
#error "ILI9320: You must implement write_index routine for your board"
}
-static __inline void GDISP_LLD(write_data)(uint16_t data) {
+static __inline void lld_gdisp_write_data(uint16_t data) {
#error "ILI9320: You must implement write_data routine for your board"
}
-static __inline uint16_t GDISP_LLD(read_data)(void) {
+static __inline uint16_t lld_gdisp_read_data(void) {
#error "ILI9320: You must implement read_data routine for your board"
}
/* if not available, just ignore the argument and return */
-static __inline uint16_t GDISP_LLD(set_backlight)(uint8_t percentage) {
+static __inline uint16_t lld_gdisp_backlight(uint8_t percentage) {
#error "ILI9320: You must implement set_backlight routine for your board"
}
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h b/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h
index a6d9d631..d2d54ce9 100644
--- a/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h
+++ b/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h
@@ -32,7 +32,7 @@
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60100000)) /* RS = 1 */
-static __inline void GDISP_LLD(init_board)(void) {
+static __inline void lld_gdisp_init_board(void) {
/* FSMC setup for F1 */
rccEnableAHB(RCC_AHBENR_FSMCEN, 0);
@@ -54,26 +54,26 @@ static __inline void GDISP_LLD(init_board)(void) {
FSMC_Bank1->BTCR[FSMC_Bank] = FSMC_BCR1_MWID_0 | FSMC_BCR1_WREN | FSMC_BCR1_MBKEN;
}
-static __inline void GDISP_LLD(setpin_reset)(bool_t state) {
+static __inline void lld_gdisp_reset_pin(bool_t state) {
if(state)
palClearPad(GPIOE, GPIOE_TFT_RST);
else
palSetPad(GPIOE, GPIOE_TFT_RST);
}
-static __inline void GDISP_LLD(write_index)(uint16_t reg) {
+static __inline void lld_gdisp_write_index(uint16_t reg) {
GDISP_REG = reg;
}
-static __inline void GDISP_LLD(write_data)(uint16_t data) {
+static __inline void lld_gdisp_write_data(uint16_t data) {
GDISP_RAM = data;
}
-static __inline uint16_t GDISP_LLD(read_data)(void) {
+static __inline uint16_t lld_gdisp_read_data(void) {
return GDISP_RAM;
}
-static __inline void GDISP_LLD(set_backlight)(uint8_t percent) {
+static __inline void lld_gdisp_backlight(uint8_t percent) {
if(percent == 100)
palClearPad(GPIOD, GPIOD_TFT_LIGHT);
else
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_config.h b/drivers/gdisp/ILI9320/gdisp_lld_config.h
index d55f2115..1606ce95 100644
--- a/drivers/gdisp/ILI9320/gdisp_lld_config.h
+++ b/drivers/gdisp/ILI9320/gdisp_lld_config.h
@@ -36,7 +36,6 @@
/*===========================================================================*/
#define GDISP_DRIVER_NAME "ILI9320"
-#define GDISP_LLD(x) gdisp_lld_##x##_ILI9320
#define GDISP_HARDWARE_CLEARS TRUE
#define GDISP_HARDWARE_FILLS TRUE
diff --git a/drivers/gdisp/ILI9325/gdisp_lld.c b/drivers/gdisp/ILI9325/gdisp_lld.c
index 42b03d74..e9500cc5 100644
--- a/drivers/gdisp/ILI9325/gdisp_lld.c
+++ b/drivers/gdisp/ILI9325/gdisp_lld.c
@@ -81,28 +81,28 @@ static __inline void lld_lcdDelay(uint16_t us) {
}
static __inline void lld_lcdWriteIndex(uint16_t index) {
- GDISP_LLD(write_index)(index);
+ lld_gdisp_write_index(index);
}
static __inline void lld_lcdWriteData(uint16_t data) {
- GDISP_LLD(write_data)(data);
+ lld_gdisp_write_data(data);
}
static __inline void lld_lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
- GDISP_LLD(write_index)(lcdReg);
- GDISP_LLD(write_data)(lcdRegValue);
+ lld_gdisp_write_index(lcdReg);
+ lld_gdisp_write_data(lcdRegValue);
}
static __inline uint16_t lld_lcdReadData(void) {
/* fix this! */
- //return GDISP_LLD(read_data);
+ //return lld_gdisp_read_data;
return GDISP_RAM;
}
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
volatile uint16_t dummy;
- GDISP_LLD(write_index)(lcdReg);
+ lld_gdisp_write_index(lcdReg);
dummy = lld_lcdReadData();
(void)dummy;
@@ -143,14 +143,14 @@ static __inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
buffer[i] = lld_lcdReadData();
}
-bool_t GDISP_LLD(init)(void) {
+bool_t lld_gdisp_init(void) {
/* Initialise your display */
- GDISP_LLD(init_board)();
+ lld_gdisp_init_board();
/* Hardware reset */
- GDISP_LLD(setpin_reset)(TRUE);
+ lld_gdisp_reset_pin(TRUE);
lld_lcdDelay(1000);
- GDISP_LLD(setpin_reset)(FALSE);
+ lld_gdisp_reset_pin(FALSE);
lld_lcdDelay(1000);
// chinese code starts here
@@ -210,7 +210,7 @@ bool_t GDISP_LLD(init)(void) {
// chinese code ends here
// Turn on the backlight
- GDISP_LLD(set_backlight)(GDISP_INITIAL_BACKLIGHT);
+ lld_gdisp_backlight(GDISP_INITIAL_BACKLIGHT);
/* Initialise the GDISP structure */
GDISP.Width = GDISP_SCREEN_WIDTH;
@@ -302,7 +302,7 @@ static __inline void lld_lcdResetViewPort(void) {
}
}
-void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
+void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0 || y < GDISP.clipy0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return;
#endif
@@ -311,7 +311,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
}
#if GDISP_HARDWARE_CLEARS || defined(__DOXYGEN__)
- void GDISP_LLD(clear)(color_t color) {
+ void lld_gdisp_clear(color_t color) {
unsigned i;
lld_lcdSetCursor(0, 0);
@@ -325,7 +325,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if GDISP_HARDWARE_FILLS || defined(__DOXYGEN__)
- void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
+ void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0) { cx -= GDISP.clipx0 - x; x = GDISP.clipx0; }
if (y < GDISP.clipy0) { cy -= GDISP.clipy0 - y; y = GDISP.clipy0; }
@@ -347,7 +347,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if GDISP_HARDWARE_BITFILLS || defined(__DOXYGEN__)
- void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
+ void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
coord_t endx, endy;
unsigned lg;
@@ -376,7 +376,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if (GDISP_NEED_PIXELREAD && GDISP_HARDWARE_PIXELREAD) || defined(__DOXYGEN__)
- color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
+ color_t lld_gdisp_get_pixel_color(coord_t x, coord_t y) {
color_t color;
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
@@ -396,7 +396,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if (GDISP_NEED_SCROLL && GDISP_HARDWARE_SCROLL) || defined(__DOXYGEN__)
- void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
+ void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
static color_t buf[((GDISP_SCREEN_HEIGHT > GDISP_SCREEN_WIDTH ) ? GDISP_SCREEN_HEIGHT : GDISP_SCREEN_WIDTH)];
coord_t row0, row1;
unsigned i, gap, abslines;
@@ -449,7 +449,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
#endif
#if (GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL) || defined(__DOXYGEN__)
- void GDISP_LLD(control)(unsigned what, void *value) {
+ void lld_gdisp_control(unsigned what, void *value) {
switch(what) {
case GDISP_CONTROL_POWER:
if(GDISP.Powermode == (gdisp_powermode_t)value)
@@ -461,7 +461,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
lld_lcdWriteReg(0x0011, 0x0000);
lld_lcdWriteReg(0x0012, 0x0000);
lld_lcdWriteReg(0x0013, 0x0000);
- GDISP_LLD(set_backlight)(0);
+ lld_gdisp_backlight(0);
break;
case powerOn:
@@ -480,9 +480,9 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
lld_lcdWriteReg(0x0029, 0x0009); /* VCM[4:0] for VCOMH */
lld_lcdDelay(500);
lld_lcdWriteReg(0x0007, 0x0173); /* 262K color and display ON */
- GDISP_LLD(set_backlight)(GDISP.Backlight);
+ lld_gdisp_backlight(GDISP.Backlight);
if(GDISP.Powermode != powerSleep || GDISP.Powermode != powerDeepSleep)
- GDISP_LLD(init)();
+ lld_gdisp_init();
break;
case powerSleep:
@@ -493,7 +493,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
lld_lcdWriteReg(0x0013, 0x0000); /* VDV[4:0] for VCOM amplitude */
lld_lcdDelay(2000); /* Dis-charge capacitor power voltage */
lld_lcdWriteReg(0x0010, 0x0002); /* SAP, BT[3:0], APE, AP, DSTB, SLP */
- GDISP_LLD(set_backlight)(0);
+ lld_gdisp_backlight(0);
break;
case powerDeepSleep:
@@ -504,7 +504,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
lld_lcdWriteReg(0x0013, 0x0000); /* VDV[4:0] for VCOM amplitude */
lld_lcdDelay(2000); /* Dis-charge capacitor power voltage */
lld_lcdWriteReg(0x0010, 0x0004); /* SAP, BT[3:0], APE, AP, DSTB, SLP */
- GDISP_LLD(set_backlight)(0);
+ lld_gdisp_backlight(0);
break;
default:
@@ -564,7 +564,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
case GDISP_CONTROL_BACKLIGHT:
if((unsigned)value > 100) value = (void *)100;
- GDISP_LLD(set_backlight)((unsigned)value);
+ lld_gdisp_backlight((unsigned)value);
GDISP.Backlight = (unsigned)value;
break;
diff --git a/drivers/gdisp/ILI9325/gdisp_lld_board_example.h b/drivers/gdisp/ILI9325/gdisp_lld_board_example.h
index 7b537dcd..547952ee 100644
--- a/drivers/gdisp/ILI9325/gdisp_lld_board_example.h
+++ b/drivers/gdisp/ILI9325/gdisp_lld_board_example.h
@@ -29,28 +29,28 @@
#ifndef GDISP_LLD_BOARD_H
#define GDISP_LLD_BOARD_H
-static __inline void GDISP_LLD(init_board)(void) {
+static __inline void lld_gdisp_init_board(void) {
#error "ILI9325: You must implement the init_board routine for your board"
}
-static __inline void GDISP_LLD(setpin_reset)(bool_t state) {
+static __inline void lld_gdisp_reset_pin(bool_t state) {
#error "ILI9325: You must implement setpin_reset routine for your board"
}
-static __inline void GDISP_LLD(write_index)(uint16_t data) {
+static __inline void lld_gdisp_write_index(uint16_t data) {
#error "ILI9325: You must implement write_index routine for your board"
}
-static __inline void GDISP_LLD(write_data)(uint16_t data) {
+static __inline void lld_gdisp_write_data(uint16_t data) {
#error "ILI9325: You must implement write_data routine for your board"
}
-static __inline uint16_t GDISP_LLD(read_data)(void) {
+static __inline uint16_t lld_gdisp_read_data(void) {
#error "ILI9325: You must implement read_data routine for your board"
}
/* if not available, just ignore the argument and return */
-static __inline uint16_t GDISP_LLD(set_backlight)(uint8_t percentage) {
+static __inline uint16_t lld_gdisp_backlight(uint8_t percentage) {
#error "ILI9325: You must implement set_backlight routine for your board"
}
diff --git a/drivers/gdisp/ILI9325/gdisp_lld_board_hy_stm32_100p.h b/drivers/gdisp/ILI9325/gdisp_lld_board_hy_stm32_100p.h
index e785ad10..94d418b0 100644
--- a/drivers/gdisp/ILI9325/gdisp_lld_board_hy_stm32_100p.h
+++ b/drivers/gdisp/ILI9325/gdisp_lld_board_hy_stm32_100p.h
@@ -45,7 +45,7 @@
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
-static __inline void GDISP_LLD(init_board)(void) {
+static __inline void lld_gdisp_init_board(void) {
/* FSMC setup for F1 */
rccEnableAHB(RCC_AHBENR_FSMCEN, 0);
@@ -68,26 +68,26 @@ static __inline void GDISP_LLD(init_board)(void) {
}
-static __inline void GDISP_LLD(setpin_reset)(bool_t state) {
+static __inline void lld_gdisp_reset_pin(bool_t state) {
if(state)
palClearPad(GPIOE, GPIOE_TFT_RST);
else
palSetPad(GPIOE, GPIOE_TFT_RST);
}
-static __inline void GDISP_LLD(write_index)(uint16_t reg) {
+static __inline void lld_gdisp_write_index(uint16_t reg) {
GDISP_REG = reg;
}
-static __inline void GDISP_LLD(write_data)(uint16_t data) {
+static __inline void lld_gdisp_write_data(uint16_t data) {
GDISP_RAM = data;
}
-static __inline uint16_t GDISP_LLD(read_data)(void) {
+static __inline uint16_t lld_gdisp_read_data(void) {
return GDISP_RAM;
}
-static __inline void GDISP_LLD(set_backlight)(uint8_t percent) {
+static __inline void lld_gdisp_backlight(uint8_t percent) {
percent=percent; // avoid a warning
}
diff --git a/drivers/gdisp/ILI9325/gdisp_lld_config.h b/drivers/gdisp/ILI9325/gdisp_lld_config.h
index 44f8323f..414fc05e 100644
--- a/drivers/gdisp/ILI9325/gdisp_lld_config.h
+++ b/drivers/gdisp/ILI9325/gdisp_lld_config.h
@@ -36,7 +36,6 @@
/*===========================================================================*/
#define GDISP_DRIVER_NAME "ILI9325"
-#define GDISP_LLD(x) gdisp_lld_##x##_ILI9325
#define GDISP_HARDWARE_CLEARS TRUE
#define GDISP_HARDWARE_FILLS TRUE
diff --git a/drivers/gdisp/Nokia6610GE12/gdisp_lld.c b/drivers/gdisp/Nokia6610GE12/gdisp_lld.c
index 7e5e1215..6ce7b581 100644
--- a/drivers/gdisp/Nokia6610GE12/gdisp_lld.c
+++ b/drivers/gdisp/Nokia6610GE12/gdisp_lld.c
@@ -113,7 +113,7 @@ static __inline void setviewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
*
* @notapi
*/
-bool_t GDISP_LLD(init)(void) {
+bool_t lld_gdisp_init(void) {
/* Initialise your display */
init_board();
@@ -219,7 +219,7 @@ bool_t GDISP_LLD(init)(void) {
*
* @notapi
*/
-void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
+void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0 || y < GDISP.clipy0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return;
#endif
@@ -241,7 +241,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
+ void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
unsigned i, tuples;
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
@@ -276,7 +276,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
+ void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
coord_t endx, endy, lg;
color_t c1, c2;
#if GDISP_PACKED_PIXELS
@@ -386,7 +386,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
+ color_t lld_gdisp_get_pixel_color(coord_t x, coord_t y) {
/* NOT IMPLEMENTED */
/* Some board hardware might support this in the future.
* The Olimex board doesn't.
@@ -407,7 +407,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
+ void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
/* NOT IMPLEMENTED */
/* The hardware seems capable of doing this.
* It is just really complex so we leave it out for now.
@@ -435,7 +435,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(control)(unsigned what, void *value) {
+ void lld_gdisp_control(unsigned what, void *value) {
/* The hardware is capable of supporting...
* GDISP_CONTROL_POWER - not implemented yet
* GDISP_CONTROL_ORIENTATION - not implemented yet
@@ -456,7 +456,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
// Code here
/* You may need this ---
* if (GDISP.Powermode != powerSleep)
- * GDISP_LLD(init)();
+ * lld_gdisp_init();
*/
break;
case powerSleep:
diff --git a/drivers/gdisp/Nokia6610GE12/gdisp_lld_config.h b/drivers/gdisp/Nokia6610GE12/gdisp_lld_config.h
index ab9d35e7..9db24e26 100644
--- a/drivers/gdisp/Nokia6610GE12/gdisp_lld_config.h
+++ b/drivers/gdisp/Nokia6610GE12/gdisp_lld_config.h
@@ -36,7 +36,6 @@
/*===========================================================================*/
#define GDISP_DRIVER_NAME "Nokia6610GE12"
-#define GDISP_LLD(x) gdisp_lld_##x##_Nokia6610GE12
#define GDISP_HARDWARE_FILLS TRUE
#define GDISP_HARDWARE_BITFILLS TRUE
diff --git a/drivers/gdisp/Nokia6610GE8/gdisp_lld.c b/drivers/gdisp/Nokia6610GE8/gdisp_lld.c
index beba41a9..006c964b 100644
--- a/drivers/gdisp/Nokia6610GE8/gdisp_lld.c
+++ b/drivers/gdisp/Nokia6610GE8/gdisp_lld.c
@@ -112,7 +112,7 @@ static __inline void setviewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
*
* @notapi
*/
-bool_t GDISP_LLD(init)(void) {
+bool_t lld_gdisp_init(void) {
/* Initialise your display */
init_board();
@@ -174,7 +174,7 @@ bool_t GDISP_LLD(init)(void) {
*
* @notapi
*/
-void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
+void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0 || y < GDISP.clipy0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return;
#endif
@@ -196,7 +196,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
+ void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
unsigned i, tuples;
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
@@ -231,7 +231,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
+ void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
coord_t endx, endy, lg;
color_t c1, c2;
#if GDISP_PACKED_PIXELS
@@ -341,7 +341,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
+ color_t lld_gdisp_get_pixel_color(coord_t x, coord_t y) {
/* NOT IMPLEMENTED */
/* Some board hardware might support this in the future.
* The Olimex board doesn't.
@@ -362,7 +362,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
+ void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
/* NOT IMPLEMENTED */
/* The hardware seems capable of doing this.
* It is just really complex so we leave it out for now.
@@ -390,7 +390,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(control)(unsigned what, void *value) {
+ void lld_gdisp_control(unsigned what, void *value) {
/* The hardware is capable of supporting...
* GDISP_CONTROL_POWER - not implemented yet
* GDISP_CONTROL_ORIENTATION - not implemented yet
@@ -411,7 +411,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
// Code here
/* You may need this ---
* if (GDISP.Powermode != powerSleep)
- * GDISP_LLD(init)();
+ * lld_gdisp_init();
*/
break;
case powerSleep:
diff --git a/drivers/gdisp/Nokia6610GE8/gdisp_lld_config.h b/drivers/gdisp/Nokia6610GE8/gdisp_lld_config.h
index 87bdb824..c50e26f1 100644
--- a/drivers/gdisp/Nokia6610GE8/gdisp_lld_config.h
+++ b/drivers/gdisp/Nokia6610GE8/gdisp_lld_config.h
@@ -36,7 +36,6 @@
/*===========================================================================*/
#define GDISP_DRIVER_NAME "Nokia6610GE8"
-#define GDISP_LLD(x) gdisp_lld_##x##_Nokia6610GE8
#define GDISP_HARDWARE_FILLS TRUE
#define GDISP_HARDWARE_BITFILLS TRUE
diff --git a/drivers/gdisp/S6D1121/gdisp_lld.c b/drivers/gdisp/S6D1121/gdisp_lld.c
index e690456a..863e5e46 100644
--- a/drivers/gdisp/S6D1121/gdisp_lld.c
+++ b/drivers/gdisp/S6D1121/gdisp_lld.c
@@ -150,7 +150,7 @@ static __inline void reset_viewport(void) {
}
}
-bool_t GDISP_LLD(init)(void) {
+bool_t lld_gdisp_init(void) {
/* initialize the hardware */
init_board();
@@ -255,7 +255,7 @@ bool_t GDISP_LLD(init)(void) {
*
* @notapi
*/
-void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
+void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0 || y < GDISP.clipy0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return;
#endif
@@ -277,7 +277,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(clear)(color_t color) {
+ void lld_gdisp_clear(color_t color) {
unsigned i;
acquire_bus();
@@ -303,7 +303,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
+ void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
unsigned i, area;
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
@@ -339,7 +339,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
+ void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
coord_t endx, endy;
unsigned lg;
@@ -379,7 +379,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
+ color_t lld_gdisp_get_pixel_color(coord_t x, coord_t y) {
/* This routine is marked "DO NOT USE" in the original
* GLCD driver. We just keep our GDISP_HARDWARE_READPIXEL
* turned off for now.
@@ -418,7 +418,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
+ void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
/* This is marked as "TODO: Test this" in the original GLCD driver.
* For now we just leave the GDISP_HARDWARE_SCROLL off.
*/
@@ -495,7 +495,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(control)(unsigned what, void *value) {
+ void lld_gdisp_control(unsigned what, void *value) {
switch(what) {
case GDISP_CONTROL_POWER:
if (GDISP.Powermode == (gdisp_powermode_t)value)
@@ -508,7 +508,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
/* Code here */
/* You may need this ---
if (GDISP.Powermode != powerSleep)
- GDISP_LLD(init();
+ lld_gdisp_init();
*/
/* break; */
case powerSleep:
diff --git a/drivers/gdisp/S6D1121/gdisp_lld_config.h b/drivers/gdisp/S6D1121/gdisp_lld_config.h
index c662d0e7..00c01da2 100644
--- a/drivers/gdisp/S6D1121/gdisp_lld_config.h
+++ b/drivers/gdisp/S6D1121/gdisp_lld_config.h
@@ -36,7 +36,6 @@
/*===========================================================================*/
#define GDISP_DRIVER_NAME "S6D1121"
-#define GDISP_LLD(x) gdisp_lld_##x##_S6D1121
#define GDISP_HARDWARE_CLEARS TRUE
#define GDISP_HARDWARE_FILLS TRUE
diff --git a/drivers/gdisp/SSD1289/gdisp_lld.c b/drivers/gdisp/SSD1289/gdisp_lld.c
index d8d185cd..96fb94e6 100644
--- a/drivers/gdisp/SSD1289/gdisp_lld.c
+++ b/drivers/gdisp/SSD1289/gdisp_lld.c
@@ -157,7 +157,7 @@ static __inline void reset_viewport(void) {
*
* @notapi
*/
-bool_t GDISP_LLD(init)(void) {
+bool_t lld_gdisp_init(void) {
/* Initialise your display */
init_board();
@@ -243,7 +243,7 @@ bool_t GDISP_LLD(init)(void) {
*
* @notapi
*/
-void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
+void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0 || y < GDISP.clipy0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return;
#endif
@@ -280,7 +280,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(clear)(color_t color) {
+ void lld_gdisp_clear(color_t color) {
unsigned i;
acquire_bus();
@@ -305,7 +305,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
+ void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
unsigned i, area;
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
@@ -341,7 +341,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
+ void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
coord_t endx, endy;
unsigned lg;
@@ -380,7 +380,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
+ color_t lld_gdisp_get_pixel_color(coord_t x, coord_t y) {
color_t color;
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
@@ -413,7 +413,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
+ void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
static color_t buf[((GDISP_SCREEN_HEIGHT > GDISP_SCREEN_WIDTH ) ? GDISP_SCREEN_HEIGHT : GDISP_SCREEN_WIDTH)];
coord_t row0, row1;
unsigned i, gap, abslines, j;
@@ -489,7 +489,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(control)(unsigned what, void *value) {
+ void lld_gdisp_control(unsigned what, void *value) {
switch(what) {
case GDISP_CONTROL_POWER:
if (GDISP.Powermode == (gdisp_powermode_t)value)
@@ -508,7 +508,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
write_reg(0x0010, 0x0000); // leave sleep mode
release_bus();
if (GDISP.Powermode != powerSleep)
- GDISP_LLD(init)();
+ lld_gdisp_init();
break;
case powerSleep:
acquire_bus();
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_config.h b/drivers/gdisp/SSD1289/gdisp_lld_config.h
index dafbc90f..62b3c7b9 100644
--- a/drivers/gdisp/SSD1289/gdisp_lld_config.h
+++ b/drivers/gdisp/SSD1289/gdisp_lld_config.h
@@ -36,7 +36,6 @@
/*===========================================================================*/
#define GDISP_DRIVER_NAME "SSD1289"
-#define GDISP_LLD(x) gdisp_lld_##x##_SSD1289
#define GDISP_HARDWARE_CLEARS TRUE
#define GDISP_HARDWARE_FILLS TRUE
diff --git a/drivers/gdisp/SSD1963/gdisp_lld.c b/drivers/gdisp/SSD1963/gdisp_lld.c
index 41cbd969..0b676ebc 100644
--- a/drivers/gdisp/SSD1963/gdisp_lld.c
+++ b/drivers/gdisp/SSD1963/gdisp_lld.c
@@ -187,7 +187,7 @@ __inline void GDISP_LLD(readstream)(uint16_t *buffer, size_t size) {
*
* @notapi
*/
-bool_t GDISP_LLD(init)(void) {
+bool_t lld_gdisp_init(void) {
/* Initialise the display */
#if defined(GDISP_USE_FSMC)
@@ -358,7 +358,7 @@ void GDISP_LLD(setwindow)(coord_t x0, coord_t y0, coord_t x1, coord_t y1) {
*
* @notapi
*/
-void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
+void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0 || y < GDISP.clipy0 || x >= GDISP.clipx1 || y >= GDISP.clipy1) return;
#endif
@@ -381,7 +381,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
+ void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0) { cx -= GDISP.clipx0 - x; x = GDISP.clipx0; }
@@ -430,7 +430,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
+ void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0) { cx -= GDISP.clipx0 - x; srcx += GDISP.clipx0 - x; x = GDISP.clipx0; }
@@ -486,7 +486,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
+ void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
if (x < GDISP.clipx0) { cx -= GDISP.clipx0 - x; x = GDISP.clipx0; }
if (y < GDISP.clipy0) { cy -= GDISP.clipy0 - y; y = GDISP.clipy0; }
@@ -535,7 +535,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(control)(unsigned what, void *value) {
+ void lld_gdisp_control(unsigned what, void *value) {
/* NOT IMPLEMENTED YET */
switch(what) {
case GDISP_CONTROL_POWER:
@@ -552,7 +552,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
GDISP_LLD(readreg)(0x0000); chThdSleepMicroseconds(5000); // 2x Dummy reads to wake up from deep sleep
GDISP_LLD(readreg)(0x0000); chThdSleepMicroseconds(5000);
if (GDISP.Powermode != powerSleep)
- GDISP_LLD(init)();
+ lld_gdisp_init();
GDISP_LLD(writeindex)(SSD1963_SET_DISPLAY_ON);
break;
diff --git a/drivers/gdisp/TestStub/gdisp_lld.c b/drivers/gdisp/TestStub/gdisp_lld.c
index 83049aa2..be323912 100644
--- a/drivers/gdisp/TestStub/gdisp_lld.c
+++ b/drivers/gdisp/TestStub/gdisp_lld.c
@@ -53,7 +53,7 @@
*
* @notapi
*/
-bool_t GDISP_LLD(init)(void) {
+bool_t lld_gdisp_init(void) {
/* Initialise the GDISP structure */
GDISP.Width = GDISP_SCREEN_WIDTH;
GDISP.Height = GDISP_SCREEN_HEIGHT;
@@ -79,7 +79,7 @@ bool_t GDISP_LLD(init)(void) {
*
* @notapi
*/
-void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
+void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color) {
(void)x;
(void)y;
(void)color;
@@ -97,7 +97,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
+ color_t lld_gdisp_get_pixel_color(coord_t x, coord_t y) {
(void)x;
(void)y;
@@ -119,7 +119,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
+ void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
(void)x;
(void)y;
(void)cx;
diff --git a/drivers/gdisp/TestStub/gdisp_lld_config.h b/drivers/gdisp/TestStub/gdisp_lld_config.h
index 18c2de59..8ae82ff4 100644
--- a/drivers/gdisp/TestStub/gdisp_lld_config.h
+++ b/drivers/gdisp/TestStub/gdisp_lld_config.h
@@ -36,7 +36,6 @@
/*===========================================================================*/
#define GDISP_DRIVER_NAME "TestStub"
-#define GDISP_LLD(x) gdisp_lld_##x##_TestStub
#define GDISP_HARDWARE_SCROLL GDISP_NEED_SCROLL
#define GDISP_HARDWARE_PIXELREAD GDISP_NEED_PIXELREAD
diff --git a/drivers/gdisp/VMT/gdisp_lld.c b/drivers/gdisp/VMT/gdisp_lld.c
deleted file mode 100644
index 9d9c7382..00000000
--- a/drivers/gdisp/VMT/gdisp_lld.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- ChibiOS/GFX - Copyright (C) 2012
- Joel Bodenmann aka Tectu <joel@unormal.org>
-
- This file is part of ChibiOS/GFX.
-
- ChibiOS/GFX is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/GFX is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
- * @file drivers/gdisp/VMT/gdisp_lld.c
- * @brief GDISP Graphics Driver subsystem low level driver source for VMT.
- *
- * @addtogroup GDISP
- * @{
- */
-
-#include "ch.h"
-#include "hal.h"
-#include "gfx.h"
-
-#if GFX_USE_GDISP /*|| defined(__DOXYGEN__)*/
-
-#define GDISP_LLD_NO_STRUCT
-
-/* Include the emulation code for things we don't support */
-#include "gdisp/lld/emulation.c"
-
-/*===========================================================================*/
-/* Driver local definitions. */
-/*===========================================================================*/
-
-#define GDISP_LLD1(x) GDISP_VMT_NAME1(gdisp_lld_##x##_)
-#define GDISP_LLD2(x) GDISP_VMT_NAME2(gdisp_lld_##x##_)
-
-/* Prototypes for lld driver functions */
-bool_t GDISP_LLD1(init)(void);
-void *GDISP_LLD1(query)(unsigned what);
-void GDISP_LLD1(clear)(color_t color);
-void GDISP_LLD1(drawpixel)(coord_t x, coord_t y, color_t color);
-void GDISP_LLD1(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color);
-void GDISP_LLD1(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer);
-void GDISP_LLD1(drawline)(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color);
-#if GDISP_NEED_CLIP
- void GDISP_LLD1(setclip)(coord_t x, coord_t y, coord_t cx, coord_t cy);
-#endif
-#if GDISP_NEED_CIRCLE
- void GDISP_LLD1(drawcircle)(coord_t x, coord_t y, coord_t radius, color_t color);
- void GDISP_LLD1(fillcircle)(coord_t x, coord_t y, coord_t radius, color_t color);
-#endif
-#if GDISP_NEED_ELLIPSE
- void GDISP_LLD1(drawellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
- void GDISP_LLD1(fillellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
-#endif
-#if GDISP_NEED_ARC
- void GDISP_LLD1(drawarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color);
- void GDISP_LLD1(fillarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color);
-#endif
-#if GDISP_NEED_TEXT
- void GDISP_LLD1(drawchar)(coord_t x, coord_t y, char c, font_t font, color_t color);
- void GDISP_LLD1(fillchar)(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor);
-#endif
-#if GDISP_NEED_PIXELREAD
- color_t GDISP_LLD1(getpixelcolor)(coord_t x, coord_t y);
-#endif
-#if GDISP_NEED_SCROLL
- void GDISP_LLD1(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor);
-#endif
-#if GDISP_NEED_CONTROL
- void GDISP_LLD1(control)(unsigned what, void *value);
-#endif
-
-bool_t GDISP_LLD2(init)(void);
-void *GDISP_LLD2(query)(unsigned what);
-void GDISP_LLD2(clear)(color_t color);
-void GDISP_LLD2(drawpixel)(coord_t x, coord_t y, color_t color);
-void GDISP_LLD2(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color);
-void GDISP_LLD2(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer);
-void GDISP_LLD2(drawline)(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color);
-#if GDISP_NEED_CLIP
- void GDISP_LLD2(setclip)(coord_t x, coord_t y, coord_t cx, coord_t cy);
-#endif
-#if GDISP_NEED_CIRCLE
- void GDISP_LLD2(drawcircle)(coord_t x, coord_t y, coord_t radius, color_t color);
- void GDISP_LLD2(fillcircle)(coord_t x, coord_t y, coord_t radius, color_t color);
-#endif
-#if GDISP_NEED_ELLIPSE
- void GDISP_LLD2(drawellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
- void GDISP_LLD2(fillellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
-#endif
-#if GDISP_NEED_ARC
- void GDISP_LLD2(drawarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color);
- void GDISP_LLD2(fillarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color);
-#endif
-#if GDISP_NEED_TEXT
- void GDISP_LLD2(drawchar)(coord_t x, coord_t y, char c, font_t font, color_t color);
- void GDISP_LLD2(fillchar)(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor);
-#endif
-#if GDISP_NEED_PIXELREAD
- color_t GDISP_LLD2(getpixelcolor)(coord_t x, coord_t y);
-#endif
-#if GDISP_NEED_SCROLL
- void GDISP_LLD2(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor);
-#endif
-#if GDISP_NEED_CONTROL
- void GDISP_LLD2(control)(unsigned what, void *value);
-#endif
-
-/*===========================================================================*/
-/* Driver exported variables. */
-/*===========================================================================*/
-
-/* Our VMT table variables */
-void *GDISP_LLD_VMT(query)(unsigned what);
-void GDISP_LLD_VMT(clear)(color_t color);
-void GDISP_LLD_VMT(drawpixel)(coord_t x, coord_t y, color_t color);
-void GDISP_LLD_VMT(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color);
-void GDISP_LLD_VMT(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer);
-void GDISP_LLD_VMT(drawline)(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color);
-
-#if GDISP_NEED_CIRCLE
-void GDISP_LLD_VMT(drawcircle)(coord_t x, coord_t y, coord_t radius, color_t color);
-void GDISP_LLD_VMT(fillcircle)(coord_t x, coord_t y, coord_t radius, color_t color);
-#endif
-
-#if GDISP_NEED_ELLIPSE
-void GDISP_LLD_VMT(drawellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
-void GDISP_LLD_VMT(fillellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
-#endif
-
-/* Text Rendering Functions */
-#if GDISP_NEED_TEXT
-void GDISP_LLD_VMT(drawchar)(coord_t x, coord_t y, char c, font_t font, color_t color);
-void GDISP_LLD_VMT(fillchar)(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor);
-#endif
-
-/* Pixel readback */
-#if GDISP_NEED_PIXELREAD
-color_t GDISP_LLD_VMT(getpixelcolor)(coord_t x, coord_t y);
-#endif
-
-/* Scrolling Function - clears the area scrolled out */
-#if GDISP_NEED_SCROLL
-void GDISP_LLD_VMT(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor);
-#endif
-
-/* Set driver specific control */
-#if GDISP_NEED_CONTROL
-void GDISP_LLD_VMT(control)(unsigned what, void *value);
-#endif
-/* Clipping Functions */
-#if GDISP_NEED_CLIP
-void GDISP_LLD_VMT(setclip)(coord_t x, coord_t y, coord_t cx, coord_t cy);
-#endif
-
-
-/*===========================================================================*/
-/* Driver local variables. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Driver local functions. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Driver interrupt handlers. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Driver exported functions. */
-/*===========================================================================*/
-
-/*===========================================================================*/
-/* Driver exported functions. */
-/*===========================================================================*/
-
-bool_t gdisp_lld_init_VMT(void) {
- if (GDISP_VMT_NAME1(gdisp_lld_init_)()) {
- gdisp_lld_query_VMT = GDISP_VMT_NAME1(gdisp_lld_query_);
- gdisp_lld_clear_VMT = GDISP_VMT_NAME1(gdisp_lld_clear_);
- gdisp_lld_drawpixel_VMT = GDISP_VMT_NAME1(gdisp_lld_drawpixel_);
- gdisp_lld_fillarea_VMT = GDISP_VMT_NAME1(gdisp_lld_fillarea_);
- gdisp_lld_blitareaex_VMT = GDISP_VMT_NAME1(gdisp_lld_blitareaex_);
- gdisp_lld_drawline_VMT = GDISP_VMT_NAME1(gdisp_lld_drawline_);
- #if GDISP_NEED_CIRCLE
- gdisp_lld_drawcircle_VMT = GDISP_VMT_NAME1(gdisp_lld_drawcircle_);
- gdisp_lld_fillcircle_VMT = GDISP_VMT_NAME1(gdisp_lld_fillcircle_);
- #endif
- #if GDISP_NEED_ELLIPSE
- gdisp_lld_drawellipse_VMT = GDISP_VMT_NAME1(gdisp_lld_drawellipse_);
- gdisp_lld_fillellipse_VMT = GDISP_VMT_NAME1(gdisp_lld_fillellipse_);
- #endif
- #if GDISP_NEED_ARC
- gdisp_lld_drawarc_VMT = GDISP_VMT_NAME1(gdisp_lld_drawarc_);
- gdisp_lld_fillarc_VMT = GDISP_VMT_NAME1(gdisp_lld_fillarc_);
- #endif
- #if GDISP_NEED_TEXT
- gdisp_lld_drawchar_VMT = GDISP_VMT_NAME1(gdisp_lld_drawchar_);
- gdisp_lld_fillchar_VMT = GDISP_VMT_NAME1(gdisp_lld_fillchar_);
- #endif
- #if GDISP_NEED_PIXELREAD
- gdisp_lld_getpixelcolor_VMT = GDISP_VMT_NAME1(gdisp_lld_pixelread_);
- #endif
- #if GDISP_NEED_SCROLL
- gdisp_lld_verticalscroll_VMT = GDISP_VMT_NAME1(gdisp_lld_scroll_);
- #endif
- #if GDISP_NEED_CONTROL
- gdisp_lld_control_VMT = GDISP_VMT_NAME1(gdisp_lld_control_);
- #endif
- #if GDISP_NEED_CLIP
- gdisp_lld_setclip_VMT = GDISP_VMT_NAME1(gdisp_lld_setclip_);
- #endif
-
- return TRUE;
- }
-
- if (GDISP_VMT_NAME2(gdisp_lld_init_)()) {
- gdisp_lld_query_VMT = GDISP_VMT_NAME2(gdisp_lld_query_);
- gdisp_lld_clear_VMT = GDISP_VMT_NAME2(gdisp_lld_clear_);
- gdisp_lld_drawpixel_VMT = GDISP_VMT_NAME2(gdisp_lld_drawpixel_);
- gdisp_lld_fillarea_VMT = GDISP_VMT_NAME2(gdisp_lld_fillarea_);
- gdisp_lld_blitareaex_VMT = GDISP_VMT_NAME2(gdisp_lld_blitareaex_);
- gdisp_lld_drawline_VMT = GDISP_VMT_NAME2(gdisp_lld_drawline_);
- #if GDISP_NEED_CIRCLE
- gdisp_lld_drawcircle_VMT = GDISP_VMT_NAME2(gdisp_lld_drawcircle_);
- gdisp_lld_fillcircle_VMT = GDISP_VMT_NAME2(gdisp_lld_fillcircle_);
- #endif
- #if GDISP_NEED_ELLIPSE
- gdisp_lld_drawellipse_VMT = GDISP_VMT_NAME2(gdisp_lld_drawellipse_);
- gdisp_lld_fillellipse_VMT = GDISP_VMT_NAME2(gdisp_lld_fillellipse_);
- #endif
- #if GDISP_NEED_ARC
- gdisp_lld_drawarc_VMT = GDISP_VMT_NAME2(gdisp_lld_drawarc_);
- gdisp_lld_fillarc_VMT = GDISP_VMT_NAME2(gdisp_lld_fillarc_);
- #endif
- #if GDISP_NEED_TEXT
- gdisp_lld_drawchar_VMT = GDISP_VMT_NAME2(gdisp_lld_drawchar_);
- gdisp_lld_fillchar_VMT = GDISP_VMT_NAME2(gdisp_lld_fillchar_);
- #endif
- #if GDISP_NEED_PIXELREAD
- gdisp_lld_getpixelcolor_VMT = GDISP_VMT_NAME2(gdisp_lld_pixelread_);
- #endif
- #if GDISP_NEED_SCROLL
- gdisp_lld_verticalscroll_VMT = GDISP_VMT_NAME2(gdisp_lld_scroll_);
- #endif
- #if GDISP_NEED_CONTROL
- gdisp_lld_control_VMT = GDISP_VMT_NAME2(gdisp_lld_control_);
- #endif
- #if GDISP_NEED_CLIP
- gdisp_lld_setclip_VMT = GDISP_VMT_NAME2(gdisp_lld_setclip_);
- #endif
-
- return TRUE;
- }
- return FALSE;
-}
-
-#endif /* GFX_USE_GDISP */
-/** @} */
-
diff --git a/drivers/gdisp/VMT/gdisp_lld.mk b/drivers/gdisp/VMT/gdisp_lld.mk
deleted file mode 100644
index 96918f8a..00000000
--- a/drivers/gdisp/VMT/gdisp_lld.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-# List the required driver.
-GFXSRC += $(GFXLIB)/drivers/gdisp/VMT/gdisp_lld.c \
- $(GFXLIB)/drivers/gdisp/VMT/gdisp_lld_driver1.c \
- $(GFXLIB)//drivers/gdisp/VMT/gdisp_lld_driver2.c
-
-# Required include directories
-GFXINC += $(GFXLIB)/drivers/gdisp/VMT
diff --git a/drivers/gdisp/VMT/gdisp_lld_config.h b/drivers/gdisp/VMT/gdisp_lld_config.h
deleted file mode 100644
index 8c7bfc9c..00000000
--- a/drivers/gdisp/VMT/gdisp_lld_config.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- ChibiOS/GFX - Copyright (C) 2012
- Joel Bodenmann aka Tectu <joel@unormal.org>
-
- This file is part of ChibiOS/GFX.
-
- ChibiOS/GFX is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/GFX is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
- * @file drivers/gdisp/VMT/gdisp_lld_config.h
- * @brief GDISP Graphic Driver subsystem low level driver header template.
- *
- * @addtogroup GDISP
- * @{
- */
-
-#ifndef _GDISP_LLD_CONFIG_H
-#define _GDISP_LLD_CONFIG_H
-
-#if GFX_USE_GDISP
-
-/*===========================================================================*/
-/* Driver hardware support. */
-/*===========================================================================*/
-
-#define GDISP_DRIVER_NAME "VMT"
-#define GDISP_LLD(x) gdisp_lld_##x##_VMT
-#define GDISP_LLD_VMT(x) (*GDISP_LLD(x))
-
-#define GDISP_HARDWARE_LINES TRUE
-#define GDISP_HARDWARE_CLEARS TRUE
-#define GDISP_HARDWARE_FILLS TRUE
-#define GDISP_HARDWARE_BITFILLS TRUE
-#define GDISP_HARDWARE_CIRCLES TRUE
-#define GDISP_HARDWARE_CIRCLEFILLS TRUE
-#define GDISP_HARDWARE_ELLIPSES TRUE
-#define GDISP_HARDWARE_ELLIPSEFILLS TRUE
-#define GDISP_HARDWARE_ARCS TRUE
-#define GDISP_HARDWARE_ARCFILLS TRUE
-#define GDISP_HARDWARE_TEXT TRUE
-#define GDISP_HARDWARE_TEXTFILLS TRUE
-#define GDISP_HARDWARE_SCROLL TRUE
-#define GDISP_HARDWARE_PIXELREAD TRUE
-#define GDISP_HARDWARE_CONTROL TRUE
-#define GDISP_HARDWARE_QUERY TRUE
-#define GDISP_HARDWARE_CLIP TRUE
-
-#define GDISP_SOFTWARE_TEXTFILLDRAW FALSE
-#define GDISP_SOFTWARE_TEXTBLITCOLUMN FALSE
-
-#define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_RGB565
-#define GDISP_PACKED_PIXELS FALSE
-#define GDISP_PACKED_LINES FALSE
-
-#endif /* GFX_USE_GDISP */
-
-#endif /* _GDISP_LLD_CONFIG_H */
-/** @} */
-
diff --git a/drivers/gdisp/VMT/gdisp_lld_driver1.c b/drivers/gdisp/VMT/gdisp_lld_driver1.c
deleted file mode 100644
index 01fd4cf0..00000000
--- a/drivers/gdisp/VMT/gdisp_lld_driver1.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- ChibiOS/GFX - Copyright (C) 2012
- Joel Bodenmann aka Tectu <joel@unormal.org>
-
- This file is part of ChibiOS/GFX.
-
- ChibiOS/GFX is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/GFX is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
- * @file drivers/gdisp/VMT/gdisp_lld_driver1.c
- * @brief GDISP Graphics Driver subsystem low level driver source for VMT.
- *
- * @addtogroup GDISP
- * @{
- */
-
-#include "ch.h"
-#include "hal.h"
-
-#if GFX_USE_GDISP /*|| defined(__DOXYGEN__)*/
-
-#define CONFIGFILE() <../GDISP_VMT_NAME1()/gdisp_lld_config.h>
-#define DRIVERFILE() <../GDISP_VMT_NAME1()/gdisp_lld.c>
-
-/* We don't need these in our VMT referenced driver */
-#undef GDISP_NEED_MSGAPI
-#define GDISP_NEED_MSGAPI FALSE
-
-/* Include the specific config file we want */
-#include CONFIGFILE()
-
-/* Bring in our API */
-#include "gfx.h"
-
-/* Add the low level driver */
-#include DRIVERFILE()
-
-#endif /* GFX_USE_GDISP */
-/** @} */
-
diff --git a/drivers/gdisp/VMT/gdisp_lld_driver2.c b/drivers/gdisp/VMT/gdisp_lld_driver2.c
deleted file mode 100644
index ed0e8555..00000000
--- a/drivers/gdisp/VMT/gdisp_lld_driver2.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- ChibiOS/GFX - Copyright (C) 2012
- Joel Bodenmann aka Tectu <joel@unormal.org>
-
- This file is part of ChibiOS/GFX.
-
- ChibiOS/GFX is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS/GFX is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
- * @file drivers/gdisp/VMT/gdisp_lld_driver2.c
- * @brief GDISP Graphics Driver subsystem low level driver source for VMT.
- *
- * @addtogroup GDISP
- * @{
- */
-
-#include "ch.h"
-#include "hal.h"
-
-#if GFX_USE_GDISP /*|| defined(__DOXYGEN__)*/
-
-#define CONFIGFILE() <../GDISP_VMT_NAME2()/gdisp_lld_config.h>
-#define DRIVERFILE() <../GDISP_VMT_NAME2()/gdisp_lld.c>
-
-/* We don't need these in our VMT referenced driver */
-#undef GDISP_NEED_MSGAPI
-#define GDISP_NEED_MSGAPI FALSE
-
-/* Include the specific config file we want */
-#include CONFIGFILE()
-
-/* Bring in our API */
-#include "gfx.h"
-
-/* Add the low level driver */
-#include DRIVERFILE()
-
-#endif /* GFX_USE_GDISP */
-/** @} */
-
diff --git a/drivers/gdisp/VMT/readme.txt b/drivers/gdisp/VMT/readme.txt
deleted file mode 100644
index d6b71e0e..00000000
--- a/drivers/gdisp/VMT/readme.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-This driver enables you to have two underlying drivers handling different hardware.
-A choice is made at run-time of which driver to call based on which driver succeeds
-to initialise first (init returns TRUE).
-
-To use this driver:
-
-1. Add in your halconf.h:
- a) #define GFX_USE_GDISP TRUE
- b) Any optional high level driver defines (see gdisp.h) eg: GDISP_NEED_MULTITHREAD
- c) Define these:
- #define GDISP_VMT_NAME1(x) x##YourDriver1
- #define GDISP_VMT_NAME2(x) x##YourDriver2
- Note YourDriver1 & 2 are the basenames of the directories containing the driver.
- Note that both drivers must be the same pixel format which is
- GDISP_PIXELFORMAT_RGB565 by default. Alter gdispVMT/gdisp_lld_config.h if your
- pixel format is different on both drivers.
- d) Any driver specific defines. If both drivers use the same defines then they must
- accept the same values for the define.
-
-2. To your makefile add the following lines:
- include $(CHIBIOS)/os/halext/halext.mk
- include $(CHIBIOS)/os/halext/drivers/gdispVMT/gdisp_lld.mk
-
diff --git a/drivers/multiple/Win32/gdisp_lld.c b/drivers/multiple/Win32/gdisp_lld.c
index d44bbfad..8a46abc9 100644
--- a/drivers/multiple/Win32/gdisp_lld.c
+++ b/drivers/multiple/Win32/gdisp_lld.c
@@ -314,7 +314,7 @@ static DWORD WINAPI WindowThread(LPVOID lpParameter) {
*
* @notapi
*/
-bool_t GDISP_LLD(init)(void) {
+bool_t lld_gdisp_init(void) {
RECT rect;
/* Set the window dimensions */
@@ -356,7 +356,7 @@ bool_t GDISP_LLD(init)(void) {
*
* @notapi
*/
-void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
+void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color) {
HDC dc;
#if WIN32_USE_MSG_REDRAW
RECT rect;
@@ -422,7 +422,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(drawline)(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color) {
+ void lld_gdisp_draw_line(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color) {
POINT p;
HPEN pen;
HDC dc;
@@ -550,7 +550,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
+ void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
HDC dc;
RECT rect;
HBRUSH hbr;
@@ -681,7 +681,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
+ void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
BITMAPV4HEADER bmpInfo;
RECT rect;
#if GDISP_NEED_CONTROL
@@ -788,7 +788,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
+ color_t lld_gdisp_get_pixel_color(coord_t x, coord_t y) {
color_t color;
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
@@ -834,7 +834,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
+ void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
RECT rect, frect, srect;
HBRUSH hbr;
@@ -958,7 +958,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
*
* @notapi
*/
- void GDISP_LLD(control)(unsigned what, void *value) {
+ void lld_gdisp_control(unsigned what, void *value) {
switch(what) {
case GDISP_CONTROL_ORIENTATION:
if (GDISP.Orientation == (gdisp_orientation_t)value)
diff --git a/drivers/multiple/Win32/gdisp_lld_config.h b/drivers/multiple/Win32/gdisp_lld_config.h
index bebd76b9..f62b0fdb 100644
--- a/drivers/multiple/Win32/gdisp_lld_config.h
+++ b/drivers/multiple/Win32/gdisp_lld_config.h
@@ -36,7 +36,6 @@
/*===========================================================================*/
#define GDISP_DRIVER_NAME "Win32"
-#define GDISP_LLD(x) gdisp_lld_##x##_Win32
#define GDISP_HARDWARE_LINES TRUE
#define GDISP_HARDWARE_FILLS TRUE
diff --git a/gfxconf.example.h b/gfxconf.example.h
index e36292e2..c601dbb9 100644
--- a/gfxconf.example.h
+++ b/gfxconf.example.h
@@ -1,105 +1,105 @@
-/**
- * This file has a different license to the rest of the GFX system.
- * You can copy, modify and distribute this file as you see fit.
- * You do not need to publish your source modifications to this file.
- * The only thing you are not permitted to do is to relicense it
- * under a different license.
- */
-
-/**
- * Copy this file into your project directory and rename it as gfxconf.h
- * Edit your copy to turn on the GFX features you want to use.
- */
-
-#ifndef _GFXCONF_H
-#define _GFXCONF_H
-
-/* GFX subsystems to turn on */
-#define GFX_USE_GDISP FALSE
-#define GFX_USE_TDISP FALSE
-#define GFX_USE_GWIN FALSE
-#define GFX_USE_GEVENT FALSE
-#define GFX_USE_GTIMER FALSE
-#define GFX_USE_GINPUT FALSE
-#define GFX_USE_GADC FALSE
-#define GFX_USE_GAUDIN FALSE
-#define GFX_USE_GAUDOUT FALSE
-#define GFX_USE_GMISC FALSE
-
-/* Features for the GDISP subsystem */
-#define GDISP_NEED_VALIDATION TRUE
-#define GDISP_NEED_CLIP TRUE
-#define GDISP_NEED_TEXT TRUE
-#define GDISP_NEED_CIRCLE TRUE
-#define GDISP_NEED_ELLIPSE TRUE
-#define GDISP_NEED_ARC FALSE
-#define GDISP_NEED_SCROLL FALSE
-#define GDISP_NEED_PIXELREAD FALSE
-#define GDISP_NEED_CONTROL FALSE
-#define GDISP_NEED_MULTITHREAD FALSE
-#define GDISP_NEED_ASYNC FALSE
-#define GDISP_NEED_MSGAPI FALSE
-
-/* GDISP - builtin fonts */
-#define GDISP_OLD_FONT_DEFINITIONS FALSE
-#define GDISP_INCLUDE_FONT_SMALL TRUE
-#define GDISP_INCLUDE_FONT_LARGER TRUE
-#define GDISP_INCLUDE_FONT_UI1 TRUE
-#define GDISP_INCLUDE_FONT_UI2 TRUE
-#define GDISP_INCLUDE_FONT_LARGENUMBERS TRUE
-
-/* Features for the TDISP subsystem. */
-#define TDISP_NEED_MULTITHREAD FALSE
-
-/* Features for the GWIN subsystem. */
-#define GWIN_NEED_BUTTON FALSE
-#define GWIN_NEED_CONSOLE FALSE
-#define GWIN_NEED_GRAPH FALSE
-
-/* Features for the GEVENT subsystem. */
-#define GEVENT_ASSERT_NO_RESOURCE FALSE
-
-/* Features for the GTIMER subsystem. */
-/* NONE */
-
-/* Features for the GINPUT subsystem. */
-#define GINPUT_NEED_MOUSE FALSE
-#define GINPUT_NEED_KEYBOARD FALSE
-#define GINPUT_NEED_TOGGLE FALSE
-#define GINPUT_NEED_DIAL FALSE
-
-/* Features for the GADC subsystem. */
-/* NONE */
-
-/* Features for the GAUDIN subsystem. */
-/* NONE */
-
-/* Features for the GAUDOUT subsystem. */
-/* NONE */
-
-/* Features for the GMISC subsystem. */
-#define GMISC_NEED_ARRAYOPS FALSE
-
-/* Optional Parameters for various subsystems */
-/*
- #define GDISP_MAX_FONT_HEIGHT 16
- #define GEVENT_MAXIMUM_SIZE 32
- #define GEVENT_MAX_SOURCE_LISTENERS 32
- #define GTIMER_THREAD_WORKAREA_SIZE 512
- #define GADC_MAX_LOWSPEED_DEVICES 4
-*/
-
-/* Optional Low Level Driver Definitions */
-/*
- #define GDISP_USE_CUSTOM_BOARD FALSE
- #define GDISP_SCREEN_WIDTH 320
- #define GDISP_SCREEN_HEIGHT 240
- #define GDISP_USE_FSMC
- #define GDISP_USE_GPIO
- #define GDISP_VMT_NAME1(x) x##YourDriver1
- #define GDISP_VMT_NAME2(x) x##YourDriver2
- #define TDISP_COLUMNS 16
- #define TDISP_ROWS 2
-*/
-
-#endif /* _GFXCONF_H */
+/**
+ * This file has a different license to the rest of the GFX system.
+ * You can copy, modify and distribute this file as you see fit.
+ * You do not need to publish your source modifications to this file.
+ * The only thing you are not permitted to do is to relicense it
+ * under a different license.
+ */
+
+/**
+ * Copy this file into your project directory and rename it as gfxconf.h
+ * Edit your copy to turn on the GFX features you want to use.
+ */
+
+#ifndef _GFXCONF_H
+#define _GFXCONF_H
+
+/* GFX subsystems to turn on */
+#define GFX_USE_GDISP FALSE
+#define GFX_USE_TDISP FALSE
+#define GFX_USE_GWIN FALSE
+#define GFX_USE_GEVENT FALSE
+#define GFX_USE_GTIMER FALSE
+#define GFX_USE_GINPUT FALSE
+#define GFX_USE_GADC FALSE
+#define GFX_USE_GAUDIN FALSE
+#define GFX_USE_GAUDOUT FALSE
+#define GFX_USE_GMISC FALSE
+
+/* Features for the GDISP subsystem */
+#define GDISP_NEED_VALIDATION TRUE
+#define GDISP_NEED_CLIP TRUE
+#define GDISP_NEED_TEXT TRUE
+#define GDISP_NEED_CIRCLE TRUE
+#define GDISP_NEED_ELLIPSE TRUE
+#define GDISP_NEED_ARC FALSE
+#define GDISP_NEED_SCROLL FALSE
+#define GDISP_NEED_PIXELREAD FALSE
+#define GDISP_NEED_CONTROL FALSE
+#define GDISP_NEED_MULTITHREAD FALSE
+#define GDISP_NEED_ASYNC FALSE
+#define GDISP_NEED_MSGAPI FALSE
+
+/* GDISP - builtin fonts */
+#define GDISP_OLD_FONT_DEFINITIONS FALSE
+#define GDISP_INCLUDE_FONT_SMALL TRUE
+#define GDISP_INCLUDE_FONT_LARGER TRUE
+#define GDISP_INCLUDE_FONT_UI1 TRUE
+#define GDISP_INCLUDE_FONT_UI2 TRUE
+#define GDISP_INCLUDE_FONT_LARGENUMBERS TRUE
+
+/* Features for the TDISP subsystem. */
+#define TDISP_NEED_MULTITHREAD FALSE
+
+/* Features for the GWIN subsystem. */
+#define GWIN_NEED_BUTTON FALSE
+#define GWIN_NEED_CONSOLE FALSE
+#define GWIN_NEED_GRAPH FALSE
+
+/* Features for the GEVENT subsystem. */
+#define GEVENT_ASSERT_NO_RESOURCE FALSE
+
+/* Features for the GTIMER subsystem. */
+/* NONE */
+
+/* Features for the GINPUT subsystem. */
+#define GINPUT_NEED_MOUSE FALSE
+#define GINPUT_NEED_KEYBOARD FALSE
+#define GINPUT_NEED_TOGGLE FALSE
+#define GINPUT_NEED_DIAL FALSE
+
+/* Features for the GADC subsystem. */
+/* NONE */
+
+/* Features for the GAUDIN subsystem. */
+/* NONE */
+
+/* Features for the GAUDOUT subsystem. */
+/* NONE */
+
+/* Features for the GMISC subsystem. */
+#define GMISC_NEED_ARRAYOPS FALSE
+
+/* Optional Parameters for various subsystems */
+/*
+ #define GDISP_MAX_FONT_HEIGHT 16
+ #define GEVENT_MAXIMUM_SIZE 32
+ #define GEVENT_MAX_SOURCE_LISTENERS 32
+ #define GTIMER_THREAD_WORKAREA_SIZE 512
+ #define GADC_MAX_LOWSPEED_DEVICES 4
+*/
+
+/* Optional Low Level Driver Definitions */
+/*
+ #define GDISP_USE_CUSTOM_BOARD FALSE
+ #define GDISP_SCREEN_WIDTH 320
+ #define GDISP_SCREEN_HEIGHT 240
+ #define GDISP_USE_FSMC
+ #define GDISP_USE_GPIO
+
+ #define TDISP_COLUMNS 16
+ #define TDISP_ROWS 2
+*/
+
+#endif /* _GFXCONF_H */
+
diff --git a/include/gdisp/gdisp.h b/include/gdisp/gdisp.h
index da6d859f..b2e6df53 100644
--- a/include/gdisp/gdisp.h
+++ b/include/gdisp/gdisp.h
@@ -201,26 +201,26 @@ extern "C" {
#else
/* The same as above but use the low level driver directly if no multi-thread support is needed */
- #define gdispInit(gdisp) GDISP_LLD(init)()
+ #define gdispInit(gdisp) lld_gdisp_init()
#define gdispIsBusy() FALSE
- #define gdispClear(color) GDISP_LLD(clear)(color)
- #define gdispDrawPixel(x, y, color) GDISP_LLD(drawpixel)(x, y, color)
- #define gdispDrawLine(x0, y0, x1, y1, color) GDISP_LLD(drawline)(x0, y0, x1, y1, color)
- #define gdispFillArea(x, y, cx, cy, color) GDISP_LLD(fillarea)(x, y, cx, cy, color)
- #define gdispBlitAreaEx(x, y, cx, cy, sx, sy, scx, buf) GDISP_LLD(blitareaex)(x, y, cx, cy, sx, sy, scx, buf)
- #define gdispSetClip(x, y, cx, cy) GDISP_LLD(setclip)(x, y, cx, cy)
- #define gdispDrawCircle(x, y, radius, color) GDISP_LLD(drawcircle)(x, y, radius, color)
- #define gdispFillCircle(x, y, radius, color) GDISP_LLD(fillcircle)(x, y, radius, color)
- #define gdispDrawArc(x, y, radius, sangle, eangle, color) GDISP_LLD(drawarc)(x, y, radius, sangle, eangle, color)
- #define gdispFillArc(x, y, radius, sangle, eangle, color) GDISP_LLD(fillarc)(x, y, radius, sangle, eangle, color)
- #define gdispDrawEllipse(x, y, a, b, color) GDISP_LLD(drawellipse)(x, y, a, b, color)
- #define gdispFillEllipse(x, y, a, b, color) GDISP_LLD(fillellipse)(x, y, a, b, color)
- #define gdispDrawChar(x, y, c, font, color) GDISP_LLD(drawchar)(x, y, c, font, color)
- #define gdispFillChar(x, y, c, font, color, bgcolor) GDISP_LLD(fillchar)(x, y, c, font, color, bgcolor)
- #define gdispGetPixelColor(x, y) GDISP_LLD(getpixelcolor)(x, y)
- #define gdispVerticalScroll(x, y, cx, cy, lines, bgcolor) GDISP_LLD(verticalscroll)(x, y, cx, cy, lines, bgcolor)
- #define gdispControl(what, value) GDISP_LLD(control)(what, value)
- #define gdispQuery(what) GDISP_LLD(query)(what)
+ #define gdispClear(color) lld_gdisp_clear(color)
+ #define gdispDrawPixel(x, y, color) lld_gdisp_draw_pixel(x, y, color)
+ #define gdispDrawLine(x0, y0, x1, y1, color) lld_gdisp_draw_line(x0, y0, x1, y1, color)
+ #define gdispFillArea(x, y, cx, cy, color) lld_gdisp_fill_area(x, y, cx, cy, color)
+ #define gdispBlitAreaEx(x, y, cx, cy, sx, sy, scx, buf) lld_gdisp_blit_area_ex(x, y, cx, cy, sx, sy, scx, buf)
+ #define gdispSetClip(x, y, cx, cy) lld_gdisp_set_clip(x, y, cx, cy)
+ #define gdispDrawCircle(x, y, radius, color) lld_gdisp_draw_circle(x, y, radius, color)
+ #define gdispFillCircle(x, y, radius, color) lld_gdisp_fill_circle(x, y, radius, color)
+ #define gdispDrawArc(x, y, radius, sangle, eangle, color) lld_gdisp_draw_arc(x, y, radius, sangle, eangle, color)
+ #define gdispFillArc(x, y, radius, sangle, eangle, color) lld_gdisp_fill_arc(x, y, radius, sangle, eangle, color)
+ #define gdispDrawEllipse(x, y, a, b, color) lld_gdisp_draw_ellipse(x, y, a, b, color)
+ #define gdispFillEllipse(x, y, a, b, color) lld_gdisp_fill_ellipse(x, y, a, b, color)
+ #define gdispDrawChar(x, y, c, font, color) lld_gdisp_draw_char(x, y, c, font, color)
+ #define gdispFillChar(x, y, c, font, color, bgcolor) lld_gdisp_fill_char(x, y, c, font, color, bgcolor)
+ #define gdispGetPixelColor(x, y) lld_gdisp_get_pixel_color(x, y)
+ #define gdispVerticalScroll(x, y, cx, cy, lines, bgcolor) lld_gdisp_vertical_scroll(x, y, cx, cy, lines, bgcolor)
+ #define gdispControl(what, value) lld_gdisp_control(what, value)
+ #define gdispQuery(what) lld_gdisp_query(what)
#endif
diff --git a/include/gdisp/lld/emulation.c b/include/gdisp/lld/emulation.c
index a514458c..86301ed5 100644
--- a/include/gdisp/lld/emulation.c
+++ b/include/gdisp/lld/emulation.c
@@ -52,13 +52,13 @@
#endif
#if !GDISP_HARDWARE_CLEARS
- void GDISP_LLD(clear)(color_t color) {
- GDISP_LLD(fillarea)(0, 0, GDISP.Width, GDISP.Height, color);
+ void lld_gdisp_clear(color_t color) {
+ lld_gdisp_fill_area(0, 0, GDISP.Width, GDISP.Height, color);
}
#endif
#if !GDISP_HARDWARE_LINES
- void GDISP_LLD(drawline)(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color) {
+ void lld_gdisp_draw_line(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color) {
int16_t dy, dx;
int16_t addx, addy;
int16_t P, diff, i;
@@ -67,16 +67,16 @@
// speed improvement if vertical or horizontal
if (x0 == x1) {
if (y1 > y0)
- GDISP_LLD(fillarea)(x0, y0, 1, y1-y0+1, color);
+ lld_gdisp_fill_area(x0, y0, 1, y1-y0+1, color);
else
- GDISP_LLD(fillarea)(x0, y1, 1, y0-y1+1, color);
+ lld_gdisp_fill_area(x0, y1, 1, y0-y1+1, color);
return;
}
if (y0 == y1) {
if (x1 > x0)
- GDISP_LLD(fillarea)(x0, y0, x1-x0+1, 1, color);
+ lld_gdisp_fill_area(x0, y0, x1-x0+1, 1, color);
else
- GDISP_LLD(fillarea)(x0, y1, x0-x1+1, 1, color);
+ lld_gdisp_fill_area(x0, y1, x0-x1+1, 1, color);
return;
}
#endif
@@ -102,7 +102,7 @@
diff = P - dx;
for(i=0; i<=dx; ++i) {
- GDISP_LLD(drawpixel)(x0, y0, color);
+ lld_gdisp_draw_pixel(x0, y0, color);
if (P < 0) {
P += dy;
x0 += addx;
@@ -118,7 +118,7 @@
diff = P - dy;
for(i=0; i<=dy; ++i) {
- GDISP_LLD(drawpixel)(x0, y0, color);
+ lld_gdisp_draw_pixel(x0, y0, color);
if (P < 0) {
P += dx;
y0 += addy;
@@ -133,16 +133,16 @@
#endif
#if !GDISP_HARDWARE_FILLS
- void GDISP_LLD(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
+ void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
#if GDISP_HARDWARE_SCROLL
- GDISP_LLD(verticalscroll)(x, y, cx, cy, cy, color);
+ lld_gdisp_vertical_scroll(x, y, cx, cy, cy, color);
#elif GDISP_HARDWARE_LINES
coord_t x1, y1;
x1 = x + cx - 1;
y1 = y + cy;
for(; y < y1; y++)
- GDISP_LLD(drawline)(x, y, x1, y, color);
+ lld_gdisp_draw_line(x, y, x1, y, color);
#else
coord_t x0, x1, y1;
@@ -151,13 +151,13 @@
y1 = y + cy;
for(; y < y1; y++)
for(x = x0; x < x1; x++)
- GDISP_LLD(drawpixel)(x, y, color);
+ lld_gdisp_draw_pixel(x, y, color);
#endif
}
#endif
#if !GDISP_HARDWARE_BITFILLS
- void GDISP_LLD(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
+ void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
coord_t x0, x1, y1;
x0 = x;
@@ -167,12 +167,12 @@
srccx -= cx;
for(; y < y1; y++, buffer += srccx)
for(x=x0; x < x1; x++)
- GDISP_LLD(drawpixel)(x, y, *buffer++);
+ lld_gdisp_draw_pixel(x, y, *buffer++);
}
#endif
#if GDISP_NEED_CLIP && !GDISP_HARDWARE_CLIP
- void GDISP_LLD(setclip)(coord_t x, coord_t y, coord_t cx, coord_t cy) {
+ void lld_gdisp_set_clip(coord_t x, coord_t y, coord_t cx, coord_t cy) {
#if GDISP_NEED_VALIDATION
if (x >= GDISP.Width || y >= GDISP.Height || cx < 0 || cy < 0)
return;
@@ -189,7 +189,7 @@
#endif
#if GDISP_NEED_CIRCLE && !GDISP_HARDWARE_CIRCLES
- void GDISP_LLD(drawcircle)(coord_t x, coord_t y, coord_t radius, color_t color) {
+ void lld_gdisp_draw_circle(coord_t x, coord_t y, coord_t radius, color_t color) {
coord_t a, b, P;
a = 0;
@@ -197,14 +197,14 @@
P = 1 - radius;
do {
- GDISP_LLD(drawpixel)(x+a, y+b, color);
- GDISP_LLD(drawpixel)(x+b, y+a, color);
- GDISP_LLD(drawpixel)(x-a, y+b, color);
- GDISP_LLD(drawpixel)(x-b, y+a, color);
- GDISP_LLD(drawpixel)(x+b, y-a, color);
- GDISP_LLD(drawpixel)(x+a, y-b, color);
- GDISP_LLD(drawpixel)(x-a, y-b, color);
- GDISP_LLD(drawpixel)(x-b, y-a, color);
+ lld_gdisp_draw_pixel(x+a, y+b, color);
+ lld_gdisp_draw_pixel(x+b, y+a, color);
+ lld_gdisp_draw_pixel(x-a, y+b, color);
+ lld_gdisp_draw_pixel(x-b, y+a, color);
+ lld_gdisp_draw_pixel(x+b, y-a, color);
+ lld_gdisp_draw_pixel(x+a, y-b, color);
+ lld_gdisp_draw_pixel(x-a, y-b, color);
+ lld_gdisp_draw_pixel(x-b, y-a, color);
if (P < 0)
P += 3 + 2*a++;
else
@@ -214,7 +214,7 @@
#endif
#if GDISP_NEED_CIRCLE && !GDISP_HARDWARE_CIRCLEFILLS
- void GDISP_LLD(fillcircle)(coord_t x, coord_t y, coord_t radius, color_t color) {
+ void lld_gdisp_fill_circle(coord_t x, coord_t y, coord_t radius, color_t color) {
coord_t a, b, P;
a = 0;
@@ -222,10 +222,10 @@
P = 1 - radius;
do {
- GDISP_LLD(drawline)(x-a, y+b, x+a, y+b, color);
- GDISP_LLD(drawline)(x-a, y-b, x+a, y-b, color);
- GDISP_LLD(drawline)(x-b, y+a, x+b, y+a, color);
- GDISP_LLD(drawline)(x-b, y-a, x+b, y-a, color);
+ lld_gdisp_draw_line(x-a, y+b, x+a, y+b, color);
+ lld_gdisp_draw_line(x-a, y-b, x+a, y-b, color);
+ lld_gdisp_draw_line(x-b, y+a, x+b, y+a, color);
+ lld_gdisp_draw_line(x-b, y-a, x+b, y-a, color);
if (P < 0)
P += 3 + 2*a++;
else
@@ -235,16 +235,16 @@
#endif
#if GDISP_NEED_ELLIPSE && !GDISP_HARDWARE_ELLIPSES
- void GDISP_LLD(drawellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color) {
+ void lld_gdisp_draw_ellipse(coord_t x, coord_t y, coord_t a, coord_t b, color_t color) {
int dx = 0, dy = b; /* im I. Quadranten von links oben nach rechts unten */
long a2 = a*a, b2 = b*b;
long err = b2-(2*b-1)*a2, e2; /* Fehler im 1. Schritt */
do {
- GDISP_LLD(drawpixel)(x+dx, y+dy, color); /* I. Quadrant */
- GDISP_LLD(drawpixel)(x-dx, y+dy, color); /* II. Quadrant */
- GDISP_LLD(drawpixel)(x-dx, y-dy, color); /* III. Quadrant */
- GDISP_LLD(drawpixel)(x+dx, y-dy, color); /* IV. Quadrant */
+ lld_gdisp_draw_pixel(x+dx, y+dy, color); /* I. Quadrant */
+ lld_gdisp_draw_pixel(x-dx, y+dy, color); /* II. Quadrant */
+ lld_gdisp_draw_pixel(x-dx, y-dy, color); /* III. Quadrant */
+ lld_gdisp_draw_pixel(x+dx, y-dy, color); /* IV. Quadrant */
e2 = 2*err;
if(e2 < (2*dx+1)*b2) {
@@ -258,21 +258,21 @@
} while(dy >= 0);
while(dx++ < a) { /* fehlerhafter Abbruch bei flachen Ellipsen (b=1) */
- GDISP_LLD(drawpixel)(x+dx, y, color); /* -> Spitze der Ellipse vollenden */
- GDISP_LLD(drawpixel)(x-dx, y, color);
+ lld_gdisp_draw_pixel(x+dx, y, color); /* -> Spitze der Ellipse vollenden */
+ lld_gdisp_draw_pixel(x-dx, y, color);
}
}
#endif
#if GDISP_NEED_ELLIPSE && !GDISP_HARDWARE_ELLIPSEFILLS
- void GDISP_LLD(fillellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color) {
+ void lld_gdisp_fill_ellipse(coord_t x, coord_t y, coord_t a, coord_t b, color_t color) {
int dx = 0, dy = b; /* im I. Quadranten von links oben nach rechts unten */
long a2 = a*a, b2 = b*b;
long err = b2-(2*b-1)*a2, e2; /* Fehler im 1. Schritt */
do {
- GDISP_LLD(drawline)(x-dx,y+dy,x+dx,y+dy, color);
- GDISP_LLD(drawline)(x-dx,y-dy,x+dx,y-dy, color);
+ lld_gdisp_draw_line(x-dx,y+dy,x+dx,y+dy, color);
+ lld_gdisp_draw_line(x-dx,y-dy,x+dx,y-dy, color);
e2 = 2*err;
if(e2 < (2*dx+1)*b2) {
@@ -286,8 +286,8 @@
} while(dy >= 0);
while(dx++ < a) { /* fehlerhafter Abbruch bei flachen Ellipsen (b=1) */
- GDISP_LLD(drawpixel)(x+dx, y, color); /* -> Spitze der Ellipse vollenden */
- GDISP_LLD(drawpixel)(x-dx, y, color);
+ lld_gdisp_draw_pixel(x+dx, y, color); /* -> Spitze der Ellipse vollenden */
+ lld_gdisp_draw_pixel(x-dx, y, color);
}
}
#endif
@@ -325,13 +325,13 @@
do {
if(x-a <= x_maxI && x-a >= x_minI)
- GDISP_LLD(drawpixel)(x-a, y-b, color);
+ lld_gdisp_draw_pixel(x-a, y-b, color);
if(x+a <= x_maxI && x+a >= x_minI)
- GDISP_LLD(drawpixel)(x+a, y-b, color);
+ lld_gdisp_draw_pixel(x+a, y-b, color);
if(x-b <= x_maxI && x-b >= x_minI)
- GDISP_LLD(drawpixel)(x-b, y-a, color);
+ lld_gdisp_draw_pixel(x-b, y-a, color);
if(x+b <= x_maxI && x+b >= x_minI)
- GDISP_LLD(drawpixel)(x+b, y-a, color);
+ lld_gdisp_draw_pixel(x+b, y-a, color);
if (P < 0) {
P = P + 3 + 2*a;
@@ -359,13 +359,13 @@
do {
if(x-a <= x_maxII && x-a >= x_minII)
- GDISP_LLD(drawpixel)(x-a, y+b, color);
+ lld_gdisp_draw_pixel(x-a, y+b, color);
if(x+a <= x_maxII && x+a >= x_minII)
- GDISP_LLD(drawpixel)(x+a, y+b, color);
+ lld_gdisp_draw_pixel(x+a, y+b, color);
if(x-b <= x_maxII && x-b >= x_minII)
- GDISP_LLD(drawpixel)(x-b, y+a, color);
+ lld_gdisp_draw_pixel(x-b, y+a, color);
if(x+b <= x_maxII && x+b >= x_minII)
- GDISP_LLD(drawpixel)(x+b, y+a, color);
+ lld_gdisp_draw_pixel(x+b, y+a, color);
if (P < 0) {
P = P + 3 + 2*a;
@@ -379,7 +379,7 @@
}
}
- void GDISP_LLD(drawarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color) {
+ void lld_gdisp_draw_arc(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color) {
if(endangle < startangle) {
_draw_arc(x, y, startangle, 360, radius, color);
_draw_arc(x, y, 0, endangle, radius, color);
@@ -419,13 +419,13 @@
do {
if(x-a <= x_maxI && x-a >= x_minI)
- GDISP_LLD(drawline)(x, y, x-a, y-b, color);
+ lld_gdisp_draw_line(x, y, x-a, y-b, color);
if(x+a <= x_maxI && x+a >= x_minI)
- GDISP_LLD(drawline)(x, y, x+a, y-b, color);
+ lld_gdisp_draw_line(x, y, x+a, y-b, color);
if(x-b <= x_maxI && x-b >= x_minI)
- GDISP_LLD(drawline)(x, y, x-b, y-a, color);
+ lld_gdisp_draw_line(x, y, x-b, y-a, color);
if(x+b <= x_maxI && x+b >= x_minI)
- GDISP_LLD(drawline)(x, y, x+b, y-a, color);
+ lld_gdisp_draw_line(x, y, x+b, y-a, color);
if (P < 0) {
P = P + 3 + 2*a;
@@ -453,13 +453,13 @@
do {
if(x-a <= x_maxII && x-a >= x_minII)
- GDISP_LLD(drawline)(x, y, x-a, y+b, color);
+ lld_gdisp_draw_line(x, y, x-a, y+b, color);
if(x+a <= x_maxII && x+a >= x_minII)
- GDISP_LLD(drawline)(x, y, x+a, y+b, color);
+ lld_gdisp_draw_line(x, y, x+a, y+b, color);
if(x-b <= x_maxII && x-b >= x_minII)
- GDISP_LLD(drawline)(x, y, x-b, y+a, color);
+ lld_gdisp_draw_line(x, y, x-b, y+a, color);
if(x+b <= x_maxII && x+b >= x_minII)
- GDISP_LLD(drawline)(x, y, x+b, y+a, color);
+ lld_gdisp_draw_line(x, y, x+b, y+a, color);
if (P < 0) {
P = P + 3 + 2*a;
@@ -473,7 +473,7 @@
}
}
- void GDISP_LLD(fillarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color) {
+ void lld_gdisp_fill_arc(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color) {
if(endangle < startangle) {
_fill_arc(x, y, startangle, 360, radius, color);
_fill_arc(x, y, 0, endangle, radius, color);
@@ -488,7 +488,7 @@
#endif
#if GDISP_NEED_TEXT && !GDISP_HARDWARE_TEXT
- void GDISP_LLD(drawchar)(coord_t x, coord_t y, char c, font_t font, color_t color) {
+ void lld_gdisp_draw_char(coord_t x, coord_t y, char c, font_t font, color_t color) {
const fontcolumn_t *ptr;
fontcolumn_t column;
coord_t width, height, xscale, yscale;
@@ -515,7 +515,7 @@
if (column & 0x01) {
for(xs=0; xs < xscale; xs++)
for(ys=0; ys < yscale; ys++)
- GDISP_LLD(drawpixel)(x+i+xs, y+j+ys, color);
+ lld_gdisp_draw_pixel(x+i+xs, y+j+ys, color);
}
}
}
@@ -523,7 +523,7 @@
#endif
#if GDISP_NEED_TEXT && !GDISP_HARDWARE_TEXTFILLS
- void GDISP_LLD(fillchar)(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor) {
+ void lld_gdisp_fill_char(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor) {
coord_t width, height;
coord_t xscale, yscale;
@@ -540,10 +540,10 @@
#if GDISP_HARDWARE_TEXT || GDISP_SOFTWARE_TEXTFILLDRAW
/* Fill the area */
- GDISP_LLD(fillarea)(x, y, width, height, bgcolor);
+ lld_gdisp_fill_area(x, y, width, height, bgcolor);
/* Draw the text */
- GDISP_LLD(drawchar)(x, y, c, font, color);
+ lld_gdisp_draw_char(x, y, c, font, color);
/* Method 2: Create a single column bitmap and then blit it */
#elif GDISP_HARDWARE_BITFILLS && GDISP_SOFTWARE_TEXTBLITCOLUMN
@@ -582,7 +582,7 @@
}
for(xs=0; xs < xscale; xs++)
- GDISP_LLD(blitareaex)(x+i+xs, y, 1, height, 0, 0, 1, buf);
+ lld_gdisp_blit_area_ex(x+i+xs, y, 1, height, 0, 0, 1, buf);
}
}
@@ -626,7 +626,7 @@
}
/* [Patch by Badger] Write all in one stroke */
- GDISP_LLD(blitareaex)(x, y, width, height, 0, 0, width, buf);
+ lld_gdisp_blit_area_ex(x, y, width, height, 0, 0, width, buf);
}
/* Method 4: Draw pixel by pixel */
@@ -648,11 +648,11 @@
if (column & 0x01) {
for(xs=0; xs < xscale; xs++)
for(ys=0; ys < yscale; ys++)
- GDISP_LLD(drawpixel)(x+i+xs, y+j+ys, color);
+ lld_gdisp_draw_pixel(x+i+xs, y+j+ys, color);
} else {
for(xs=0; xs < xscale; xs++)
for(ys=0; ys < yscale; ys++)
- GDISP_LLD(drawpixel)(x+i+xs, y+j+ys, bgcolor);
+ lld_gdisp_draw_pixel(x+i+xs, y+j+ys, bgcolor);
}
}
}
@@ -663,7 +663,7 @@
#if GDISP_NEED_CONTROL && !GDISP_HARDWARE_CONTROL
- void GDISP_LLD(control)(unsigned what, void *value) {
+ void lld_gdisp_control(unsigned what, void *value) {
(void)what;
(void)value;
/* Ignore everything */
@@ -671,7 +671,7 @@
#endif
#if !GDISP_HARDWARE_QUERY
-void *GDISP_LLD(query)(unsigned what) {
+void *lld_gdisp_query(unsigned what) {
switch(what) {
case GDISP_QUERY_WIDTH: return (void *)(unsigned)GDISP.Width;
case GDISP_QUERY_HEIGHT: return (void *)(unsigned)GDISP.Height;
@@ -685,82 +685,82 @@ void *GDISP_LLD(query)(unsigned what) {
#endif
#if GDISP_NEED_MSGAPI
- void GDISP_LLD(msgdispatch)(gdisp_lld_msg_t *msg) {
+ void lld_gdisp_msg_dispatch(gdisp_lld_msg_t *msg) {
switch(msg->action) {
case GDISP_LLD_MSG_NOP:
break;
case GDISP_LLD_MSG_INIT:
- GDISP_LLD(init)();
+ lld_gdisp_init();
break;
case GDISP_LLD_MSG_CLEAR:
- GDISP_LLD(clear)(msg->clear.color);
+ lld_gdisp_clear(msg->clear.color);
break;
case GDISP_LLD_MSG_DRAWPIXEL:
- GDISP_LLD(drawpixel)(msg->drawpixel.x, msg->drawpixel.y, msg->drawpixel.color);
+ lld_gdisp_draw_pixel(msg->drawpixel.x, msg->drawpixel.y, msg->drawpixel.color);
break;
case GDISP_LLD_MSG_FILLAREA:
- GDISP_LLD(fillarea)(msg->fillarea.x, msg->fillarea.y, msg->fillarea.cx, msg->fillarea.cy, msg->fillarea.color);
+ lld_gdisp_fill_area(msg->fillarea.x, msg->fillarea.y, msg->fillarea.cx, msg->fillarea.cy, msg->fillarea.color);
break;
case GDISP_LLD_MSG_BLITAREA:
- GDISP_LLD(blitareaex)(msg->blitarea.x, msg->blitarea.y, msg->blitarea.cx, msg->blitarea.cy, msg->blitarea.srcx, msg->blitarea.srcy, msg->blitarea.srccx, msg->blitarea.buffer);
+ lld_gdisp_blit_area_ex(msg->blitarea.x, msg->blitarea.y, msg->blitarea.cx, msg->blitarea.cy, msg->blitarea.srcx, msg->blitarea.srcy, msg->blitarea.srccx, msg->blitarea.buffer);
break;
case GDISP_LLD_MSG_DRAWLINE:
- GDISP_LLD(drawline)(msg->drawline.x0, msg->drawline.y0, msg->drawline.x1, msg->drawline.y1, msg->drawline.color);
+ lld_gdisp_draw_line(msg->drawline.x0, msg->drawline.y0, msg->drawline.x1, msg->drawline.y1, msg->drawline.color);
break;
#if GDISP_NEED_CLIP
case GDISP_LLD_MSG_SETCLIP:
- GDISP_LLD(setclip)(msg->setclip.x, msg->setclip.y, msg->setclip.cx, msg->setclip.cy);
+ lld_gdisp_set_clip(msg->setclip.x, msg->setclip.y, msg->setclip.cx, msg->setclip.cy);
break;
#endif
#if GDISP_NEED_CIRCLE
case GDISP_LLD_MSG_DRAWCIRCLE:
- GDISP_LLD(drawcircle)(msg->drawcircle.x, msg->drawcircle.y, msg->drawcircle.radius, msg->drawcircle.color);
+ lld_gdisp_draw_circle(msg->drawcircle.x, msg->drawcircle.y, msg->drawcircle.radius, msg->drawcircle.color);
break;
case GDISP_LLD_MSG_FILLCIRCLE:
- GDISP_LLD(fillcircle)(msg->fillcircle.x, msg->fillcircle.y, msg->fillcircle.radius, msg->fillcircle.color);
+ lld_gdisp_fill_circle(msg->fillcircle.x, msg->fillcircle.y, msg->fillcircle.radius, msg->fillcircle.color);
break;
#endif
#if GDISP_NEED_ELLIPSE
case GDISP_LLD_MSG_DRAWELLIPSE:
- GDISP_LLD(drawellipse)(msg->drawellipse.x, msg->drawellipse.y, msg->drawellipse.a, msg->drawellipse.b, msg->drawellipse.color);
+ lld_gdisp_draw_ellipse(msg->drawellipse.x, msg->drawellipse.y, msg->drawellipse.a, msg->drawellipse.b, msg->drawellipse.color);
break;
case GDISP_LLD_MSG_FILLELLIPSE:
- GDISP_LLD(fillellipse)(msg->fillellipse.x, msg->fillellipse.y, msg->fillellipse.a, msg->fillellipse.b, msg->fillellipse.color);
+ lld_gdisp_fill_ellipse(msg->fillellipse.x, msg->fillellipse.y, msg->fillellipse.a, msg->fillellipse.b, msg->fillellipse.color);
break;
#endif
#if GDISP_NEED_ARC
case GDISP_LLD_MSG_DRAWARC:
- GDISP_LLD(drawcircle)(msg->drawarc.x, msg->drawarc.y, msg->drawarc.radius, msg->drawarc.startangle, msg->drawarc.endangle, msg->drawarc.color);
+ lld_gdisp_draw_circle(msg->drawarc.x, msg->drawarc.y, msg->drawarc.radius, msg->drawarc.startangle, msg->drawarc.endangle, msg->drawarc.color);
break;
case GDISP_LLD_MSG_FILLARC:
- GDISP_LLD(fillcircle)(msg->fillarc.x, msg->fillarc.y, msg->fillarc.radius, msg->fillarc.startangle, msg->fillarc.endangle, msg->fillarc.color);
+ lld_gdisp_fill_circle(msg->fillarc.x, msg->fillarc.y, msg->fillarc.radius, msg->fillarc.startangle, msg->fillarc.endangle, msg->fillarc.color);
break;
#endif
#if GDISP_NEED_TEXT
case GDISP_LLD_MSG_DRAWCHAR:
- GDISP_LLD(drawchar)(msg->drawchar.x, msg->drawchar.y, msg->drawchar.c, msg->drawchar.font, msg->drawchar.color);
+ lld_gdisp_draw_char(msg->drawchar.x, msg->drawchar.y, msg->drawchar.c, msg->drawchar.font, msg->drawchar.color);
break;
case GDISP_LLD_MSG_FILLCHAR:
- GDISP_LLD(fillchar)(msg->fillchar.x, msg->fillchar.y, msg->fillchar.c, msg->fillchar.font, msg->fillchar.color, msg->fillchar.bgcolor);
+ lld_gdisp_fill_char(msg->fillchar.x, msg->fillchar.y, msg->fillchar.c, msg->fillchar.font, msg->fillchar.color, msg->fillchar.bgcolor);
break;
#endif
#if GDISP_NEED_PIXELREAD
case GDISP_LLD_MSG_GETPIXELCOLOR:
- msg->getpixelcolor.result = GDISP_LLD(getpixelcolor)(msg->getpixelcolor.x, msg->getpixelcolor.y);
+ msg->getpixelcolor.result = lld_gdisp_get_pixel_color(msg->getpixelcolor.x, msg->getpixelcolor.y);
break;
#endif
#if GDISP_NEED_SCROLL
case GDISP_LLD_MSG_VERTICALSCROLL:
- GDISP_LLD(verticalscroll)(msg->verticalscroll.x, msg->verticalscroll.y, msg->verticalscroll.cx, msg->verticalscroll.cy, msg->verticalscroll.lines, msg->verticalscroll.bgcolor);
+ lld_gdisp_vertical_scroll(msg->verticalscroll.x, msg->verticalscroll.y, msg->verticalscroll.cx, msg->verticalscroll.cy, msg->verticalscroll.lines, msg->verticalscroll.bgcolor);
break;
#endif
#if GDISP_NEED_CONTROL
case GDISP_LLD_MSG_CONTROL:
- GDISP_LLD(control)(msg->control.what, msg->control.value);
+ lld_gdisp_control(msg->control.what, msg->control.value);
break;
#endif
case GDISP_LLD_MSG_QUERY:
- msg->query.result = GDISP_LLD(query)(msg->query.what);
+ msg->query.result = lld_gdisp_query(msg->query.what);
break;
}
}
diff --git a/include/gdisp/lld/gdisp_lld.h b/include/gdisp/lld/gdisp_lld.h
index 76b698bc..da1b29c6 100644
--- a/include/gdisp/lld/gdisp_lld.h
+++ b/include/gdisp/lld/gdisp_lld.h
@@ -19,7 +19,7 @@
*/
/**
- * @file include/gdisp/lld/gdisp_lld.h
+ * @file include/gdisp/lld/lld_gdisp.h
* @brief GDISP Graphic Driver subsystem low level driver header.
*
* @addtogroup GDISP
@@ -366,7 +366,7 @@
#define RGB2COLOR(r,g,b) ((color_t)((((r) & 0xF8)<<8) | (((g) & 0xFC)<<3) | (((b) & 0xF8)>>3)))
#define HTML2COLOR(h) ((color_t)((((h) & 0xF80000)>>8) | (((h) & 0x00FC00)>>5) | (((h) & 0x0000F8)>>3)))
#define RED_OF(c) (((c) & 0xF800)>>8)
- #define GREEN_OF(c) (((c)&0x007E)>>3)
+ #define GREEN_OF(c) (((c)&0x07E0)>>3)
#define BLUE_OF(c) (((c)&0x001F)<<3)
#elif GDISP_PIXELFORMAT == GDISP_PIXELFORMAT_RGB888
@@ -458,79 +458,74 @@ typedef enum powermode {powerOff, powerSleep, powerDeepSleep, powerOn} gdisp_pow
/* External declarations. */
/*===========================================================================*/
-#ifndef GDISP_LLD_VMT
- /* Special magic stuff for the VMT driver */
- #define GDISP_LLD_VMT(x) GDISP_LLD(x)
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
/* Core functions */
- extern bool_t GDISP_LLD(init)(void);
+ extern bool_t lld_gdisp_init(void);
/* Some of these functions will be implemented in software by the high level driver
- depending on the GDISP_HARDWARE_XXX macros defined in gdisp_lld_config.h.
+ depending on the GDISP_HARDWARE_XXX macros defined in lld_gdisp_config.h.
*/
/* Drawing functions */
- extern void GDISP_LLD_VMT(clear)(color_t color);
- extern void GDISP_LLD_VMT(drawpixel)(coord_t x, coord_t y, color_t color);
- extern void GDISP_LLD_VMT(fillarea)(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color);
- extern void GDISP_LLD_VMT(blitareaex)(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer);
- extern void GDISP_LLD_VMT(drawline)(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color);
+ extern void lld_gdisp_clear(color_t color);
+ extern void lld_gdisp_draw_pixel(coord_t x, coord_t y, color_t color);
+ extern void lld_gdisp_fill_area(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color);
+ extern void lld_gdisp_blit_area_ex(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer);
+ extern void lld_gdisp_draw_line(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color);
/* Circular Drawing Functions */
#if GDISP_NEED_CIRCLE
- extern void GDISP_LLD_VMT(drawcircle)(coord_t x, coord_t y, coord_t radius, color_t color);
- extern void GDISP_LLD_VMT(fillcircle)(coord_t x, coord_t y, coord_t radius, color_t color);
+ extern void lld_gdisp_draw_circle(coord_t x, coord_t y, coord_t radius, color_t color);
+ extern void lld_gdisp_fill_circle(coord_t x, coord_t y, coord_t radius, color_t color);
#endif
#if GDISP_NEED_ELLIPSE
- extern void GDISP_LLD_VMT(drawellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
- extern void GDISP_LLD_VMT(fillellipse)(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
+ extern void lld_gdisp_draw_ellipse(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
+ extern void lld_gdisp_fill_ellipse(coord_t x, coord_t y, coord_t a, coord_t b, color_t color);
#endif
/* Arc Drawing Functions */
#if GDISP_NEED_ARC
- extern void GDISP_LLD_VMT(drawarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color);
- extern void GDISP_LLD_VMT(fillarc)(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color);
+ extern void lld_gdisp_draw_arc(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color);
+ extern void lld_gdisp_fill_arc(coord_t x, coord_t y, coord_t radius, coord_t startangle, coord_t endangle, color_t color);
#endif
/* Text Rendering Functions */
#if GDISP_NEED_TEXT
- extern void GDISP_LLD_VMT(drawchar)(coord_t x, coord_t y, char c, font_t font, color_t color);
- extern void GDISP_LLD_VMT(fillchar)(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor);
+ extern void lld_gdisp_draw_char(coord_t x, coord_t y, char c, font_t font, color_t color);
+ extern void lld_gdisp_fill_char(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor);
#endif
/* Pixel readback */
#if GDISP_NEED_PIXELREAD
- extern color_t GDISP_LLD_VMT(getpixelcolor)(coord_t x, coord_t y);
+ extern color_t lld_gdisp_get_pixel_color(coord_t x, coord_t y);
#endif
/* Scrolling Function - clears the area scrolled out */
#if GDISP_NEED_SCROLL
- extern void GDISP_LLD_VMT(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor);
+ extern void lld_gdisp_vertical_scroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor);
#endif
/* Set driver specific control */
#if GDISP_NEED_CONTROL
- extern void GDISP_LLD_VMT(control)(unsigned what, void *value);
+ extern void lld_gdisp_control(unsigned what, void *value);
#endif
/* Query driver specific data */
- extern void *GDISP_LLD_VMT(query)(unsigned what);
+ extern void *lld_gdisp_query(unsigned what);
/* Clipping Functions */
#if GDISP_NEED_CLIP
- extern void GDISP_LLD_VMT(setclip)(coord_t x, coord_t y, coord_t cx, coord_t cy);
+ extern void lld_gdisp_set_clip(coord_t x, coord_t y, coord_t cx, coord_t cy);
#endif
/* Messaging API */
#if GDISP_NEED_MSGAPI
- #include "gdisp_lld_msgs.h"
- extern void GDISP_LLD(msgdispatch)(gdisp_lld_msg_t *msg);
+ #include "lld_gdisp_msgs.h"
+ extern void lld_gdisp_msg_dispatch(lld_gdisp_msg_t *msg);
#endif
#ifdef __cplusplus
diff --git a/include/gdisp/options.h b/include/gdisp/options.h
index 2fedd34d..ae33ec19 100644
--- a/include/gdisp/options.h
+++ b/include/gdisp/options.h
@@ -229,13 +229,8 @@
*/
/* #define GDISP_USE_FSMC */
/* #define GDISP_USE_GPIO */
- /**
- * @brief Define which two drivers will be used by the VMT layer.
- * @details Only required by the VMT driver.
- */
- /* #define GDISP_VMT_NAME1(x) x##YourDriver1 */
- /* #define GDISP_VMT_NAME2(x) x##YourDriver2 */
/** @} */
#endif /* _GDISP_OPTIONS_H */
/** @} */
+
diff --git a/releases.txt b/releases.txt
index 400d2d37..5607e821 100644
--- a/releases.txt
+++ b/releases.txt
@@ -7,6 +7,8 @@ FEATURE: Added ILI9325 driver - Thanks to Chris van Dongen aka _Sjaak
FEATURE: Added TDISP module
FIX: tdispGotoXY() renamed to tdispSetCursor()
FEATURE: Addition of GADC, GMISC, GAUDIN, GAUDOUT subsystems
+FIX: Removal of the GDISP_LLD() macro
+DEPRECATE: Removal of the GDISP VMT
*** changes after 1.4 ***
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c
index 48d00b95..c8383ff3 100644
--- a/src/gdisp/gdisp.c
+++ b/src/gdisp/gdisp.c
@@ -95,7 +95,7 @@
/* OK - we need to obtain the mutex in case a synchronous operation is occurring */
chMtxLock(&gdispMutex);
- GDISP_LLD(msgdispatch)(pmsg);
+ lld_gdisp_msg_dispatch(pmsg);
chMtxUnlock();
/* Mark the message as free */
@@ -153,7 +153,7 @@
/* Initialise driver */
chMtxLock(&gdispMutex);
- res = GDISP_LLD(init)();
+ res = lld_gdisp_init();
chMtxUnlock();
return res;
@@ -180,7 +180,7 @@
/* Initialise driver - synchronous */
chMtxLock(&gdispMutex);
- res = GDISP_LLD(init)();
+ res = lld_gdisp_init();
chMtxUnlock();
return res;
@@ -216,7 +216,7 @@
*/
void gdispClear(color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(clear)(color);
+ lld_gdisp_clear(color);
chMtxUnlock();
}
#elif GDISP_NEED_ASYNC
@@ -238,7 +238,7 @@
*/
void gdispDrawPixel(coord_t x, coord_t y, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(drawpixel)(x, y, color);
+ lld_gdisp_draw_pixel(x, y, color);
chMtxUnlock();
}
#elif GDISP_NEED_ASYNC
@@ -263,7 +263,7 @@
*/
void gdispDrawLine(coord_t x0, coord_t y0, coord_t x1, coord_t y1, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(drawline)(x0, y0, x1, y1, color);
+ lld_gdisp_draw_line(x0, y0, x1, y1, color);
chMtxUnlock();
}
#elif GDISP_NEED_ASYNC
@@ -290,7 +290,7 @@
*/
void gdispFillArea(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(fillarea)(x, y, cx, cy, color);
+ lld_gdisp_fill_area(x, y, cx, cy, color);
chMtxUnlock();
}
#elif GDISP_NEED_ASYNC
@@ -326,7 +326,7 @@
*/
void gdispBlitAreaEx(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer) {
chMtxLock(&gdispMutex);
- GDISP_LLD(blitareaex)(x, y, cx, cy, srcx, srcy, srccx, buffer);
+ lld_gdisp_blit_area_ex(x, y, cx, cy, srcx, srcy, srccx, buffer);
chMtxUnlock();
}
#elif GDISP_NEED_ASYNC
@@ -355,7 +355,7 @@
*/
void gdispSetClip(coord_t x, coord_t y, coord_t cx, coord_t cy) {
chMtxLock(&gdispMutex);
- GDISP_LLD(setclip)(x, y, cx, cy);
+ lld_gdisp_set_clip(x, y, cx, cy);
chMtxUnlock();
}
#elif GDISP_NEED_CLIP && GDISP_NEED_ASYNC
@@ -381,7 +381,7 @@
*/
void gdispDrawCircle(coord_t x, coord_t y, coord_t radius, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(drawcircle)(x, y, radius, color);
+ lld_gdisp_draw_circle(x, y, radius, color);
chMtxUnlock();
}
#elif GDISP_NEED_CIRCLE && GDISP_NEED_ASYNC
@@ -407,7 +407,7 @@
*/
void gdispFillCircle(coord_t x, coord_t y, coord_t radius, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(fillcircle)(x, y, radius, color);
+ lld_gdisp_fill_circle(x, y, radius, color);
chMtxUnlock();
}
#elif GDISP_NEED_CIRCLE && GDISP_NEED_ASYNC
@@ -433,7 +433,7 @@
*/
void gdispDrawEllipse(coord_t x, coord_t y, coord_t a, coord_t b, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(drawellipse)(x, y, a, b, color);
+ lld_gdisp_draw_ellipse(x, y, a, b, color);
chMtxUnlock();
}
#elif GDISP_NEED_ELLIPSE && GDISP_NEED_ASYNC
@@ -460,7 +460,7 @@
*/
void gdispFillEllipse(coord_t x, coord_t y, coord_t a, coord_t b, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(fillellipse)(x, y, a, b, color);
+ lld_gdisp_fill_ellipse(x, y, a, b, color);
chMtxUnlock();
}
#elif GDISP_NEED_ELLIPSE && GDISP_NEED_ASYNC
@@ -489,7 +489,7 @@
*/
void gdispDrawArc(coord_t x, coord_t y, coord_t radius, coord_t start, coord_t end, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(drawarc)(x, y, radius, start, end, color);
+ lld_gdisp_draw_arc(x, y, radius, start, end, color);
chMtxUnlock();
}
#elif GDISP_NEED_ARC && GDISP_NEED_ASYNC
@@ -520,7 +520,7 @@
*/
void gdispFillArc(coord_t x, coord_t y, coord_t radius, coord_t start, coord_t end, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(fillarc)(x, y, radius, start, end, color);
+ lld_gdisp_fill_arc(x, y, radius, start, end, color);
chMtxUnlock();
}
#elif GDISP_NEED_ARC && GDISP_NEED_ASYNC
@@ -605,7 +605,7 @@ void gdispFillRoundedBox(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t r
*/
void gdispDrawChar(coord_t x, coord_t y, char c, font_t font, color_t color) {
chMtxLock(&gdispMutex);
- GDISP_LLD(drawchar)(x, y, c, font, color);
+ lld_gdisp_draw_char(x, y, c, font, color);
chMtxUnlock();
}
#elif GDISP_NEED_TEXT && GDISP_NEED_ASYNC
@@ -634,7 +634,7 @@ void gdispFillRoundedBox(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t r
*/
void gdispFillChar(coord_t x, coord_t y, char c, font_t font, color_t color, color_t bgcolor) {
chMtxLock(&gdispMutex);
- GDISP_LLD(fillchar)(x, y, c, font, color, bgcolor);
+ lld_gdisp_fill_char(x, y, c, font, color, bgcolor);
chMtxUnlock();
}
#elif GDISP_NEED_TEXT && GDISP_NEED_ASYNC
@@ -664,7 +664,7 @@ void gdispFillRoundedBox(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t r
/* Always synchronous as it must return a value */
chMtxLock(&gdispMutex);
- c = GDISP_LLD(getpixelcolor)(x, y);
+ c = lld_gdisp_get_pixel_color(x, y);
chMtxUnlock();
return c;
@@ -687,7 +687,7 @@ void gdispFillRoundedBox(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t r
*/
void gdispVerticalScroll(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
chMtxLock(&gdispMutex);
- GDISP_LLD(verticalscroll)(x, y, cx, cy, lines, bgcolor);
+ lld_gdisp_vertical_scroll(x, y, cx, cy, lines, bgcolor);
chMtxUnlock();
}
#elif GDISP_NEED_SCROLL && GDISP_NEED_ASYNC
@@ -717,7 +717,7 @@ void gdispFillRoundedBox(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t r
*/
void gdispControl(unsigned what, void *value) {
chMtxLock(&gdispMutex);
- GDISP_LLD(control)(what, value);
+ lld_gdisp_control(what, value);
chMtxUnlock();
chThdSleepMilliseconds(100);
}
@@ -746,7 +746,7 @@ void gdispFillRoundedBox(coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t r
void *res;
chMtxLock(&gdispMutex);
- res = GDISP_LLD(query)(what);
+ res = lld_gdisp_query(what);
chMtxUnlock();
return res;
}
diff --git a/src/gwin/gwin.mk b/src/gwin/gwin.mk
index 947d11f3..3c560f43 100644
--- a/src/gwin/gwin.mk
+++ b/src/gwin/gwin.mk
@@ -2,4 +2,4 @@ GFXSRC += $(GFXLIB)/src/gwin/gwin.c \
$(GFXLIB)/src/gwin/console.c \
$(GFXLIB)/src/gwin/button.c \
$(GFXLIB)/src/gwin/graph.c
- \ No newline at end of file
+