aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gdisp')
-rw-r--r--drivers/gdisp/AlteraFramereader/board_alteraframereader_template.h4
-rw-r--r--drivers/gdisp/AlteraFramereader/gdisp_lld_alteraframereader.c6
-rw-r--r--drivers/gdisp/ED060SC4/board_ED060SC4_example.h2
-rw-r--r--drivers/gdisp/ED060SC4/board_ED060SC4_template.h2
-rw-r--r--drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c16
-rw-r--r--drivers/gdisp/Fb24bpp/board_fb24bpp_template.h4
-rw-r--r--drivers/gdisp/Fb24bpp/gdisp_lld_fb24bpp.c6
-rw-r--r--drivers/gdisp/HX8347D/board_HX8347D_template.h8
-rw-r--r--drivers/gdisp/ILI9225/gdisp_lld_ili9225.c2
-rw-r--r--drivers/gdisp/ILI9320/board_ILI9320_template.h8
-rw-r--r--drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c6
-rw-r--r--drivers/gdisp/ILI9325/board_ILI9325_template.h8
-rw-r--r--drivers/gdisp/ILI9325/gdisp_lld_ILI9325.c6
-rw-r--r--drivers/gdisp/ILI9341/board_ILI9341_template.h8
-rw-r--r--drivers/gdisp/ILI9341/gdisp_lld_ILI9341.c14
-rw-r--r--drivers/gdisp/ILI9342/gdisp_lld_ILI9342.c12
-rw-r--r--drivers/gdisp/ILI93xx/board_ILI93xx_template.h8
-rw-r--r--drivers/gdisp/ILI93xx/gdisp_lld_ILI93xx.c6
-rw-r--r--drivers/gdisp/ILI9481/board_ILI9481_template.h8
-rw-r--r--drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c6
-rw-r--r--drivers/gdisp/ILI9488/board_ILI9488_template.h8
-rw-r--r--drivers/gdisp/ILI9488/gdisp_lld_ILI9488.c4
-rw-r--r--drivers/gdisp/KS0108/board_KS0108_example.h40
-rw-r--r--drivers/gdisp/KS0108/gdisp_lld_KS0108.c12
-rw-r--r--drivers/gdisp/LGDP4532/board_LGDP4532_template.h8
-rw-r--r--drivers/gdisp/LGDP4532/gdisp_lld_LGDP4532.c4
-rw-r--r--drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_template.h6
-rw-r--r--drivers/gdisp/Nokia6610GE12/gdisp_lld_Nokia6610GE12.c6
-rw-r--r--drivers/gdisp/Nokia6610GE8/board_Nokia6610GE8_template.h6
-rw-r--r--drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c22
-rw-r--r--drivers/gdisp/PCD8544/board_PCD8544_template.h6
-rw-r--r--drivers/gdisp/PCD8544/gdisp_lld_PCD8544.c2
-rw-r--r--drivers/gdisp/PCF8812/board_PCF8812_template.h4
-rw-r--r--drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c2
-rw-r--r--drivers/gdisp/R61505U/board_R61505U_template.h8
-rw-r--r--drivers/gdisp/R61505U/gdisp_lld_R61505U.c6
-rwxr-xr-xdrivers/gdisp/RA6963/board_RA6963.h16
-rwxr-xr-xdrivers/gdisp/RA6963/gdisp_lld_RA6963.c32
-rw-r--r--drivers/gdisp/RA8875/board_RA8875_template.h6
-rw-r--r--drivers/gdisp/RA8875/gdisp_lld_RA8875.c6
-rw-r--r--drivers/gdisp/S6D1121/board_S6D1121_template.h8
-rw-r--r--drivers/gdisp/S6D1121/gdisp_lld_S6D1121.c4
-rw-r--r--drivers/gdisp/SPFD54124B/board_SPFD54124B_template.h6
-rw-r--r--drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c10
-rw-r--r--drivers/gdisp/SSD1289/board_SSD1289_template.h8
-rw-r--r--drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c4
-rw-r--r--drivers/gdisp/SSD1306/board_SSD1306_template.h4
-rw-r--r--drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c10
-rw-r--r--drivers/gdisp/SSD1322/board_SSD1322_template.h6
-rw-r--r--drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c6
-rw-r--r--drivers/gdisp/SSD1331/board_SSD1331_template.h4
-rw-r--r--drivers/gdisp/SSD1331/gdisp_lld_SSD1331.c4
-rw-r--r--drivers/gdisp/SSD1351/board_SSD1351_template.h8
-rw-r--r--drivers/gdisp/SSD1351/gdisp_lld_SSD1351.c4
-rw-r--r--drivers/gdisp/SSD1848/board_ssd1848_template.h8
-rw-r--r--drivers/gdisp/SSD1848/gdisp_lld_SSD1848.c74
-rw-r--r--drivers/gdisp/SSD1963/board_SSD1963_template.h4
-rw-r--r--drivers/gdisp/SSD1963/gdisp_lld_SSD1963.c24
-rw-r--r--drivers/gdisp/SSD2119/board_SSD2119_template.h8
-rw-r--r--drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c4
-rw-r--r--drivers/gdisp/ST7565/board_ST7565_template.h4
-rw-r--r--drivers/gdisp/ST7565/gdisp_lld_ST7565.c4
-rw-r--r--drivers/gdisp/ST7735/gdisp_lld_ST7735.c4
-rw-r--r--drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h2
-rw-r--r--drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c76
-rw-r--r--drivers/gdisp/STM32LTDC/stm32_dma2d.h4
-rw-r--r--drivers/gdisp/TLS8204/board_TLS8204_template.h6
-rw-r--r--drivers/gdisp/TLS8204/gdisp_lld_TLS8204.c4
-rw-r--r--drivers/gdisp/UC1601s/board_UC1601s_template.h4
-rw-r--r--drivers/gdisp/UC1601s/gdisp_lld_UC1601s.c6
-rw-r--r--drivers/gdisp/UC1610/board_UC1610_template.h4
-rw-r--r--drivers/gdisp/UC1610/gdisp_lld_UC1610.c12
-rw-r--r--drivers/gdisp/UC8173/UC8173_waveform_examples.h18
-rw-r--r--drivers/gdisp/UC8173/board_UC8173_template.h8
-rw-r--r--drivers/gdisp/UC8173/gdisp_lld_UC8173.c36
-rw-r--r--drivers/gdisp/WS29EPD/board_WS29EPD_template.h8
-rw-r--r--drivers/gdisp/WS29EPD/gdisp_lld_WS29EPD.c26
-rw-r--r--drivers/gdisp/framebuffer/board_framebuffer_template.h4
78 files changed, 391 insertions, 391 deletions
diff --git a/drivers/gdisp/AlteraFramereader/board_alteraframereader_template.h b/drivers/gdisp/AlteraFramereader/board_alteraframereader_template.h
index c63e9083..e319ad85 100644
--- a/drivers/gdisp/AlteraFramereader/board_alteraframereader_template.h
+++ b/drivers/gdisp/AlteraFramereader/board_alteraframereader_template.h
@@ -10,13 +10,13 @@
#define FRAMEREADER_BASE ALT_VIP_VFR_0_BASE
#if GDISP_NEED_CONTROL
- static void board_backlight(GDisplay* g, uint8_t percent)
+ static void board_backlight(GDisplay* g, gU8 percent)
{
(void)g;
(void)percent;
}
- static void board_contrast(GDisplay* g, uint8_t percent)
+ static void board_contrast(GDisplay* g, gU8 percent)
{
(void)g;
(void)percent;
diff --git a/drivers/gdisp/AlteraFramereader/gdisp_lld_alteraframereader.c b/drivers/gdisp/AlteraFramereader/gdisp_lld_alteraframereader.c
index 848948c6..c510b1a9 100644
--- a/drivers/gdisp/AlteraFramereader/gdisp_lld_alteraframereader.c
+++ b/drivers/gdisp/AlteraFramereader/gdisp_lld_alteraframereader.c
@@ -73,7 +73,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
IOWR(ALT_VIP_VFR_0_BASE, 0x00, 0x00); // stop for config
// Frame 0
- IOWR(ALT_VIP_VFR_0_BASE, 0x04, (uint32_t)PRIV(g)->frame0);
+ IOWR(ALT_VIP_VFR_0_BASE, 0x04, (gU32)PRIV(g)->frame0);
IOWR(ALT_VIP_VFR_0_BASE, 0x05, SCREEN_WIDTH*SCREEN_HEIGHT/2);
IOWR(ALT_VIP_VFR_0_BASE, 0x06, SCREEN_WIDTH*SCREEN_HEIGHT);
IOWR(ALT_VIP_VFR_0_BASE, 0x08, SCREEN_WIDTH);
@@ -81,7 +81,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
IOWR(ALT_VIP_VFR_0_BASE, 0x0a, 0x00);
// Frame 1
- IOWR(ALT_VIP_VFR_0_BASE, 0x0b, (uint32_t)PRIV(g)->frame1);
+ IOWR(ALT_VIP_VFR_0_BASE, 0x0b, (gU32)PRIV(g)->frame1);
IOWR(ALT_VIP_VFR_0_BASE, 0x0c, SCREEN_WIDTH*SCREEN_HEIGHT/2);
IOWR(ALT_VIP_VFR_0_BASE, 0x0d, SCREEN_WIDTH*SCREEN_HEIGHT);
IOWR(ALT_VIP_VFR_0_BASE, 0x0f, SCREEN_WIDTH);
@@ -244,7 +244,7 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g)
unsigned int addr;
int bytes_per_line;
int bytes_per_pixel;
- uint8_t* line;
+ gU8* line;
// Calculate some values required for further calculations
bytes_per_pixel = ((fbPriv*)g->priv)->linelen/g->g.Width; // must be 4
diff --git a/drivers/gdisp/ED060SC4/board_ED060SC4_example.h b/drivers/gdisp/ED060SC4/board_ED060SC4_example.h
index 96dd8be2..13311089 100644
--- a/drivers/gdisp/ED060SC4/board_ED060SC4_example.h
+++ b/drivers/gdisp/ED060SC4/board_ED060SC4_example.h
@@ -105,7 +105,7 @@ static GFXINLINE void setpin_sph(gBool on) {
}
/* Set the state of the D0-D7 (source driver Data) pins. */
-static GFXINLINE void setpins_data(uint8_t value) {
+static GFXINLINE void setpins_data(gU8 value) {
palWriteGroup(GPIOB, 0xFF, GPIOB_EINK_D0, value);
}
diff --git a/drivers/gdisp/ED060SC4/board_ED060SC4_template.h b/drivers/gdisp/ED060SC4/board_ED060SC4_template.h
index 93e6d23b..65f77095 100644
--- a/drivers/gdisp/ED060SC4/board_ED060SC4_template.h
+++ b/drivers/gdisp/ED060SC4/board_ED060SC4_template.h
@@ -89,7 +89,7 @@ static GFXINLINE void setpin_sph(GDisplay *g, gBool on) {
(void) on;
}
-static GFXINLINE void setpins_data(GDisplay *g, uint8_t value) {
+static GFXINLINE void setpins_data(GDisplay *g, gU8 value) {
(void) g;
(void) value;
}
diff --git a/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c b/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c
index ba1baee8..b5d1e08b 100644
--- a/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c
+++ b/drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c
@@ -200,7 +200,7 @@ static void hscan_start(GDisplay *g)
}
/* Write data to the horizontal row. */
-static void hscan_write(GDisplay *g, const uint8_t *data, int count)
+static void hscan_write(GDisplay *g, const gU8 *data, int count)
{
while (count--)
{
@@ -317,18 +317,18 @@ static void power_off(GDisplay *g)
/* Buffers that store the data for a small area of the display. */
typedef struct {
- uint8_t data[EINK_BLOCKHEIGHT][WIDTH_BYTES];
+ gU8 data[EINK_BLOCKHEIGHT][WIDTH_BYTES];
} block_t;
typedef struct drvPriv {
- uint8_t g_next_block; /* Index of the next free block buffer. */
+ gU8 g_next_block; /* Index of the next free block buffer. */
block_t g_blocks[EINK_NUMBUFFERS];
/* Map that stores the buffers associated to each area of the display.
* Value of 0 means that the block is not allocated.
* Other values are the index in g_blocks + 1.
*/
- uint8_t g_blockmap[BLOCKS_Y][BLOCKS_X];
+ gU8 g_blockmap[BLOCKS_Y][BLOCKS_X];
} drvPriv;
/* Check if the row contains any allocated blocks. */
@@ -358,7 +358,7 @@ static void write_block_row(GDisplay *g, unsigned by)
{
for (dx = 0; dx < WIDTH_BYTES; dx++)
{
- const uint8_t dummy = 0;
+ const gU8 dummy = 0;
hscan_write(g, &dummy, 1);
}
}
@@ -483,9 +483,9 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
void gdisp_lld_draw_pixel(GDisplay *g) {
block_t *block;
- uint8_t byte;
+ gU8 byte;
unsigned bx, by, dx, dy;
- uint8_t bitpos;
+ gU8 bitpos;
switch(g->g.Orientation) {
default:
@@ -583,7 +583,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_CLEARS
static void subclear(GDisplay *g, gColor color) {
unsigned x, y;
- uint8_t byte;
+ gU8 byte;
hscan_start(g);
byte = color ? BYTE_WHITE : BYTE_BLACK;
diff --git a/drivers/gdisp/Fb24bpp/board_fb24bpp_template.h b/drivers/gdisp/Fb24bpp/board_fb24bpp_template.h
index 45029f5b..0d1d10dd 100644
--- a/drivers/gdisp/Fb24bpp/board_fb24bpp_template.h
+++ b/drivers/gdisp/Fb24bpp/board_fb24bpp_template.h
@@ -35,13 +35,13 @@
#endif
#if GDISP_NEED_CONTROL
- static void board_backlight(GDisplay *g, uint8_t percent) {
+ static void board_backlight(GDisplay *g, gU8 percent) {
// TODO: Can be an empty function if your hardware doesn't support this
(void) g;
(void) percent;
}
- static void board_contrast(GDisplay *g, uint8_t percent) {
+ static void board_contrast(GDisplay *g, gU8 percent) {
// TODO: Can be an empty function if your hardware doesn't support this
(void) g;
(void) percent;
diff --git a/drivers/gdisp/Fb24bpp/gdisp_lld_fb24bpp.c b/drivers/gdisp/Fb24bpp/gdisp_lld_fb24bpp.c
index 28ef8336..f16c2294 100644
--- a/drivers/gdisp/Fb24bpp/gdisp_lld_fb24bpp.c
+++ b/drivers/gdisp/Fb24bpp/gdisp_lld_fb24bpp.c
@@ -33,7 +33,7 @@ typedef struct fbPriv {
/*===========================================================================*/
#define PIXIL_POS(g, x, y) ((y) * ((fbPriv *)(g)->priv)->fbi.linelen + (x) * 3)
-#define PIXEL_ADDR(g, pos) (((uint8_t *)((fbPriv *)(g)->priv)->fbi.pixels)+pos)
+#define PIXEL_ADDR(g, pos) (((gU8 *)((fbPriv *)(g)->priv)->fbi.pixels)+pos)
/*===========================================================================*/
/* Driver exported functions. */
@@ -64,7 +64,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
unsigned pos;
- uint8_t *p;
+ gU8 *p;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@@ -101,7 +101,7 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay *g) {
unsigned pos;
- uint8_t *p;
+ gU8 *p;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
diff --git a/drivers/gdisp/HX8347D/board_HX8347D_template.h b/drivers/gdisp/HX8347D/board_HX8347D_template.h
index 9d21f8ba..23e1b23c 100644
--- a/drivers/gdisp/HX8347D/board_HX8347D_template.h
+++ b/drivers/gdisp/HX8347D/board_HX8347D_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -42,17 +42,17 @@ static GFXINLINE void busmode8(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint8_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU8 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU8 data) {
(void) g;
(void) data;
}
-static GFXINLINE void write_ram16(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_ram16(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
diff --git a/drivers/gdisp/ILI9225/gdisp_lld_ili9225.c b/drivers/gdisp/ILI9225/gdisp_lld_ili9225.c
index d1e71689..bf32280f 100644
--- a/drivers/gdisp/ILI9225/gdisp_lld_ili9225.c
+++ b/drivers/gdisp/ILI9225/gdisp_lld_ili9225.c
@@ -43,7 +43,7 @@
#include "drivers/gdisp/ILI9225/ili9225.h"
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_cmd(g, reg); write_data(g, data); }
// Serial write data for fast fill.
diff --git a/drivers/gdisp/ILI9320/board_ILI9320_template.h b/drivers/gdisp/ILI9320/board_ILI9320_template.h
index 16d6ba68..45270de8 100644
--- a/drivers/gdisp/ILI9320/board_ILI9320_template.h
+++ b/drivers/gdisp/ILI9320/board_ILI9320_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c b/drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c
index b3a42c1a..1dc5ba17 100644
--- a/drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c
+++ b/drivers/gdisp/ILI9320/gdisp_lld_ILI9320.c
@@ -51,7 +51,7 @@
/* Driver local functions. */
/*===========================================================================*/
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
static void set_cursor(GDisplay *g) {
@@ -94,7 +94,7 @@ static void set_viewport(GDisplay *g) {
}
LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
- uint16_t cver;
+ gU16 cver;
// No private area for this controller
g->priv = 0;
@@ -223,7 +223,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/ILI9325/board_ILI9325_template.h b/drivers/gdisp/ILI9325/board_ILI9325_template.h
index 16d6ba68..45270de8 100644
--- a/drivers/gdisp/ILI9325/board_ILI9325_template.h
+++ b/drivers/gdisp/ILI9325/board_ILI9325_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/ILI9325/gdisp_lld_ILI9325.c b/drivers/gdisp/ILI9325/gdisp_lld_ILI9325.c
index 0bd3ec9f..73d79b47 100644
--- a/drivers/gdisp/ILI9325/gdisp_lld_ILI9325.c
+++ b/drivers/gdisp/ILI9325/gdisp_lld_ILI9325.c
@@ -52,7 +52,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
static void set_cursor(GDisplay *g) {
@@ -95,7 +95,7 @@ static void set_viewport(GDisplay* g) {
}
LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
- uint16_t cver;
+ gU16 cver;
// No private area for this controller
g->priv = 0;
@@ -217,7 +217,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/ILI9341/board_ILI9341_template.h b/drivers/gdisp/ILI9341/board_ILI9341_template.h
index a1b85c98..d4b8a8fd 100644
--- a/drivers/gdisp/ILI9341/board_ILI9341_template.h
+++ b/drivers/gdisp/ILI9341/board_ILI9341_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/ILI9341/gdisp_lld_ILI9341.c b/drivers/gdisp/ILI9341/gdisp_lld_ILI9341.c
index 464d663d..1c8e0956 100644
--- a/drivers/gdisp/ILI9341/gdisp_lld_ILI9341.c
+++ b/drivers/gdisp/ILI9341/gdisp_lld_ILI9341.c
@@ -49,24 +49,24 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
-#define write_data16(g, data) { write_data(g, data >> 8); write_data(g, (uint8_t)data); }
+#define write_data16(g, data) { write_data(g, data >> 8); write_data(g, (gU8)data); }
#define delay(us) gfxSleepMicroseconds(us)
#define delayms(ms) gfxSleepMilliseconds(ms)
static void set_viewport(GDisplay *g) {
write_index(g, 0x2A);
write_data(g, (g->p.x >> 8));
- write_data(g, (uint8_t) g->p.x);
+ write_data(g, (gU8) g->p.x);
write_data(g, (g->p.x + g->p.cx - 1) >> 8);
- write_data(g, (uint8_t) (g->p.x + g->p.cx - 1));
+ write_data(g, (gU8) (g->p.x + g->p.cx - 1));
write_index(g, 0x2B);
write_data(g, (g->p.y >> 8));
- write_data(g, (uint8_t) g->p.y);
+ write_data(g, (gU8) g->p.y);
write_data(g, (g->p.y + g->p.cy - 1) >> 8);
- write_data(g, (uint8_t) (g->p.y + g->p.cy - 1));
+ write_data(g, (gU8) (g->p.y + g->p.cy - 1));
}
/*===========================================================================*/
@@ -257,7 +257,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/ILI9342/gdisp_lld_ILI9342.c b/drivers/gdisp/ILI9342/gdisp_lld_ILI9342.c
index 8c98da1f..394a4b47 100644
--- a/drivers/gdisp/ILI9342/gdisp_lld_ILI9342.c
+++ b/drivers/gdisp/ILI9342/gdisp_lld_ILI9342.c
@@ -49,21 +49,21 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
static void set_viewport(GDisplay *g) {
write_index(g, 0x2A);
write_data(g, (g->p.x >> 8));
- write_data(g, (uint8_t) g->p.x);
+ write_data(g, (gU8) g->p.x);
write_data(g, (g->p.x + g->p.cx - 1) >> 8);
- write_data(g, (uint8_t) (g->p.x + g->p.cx - 1));
+ write_data(g, (gU8) (g->p.x + g->p.cx - 1));
write_index(g, 0x2B);
write_data(g, (g->p.y >> 8));
- write_data(g, (uint8_t) g->p.y);
+ write_data(g, (gU8) g->p.y);
write_data(g, (g->p.y + g->p.cy - 1) >> 8);
- write_data(g, (uint8_t) (g->p.y + g->p.cy - 1));
+ write_data(g, (gU8) (g->p.y + g->p.cy - 1));
}
/*===========================================================================*/
@@ -261,7 +261,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/ILI93xx/board_ILI93xx_template.h b/drivers/gdisp/ILI93xx/board_ILI93xx_template.h
index df2131bc..ab47b968 100644
--- a/drivers/gdisp/ILI93xx/board_ILI93xx_template.h
+++ b/drivers/gdisp/ILI93xx/board_ILI93xx_template.h
@@ -24,7 +24,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state)
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent)
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent)
{
(void) g;
(void) percent;
@@ -40,13 +40,13 @@ static GFXINLINE void release_bus(GDisplay *g)
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index)
+static GFXINLINE void write_index(GDisplay *g, gU16 index)
{
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data)
+static GFXINLINE void write_data(GDisplay *g, gU16 data)
{
(void) g;
(void) data;
@@ -62,7 +62,7 @@ static GFXINLINE void setwritemode(GDisplay *g)
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g)
+static GFXINLINE gU16 read_data(GDisplay *g)
{
(void) g;
diff --git a/drivers/gdisp/ILI93xx/gdisp_lld_ILI93xx.c b/drivers/gdisp/ILI93xx/gdisp_lld_ILI93xx.c
index 8ea9b5b8..e35bf47a 100644
--- a/drivers/gdisp/ILI93xx/gdisp_lld_ILI93xx.c
+++ b/drivers/gdisp/ILI93xx/gdisp_lld_ILI93xx.c
@@ -52,10 +52,10 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
-static GFXINLINE uint16_t read_reg(GDisplay *g, uint32_t reg) {
+static GFXINLINE gU16 read_reg(GDisplay *g, gU32 reg) {
write_index(g, reg);
return read_data(g);
}
@@ -290,7 +290,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/ILI9481/board_ILI9481_template.h b/drivers/gdisp/ILI9481/board_ILI9481_template.h
index a1b85c98..d4b8a8fd 100644
--- a/drivers/gdisp/ILI9481/board_ILI9481_template.h
+++ b/drivers/gdisp/ILI9481/board_ILI9481_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c b/drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c
index 357798b3..75c29ae7 100644
--- a/drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c
+++ b/drivers/gdisp/ILI9481/gdisp_lld_ILI9481.c
@@ -47,9 +47,9 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
-#define write_reg2x16(g, reg, data1, data2) { write_index(g, reg); write_data(g, (data1)>>8); write_data(g, (uint8_t)(data1)); write_data(g, (data2)>>8); write_data(g, (uint8_t)(data2));}
+#define write_reg2x16(g, reg, data1, data2) { write_index(g, reg); write_data(g, (data1)>>8); write_data(g, (gU8)(data1)); write_data(g, (data2)>>8); write_data(g, (gU8)(data2));}
static void set_viewport(GDisplay* g) {
write_reg2x16(g, 0x2A, g->p.x, g->p.x + g->p.cx - 1);
@@ -221,7 +221,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/ILI9488/board_ILI9488_template.h b/drivers/gdisp/ILI9488/board_ILI9488_template.h
index a1b85c98..d4b8a8fd 100644
--- a/drivers/gdisp/ILI9488/board_ILI9488_template.h
+++ b/drivers/gdisp/ILI9488/board_ILI9488_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/ILI9488/gdisp_lld_ILI9488.c b/drivers/gdisp/ILI9488/gdisp_lld_ILI9488.c
index 61ff51ab..f0c2688d 100644
--- a/drivers/gdisp/ILI9488/gdisp_lld_ILI9488.c
+++ b/drivers/gdisp/ILI9488/gdisp_lld_ILI9488.c
@@ -46,7 +46,7 @@
/* Driver local functions. */
/*===========================================================================*/
static void dummy_read(GDisplay* g) {
- volatile uint16_t dummy;
+ volatile gU16 dummy;
dummy = read_data(g);
(void)dummy;
}
@@ -221,7 +221,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/KS0108/board_KS0108_example.h b/drivers/gdisp/KS0108/board_KS0108_example.h
index 23df5183..133955cd 100644
--- a/drivers/gdisp/KS0108/board_KS0108_example.h
+++ b/drivers/gdisp/KS0108/board_KS0108_example.h
@@ -170,7 +170,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
#endif
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -183,9 +183,9 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-void KS0108_delay(uint16_t microsec){
+void KS0108_delay(gU16 microsec){
#if KS0108_NOP_DLY
- uint16_t cn;
+ gU16 cn;
for (cn=0;cn< microsec;cn++){
asm("nop");asm("nop");asm("nop");asm("nop");
@@ -223,7 +223,7 @@ static GFXINLINE void KS0108_latch(void){
palSetLine(lcdpins.E);
}
-static GFXINLINE void KS0108_write(uint8_t value){
+static GFXINLINE void KS0108_write(gU8 value){
int ii;
for(ii = 0; ii < 8; ii++){
@@ -235,8 +235,8 @@ static GFXINLINE void KS0108_write(uint8_t value){
KS0108_delay(1);
}
-static GFXINLINE void KS0108_select(uint8_t chip){
- uint8_t ii;
+static GFXINLINE void KS0108_select(gU8 chip){
+ gU8 ii;
KS0108_delay(1);
for (ii = 0; ii < CHIPS; ii++){
if (ii == chip)
@@ -246,7 +246,7 @@ static GFXINLINE void KS0108_select(uint8_t chip){
}
static GFXINLINE void KS0108_unselect(void){
- uint8_t ii;
+ gU8 ii;
KS0108_delay(1);
for (ii = 0; ii < CHIPS; ii++){
@@ -256,8 +256,8 @@ static GFXINLINE void KS0108_unselect(void){
/*
#if KS0108_NEED_READ //Hardware Read ############## WORKS more or less
-static GFXINLINE uint8_t read_KS0108(void) {
- uint8_t ii, data=0;
+static GFXINLINE gU8 read_KS0108(void) {
+ gU8 ii, data=0;
for(ii = 0; ii < 8; ii++)
palSetLineMode(lcdpins.D[ii], PAL_MODE_INPUT); //Set pads to input
@@ -286,8 +286,8 @@ static GFXINLINE uint8_t read_KS0108(void) {
#endif
*/
#if KS0108_NEED_READ //Hardware Read ########### needs more testing but my display is broken
-static GFXINLINE uint8_t read_KS0108(void) {
- uint8_t ii, data=0;
+static GFXINLINE gU8 read_KS0108(void) {
+ gU8 ii, data=0;
for(ii = 0; ii < 8; ii++)
palSetLineMode(lcdpins.D[ii], PAL_MODE_INPUT); //Set pads to input
@@ -336,15 +336,15 @@ static GFXINLINE uint8_t read_KS0108(void) {
}
#endif
-static GFXINLINE void write_data(GDisplay* g, uint16_t data){
+static GFXINLINE void write_data(GDisplay* g, gU16 data){
(void)g;
- uint8_t bit, displayData;
+ gU8 bit, displayData;
#if !KS0108_NEED_READ
- uint8_t *p;
+ gU8 *p;
#endif
palSetLine(lcdpins.DC);
- KS0108_select((uint8_t)(data>>8));
+ KS0108_select((gU8)(data>>8));
#if KS0108_NEED_READ
displayData=read_KS0108();
#else
@@ -353,7 +353,7 @@ static GFXINLINE void write_data(GDisplay* g, uint16_t data){
#endif
bit = 1 << (g->p.y & 7); //Get Page bit
- if ((uint8_t)data){ //set bit
+ if ((gU8)data){ //set bit
KS0108_write(displayData | bit);
#if !KS0108_NEED_READ
*p = (displayData | bit);
@@ -370,11 +370,11 @@ static GFXINLINE void write_data(GDisplay* g, uint16_t data){
KS0108_unselect(); //Important
}
-static GFXINLINE void write_cmd(GDisplay* g, uint16_t cmd){
+static GFXINLINE void write_cmd(GDisplay* g, gU16 cmd){
(void)g;
palClearLine(lcdpins.DC);
- KS0108_select((uint8_t)(cmd>>8));
- KS0108_write((uint8_t)cmd);
+ KS0108_select((gU8)(cmd>>8));
+ KS0108_write((gU8)cmd);
KS0108_latch();
KS0108_unselect(); //Important
}
@@ -387,7 +387,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/KS0108/gdisp_lld_KS0108.c b/drivers/gdisp/KS0108/gdisp_lld_KS0108.c
index 94e81303..320896f5 100644
--- a/drivers/gdisp/KS0108/gdisp_lld_KS0108.c
+++ b/drivers/gdisp/KS0108/gdisp_lld_KS0108.c
@@ -64,7 +64,7 @@
#if !KS0108_NEED_READ
#define BUFFSZ (GDISP_SCREEN_HEIGHT/8 * GDISP_SCREEN_WIDTH)
- #define RAM(g) ((uint8_t *)g->priv)
+ #define RAM(g) ((gU8 *)g->priv)
#endif
#ifndef GDISP_INITIAL_CONTRAST
#define GDISP_INITIAL_CONTRAST 50
@@ -146,8 +146,8 @@ GFXINLINE void KS0108_goto(GDisplay* g, ) {
}
static void set_viewport(GDisplay *g) {
- uint16_t pg;
- uint16_t chip;
+ gU16 pg;
+ gU16 chip;
pg = g->p.y >> 3;
chip = (g->p.x >> 6) << 8;
@@ -156,7 +156,7 @@ static void set_viewport(GDisplay *g) {
}
LLDSPEC void gdisp_lld_write_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = (g->p.x >> 6) << 8; // Set the chip
if (g->p.color != GFX_WHITE)
@@ -189,7 +189,7 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
@@ -203,7 +203,7 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
#if GDISP_HARDWARE_FILLS
LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
- uint8_t data, j;
+ gU8 data, j;
set_viewport(g);
if (g->p.color != GFX_WHITE) {
diff --git a/drivers/gdisp/LGDP4532/board_LGDP4532_template.h b/drivers/gdisp/LGDP4532/board_LGDP4532_template.h
index 600cf1fb..261d7758 100644
--- a/drivers/gdisp/LGDP4532/board_LGDP4532_template.h
+++ b/drivers/gdisp/LGDP4532/board_LGDP4532_template.h
@@ -24,7 +24,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state)
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent)
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent)
{
(void) g;
(void) percent;
@@ -40,13 +40,13 @@ static GFXINLINE void release_bus(GDisplay *g)
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index)
+static GFXINLINE void write_index(GDisplay *g, gU16 index)
{
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data)
+static GFXINLINE void write_data(GDisplay *g, gU16 data)
{
(void) g;
(void) data;
@@ -62,7 +62,7 @@ static GFXINLINE void setwritemode(GDisplay *g)
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g)
+static GFXINLINE gU16 read_data(GDisplay *g)
{
(void) g;
return 0;
diff --git a/drivers/gdisp/LGDP4532/gdisp_lld_LGDP4532.c b/drivers/gdisp/LGDP4532/gdisp_lld_LGDP4532.c
index 87cc98a9..522e7821 100644
--- a/drivers/gdisp/LGDP4532/gdisp_lld_LGDP4532.c
+++ b/drivers/gdisp/LGDP4532/gdisp_lld_LGDP4532.c
@@ -52,7 +52,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
static void set_cursor(GDisplay *g) {
@@ -211,7 +211,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_template.h b/drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_template.h
index de84b8aa..37fd6611 100644
--- a/drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_template.h
+++ b/drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_template.h
@@ -33,7 +33,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -46,12 +46,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
diff --git a/drivers/gdisp/Nokia6610GE12/gdisp_lld_Nokia6610GE12.c b/drivers/gdisp/Nokia6610GE12/gdisp_lld_Nokia6610GE12.c
index aadfacff..53249f01 100644
--- a/drivers/gdisp/Nokia6610GE12/gdisp_lld_Nokia6610GE12.c
+++ b/drivers/gdisp/Nokia6610GE12/gdisp_lld_Nokia6610GE12.c
@@ -66,8 +66,8 @@
/*===========================================================================*/
// Use the priv pointer itself to save our color. This save allocating ram for it
-// and works provided sizeof(uint16_t) <= sizeof(void *)
-#define savecolor(g) (*(uint16_t *)&g->priv)
+// and works provided sizeof(gU16) <= sizeof(void *)
+#define savecolor(g) (*(gU16 *)&g->priv)
#define GDISP_FLG_ODDBYTE (GDISP_FLG_DRIVER<<0)
@@ -139,7 +139,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
g->flags &= ~GDISP_FLG_ODDBYTE;
}
LLDSPEC void gdisp_lld_write_color(GDisplay *g) {
- uint16_t c;
+ gU16 c;
c = gdispColor2Native(g->p.color);
if ((g->flags & GDISP_FLG_ODDBYTE)) {
diff --git a/drivers/gdisp/Nokia6610GE8/board_Nokia6610GE8_template.h b/drivers/gdisp/Nokia6610GE8/board_Nokia6610GE8_template.h
index de84b8aa..37fd6611 100644
--- a/drivers/gdisp/Nokia6610GE8/board_Nokia6610GE8_template.h
+++ b/drivers/gdisp/Nokia6610GE8/board_Nokia6610GE8_template.h
@@ -33,7 +33,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -46,12 +46,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
diff --git a/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c b/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c
index 7bc55aa1..cb3f4d17 100644
--- a/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c
+++ b/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c
@@ -104,9 +104,9 @@
#if GDISP_HARDWARE_STREAM_WRITE
typedef struct dvrPriv {
- uint16_t savecolor;
+ gU16 savecolor;
#if GDISP_GE8_BROKEN_CONTROLLER
- uint16_t firstcolor;
+ gU16 firstcolor;
#endif
} dvrPriv;
#define PRIV ((dvrPriv *)g->priv)
@@ -255,7 +255,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
g->flags &= ~(GDISP_FLG_ODDBYTE|GDISP_FLG_RUNBYTE);
}
LLDSPEC void gdisp_lld_write_color(GDisplay *g) {
- uint16_t c;
+ gU16 c;
c = gdispColor2Native(g->p.color);
#if GDISP_GE8_BROKEN_CONTROLLER
@@ -311,7 +311,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
- uint16_t c;
+ gU16 c;
c = gdispColor2Native(g->p.color);
acquire_bus(g);
@@ -326,7 +326,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FILLS
LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
unsigned tuples;
- uint16_t c;
+ gU16 c;
tuples = (g->p.cx*g->p.cy+1)>>1; // With an odd sized area we over-print by one pixel.
// This extra pixel overwrites the first pixel (harmless as it is the same colour)
@@ -343,12 +343,12 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_BITFILLS
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
gCoord lg, x, y;
- uint16_t c1, c2;
+ gU16 c1, c2;
unsigned tuples;
const gPixel *buffer;
#if GDISP_PACKED_PIXELS
unsigned pnum, pstart;
- const uint8_t *p;
+ const gU8 *p;
#else
const gPixel *p;
#endif
@@ -428,10 +428,10 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
srccx = (g->p.x2 + 1) & ~1;
#endif
pstart = g->p.y1 * g->p.x2 + g->p.x1; // The starting pixel number
- buffer = (const gPixel)(((const uint8_t *)buffer) + ((pstart>>1) * 3)); // The buffer start position
+ buffer = (const gPixel)(((const gU8 *)buffer) + ((pstart>>1) * 3)); // The buffer start position
lg = ((g->p.x2-g->p.cx)>>1)*3; // The buffer gap between lines
pnum = pstart + g->p.x2*y + x; // Adjustment for controller craziness
- p = ((const uint8_t *)buffer) + (((g->p.x2*y + x)>>1)*3); // Adjustment for controller craziness
+ p = ((const gU8 *)buffer) + (((g->p.x2*y + x)>>1)*3); // Adjustment for controller craziness
while (tuples--) {
/* Get a pixel */
@@ -447,7 +447,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
pnum += g->p.x2 - g->p.cx;
if (++y >= g->p.cy) {
y = 0;
- p = (const uint8_t *)buffer;
+ p = (const gU8 *)buffer;
pnum = pstart;
}
}
@@ -465,7 +465,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
pnum += g->p.x2 - g->p.cx;
if (++y >= g->p.cy) {
y = 0;
- p = (const uint8_t *)buffer;
+ p = (const gU8 *)buffer;
pnum = pstart;
}
}
diff --git a/drivers/gdisp/PCD8544/board_PCD8544_template.h b/drivers/gdisp/PCD8544/board_PCD8544_template.h
index 6b48d83b..0749f5a8 100644
--- a/drivers/gdisp/PCD8544/board_PCD8544_template.h
+++ b/drivers/gdisp/PCD8544/board_PCD8544_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
(void) g;
(void) cmd;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
+static GFXINLINE void write_data(GDisplay *g, gU8* data, gU16 length) {
(void) g;
(void) data;
(void) length;
diff --git a/drivers/gdisp/PCD8544/gdisp_lld_PCD8544.c b/drivers/gdisp/PCD8544/gdisp_lld_PCD8544.c
index 0daf34b4..7e46e3ce 100644
--- a/drivers/gdisp/PCD8544/gdisp_lld_PCD8544.c
+++ b/drivers/gdisp/PCD8544/gdisp_lld_PCD8544.c
@@ -33,7 +33,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define RAM(g) ((uint8_t *)g->priv)
+#define RAM(g) ((gU8 *)g->priv)
#define xyaddr(x, y) ((x) + ((y) >> 3) * GDISP_SCREEN_WIDTH)
#define xybit(y) (1 << ((y) & 7))
diff --git a/drivers/gdisp/PCF8812/board_PCF8812_template.h b/drivers/gdisp/PCF8812/board_PCF8812_template.h
index 88a7dfcf..36adc584 100644
--- a/drivers/gdisp/PCF8812/board_PCF8812_template.h
+++ b/drivers/gdisp/PCF8812/board_PCF8812_template.h
@@ -29,12 +29,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
(void) g;
(void) cmd;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
+static GFXINLINE void write_data(GDisplay *g, gU8* data, gU16 length) {
(void) g;
(void) data;
(void) length;
diff --git a/drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c b/drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c
index 20486124..415f75e3 100644
--- a/drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c
+++ b/drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c
@@ -36,7 +36,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define RAM(g) ((uint8_t *)g->priv)
+#define RAM(g) ((gU8 *)g->priv)
#define xyaddr(x, y) ((x) + ((y) >> 3) * GDISP_MATRIX_WIDTH)
#define xybit(y) (1 << ((y) & 7))
diff --git a/drivers/gdisp/R61505U/board_R61505U_template.h b/drivers/gdisp/R61505U/board_R61505U_template.h
index 16d6ba68..45270de8 100644
--- a/drivers/gdisp/R61505U/board_R61505U_template.h
+++ b/drivers/gdisp/R61505U/board_R61505U_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/R61505U/gdisp_lld_R61505U.c b/drivers/gdisp/R61505U/gdisp_lld_R61505U.c
index aa6c5b9e..f2edd3ca 100644
--- a/drivers/gdisp/R61505U/gdisp_lld_R61505U.c
+++ b/drivers/gdisp/R61505U/gdisp_lld_R61505U.c
@@ -51,7 +51,7 @@
/* Driver local functions. */
/*===========================================================================*/
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
static void set_cursor(GDisplay *g) {
@@ -94,7 +94,7 @@ static void set_viewport(GDisplay *g) {
}
LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
- uint16_t cver;
+ gU16 cver;
// No private area for this controller
g->priv = 0;
@@ -231,7 +231,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/RA6963/board_RA6963.h b/drivers/gdisp/RA6963/board_RA6963.h
index ce2af186..bee22c30 100755
--- a/drivers/gdisp/RA6963/board_RA6963.h
+++ b/drivers/gdisp/RA6963/board_RA6963.h
@@ -177,7 +177,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
#endif
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
#if RA6963_NEED_BACKLIGHT
@@ -199,9 +199,9 @@ static GFXINLINE void release_bus(GDisplay *g) {
#if RA6963_NEED_READ
-static GFXINLINE uint8_t RA6963_busy_wait(uint8_t pattern, gBool lh){
+static GFXINLINE gU8 RA6963_busy_wait(gU8 pattern, gBool lh){
- uint8_t data;
+ gU8 data;
int ii;
for(ii = 0; ii < 2; ii++) //Only interested in Bit 0 and 1
@@ -229,7 +229,7 @@ static GFXINLINE uint8_t RA6963_busy_wait(uint8_t pattern, gBool lh){
}
#endif
-static GFXINLINE void RA6963_write(uint8_t value){
+static GFXINLINE void RA6963_write(gU8 value){
int ii;
for(ii = 0; ii < 8; ii++){
if(value & (1 << ii))
@@ -239,7 +239,7 @@ static GFXINLINE void RA6963_write(uint8_t value){
}
}
-static GFXINLINE void write_data(GDisplay* g, uint8_t data){
+static GFXINLINE void write_data(GDisplay* g, gU8 data){
(void)g;
#if RA6963_NEED_READ
RA6963_busy_wait(RA6963_STATUS_BUSY1 | RA6963_STATUS_BUSY2, ~(RA6963_STATUS_BUSY1 | RA6963_STATUS_BUSY2));
@@ -254,7 +254,7 @@ static GFXINLINE void write_data(GDisplay* g, uint8_t data){
palSetLine(lcdpins.CD);
}
-static GFXINLINE void write_cmd(GDisplay* g, uint8_t data){
+static GFXINLINE void write_cmd(GDisplay* g, gU8 data){
(void)g;
#if RA6963_NEED_READ
RA6963_busy_wait(RA6963_STATUS_BUSY1 | RA6963_STATUS_BUSY2, ~(RA6963_STATUS_BUSY1 | RA6963_STATUS_BUSY2));
@@ -275,11 +275,11 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint8_t read_data(GDisplay *g) {
+static GFXINLINE gU8 read_data(GDisplay *g) {
(void) g;
#if RA6963_NEED_READ
int ii;
- uint8_t data;
+ gU8 data;
write_cmd(g, RA6963_DATA_READ_AND_NONVARIABLE);
//RA6963_busy_wait(RA6963_STATUS_BUSY1 | RA6963_STATUS_BUSY2, ~(RA6963_STATUS_BUSY1 | RA6963_STATUS_BUSY2));
diff --git a/drivers/gdisp/RA6963/gdisp_lld_RA6963.c b/drivers/gdisp/RA6963/gdisp_lld_RA6963.c
index 3dfc13ef..ca7cf7e0 100755
--- a/drivers/gdisp/RA6963/gdisp_lld_RA6963.c
+++ b/drivers/gdisp/RA6963/gdisp_lld_RA6963.c
@@ -119,7 +119,7 @@
#if !RA6963_NEED_READ
#define BUFFSZ (RA6963_GRAPHIC_SIZE)
- #define RAM(g) ((uint8_t *)g->priv)
+ #define RAM(g) ((gU8 *)g->priv)
#define POS (((g->p.x) / RA6963_FONT_WIDTH) + ((g->p.y) * RA6963_GRAPHIC_AREA))
#endif
#ifndef GDISP_INITIAL_CONTRAST
@@ -159,23 +159,23 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
gfxSleepMilliseconds(50);
//RA6963 needs Data first THEN command!
- write_data(g, (uint8_t)RA6963_GRAPHIC_HOME); //0
- write_data(g, (uint8_t)(RA6963_GRAPHIC_HOME>>8)); //0
+ write_data(g, (gU8)RA6963_GRAPHIC_HOME); //0
+ write_data(g, (gU8)(RA6963_GRAPHIC_HOME>>8)); //0
write_cmd(g, RA6963_SET_GRAPHIC_HOME_ADDRESS); //0x42
- write_data(g, (uint8_t)RA6963_GRAPHIC_AREA); //16
+ write_data(g, (gU8)RA6963_GRAPHIC_AREA); //16
write_data(g, 0); //0
write_cmd(g, RA6963_SET_GRAPHIC_AREA); //0x43
- write_data(g, (uint8_t)RA6963_TEXT_HOME); //0x00
- write_data(g, (uint8_t)(RA6963_TEXT_HOME>>8)); //0x04 = 0x400
+ write_data(g, (gU8)RA6963_TEXT_HOME); //0x00
+ write_data(g, (gU8)(RA6963_TEXT_HOME>>8)); //0x04 = 0x400
write_cmd(g, RA6963_SET_TEXT_HOME_ADDRESS); //0x40
- write_data(g, (uint8_t)RA6963_TEXT_AREA); //16
- write_data(g, (uint8_t)(RA6963_TEXT_AREA>>8)); //0
+ write_data(g, (gU8)RA6963_TEXT_AREA); //16
+ write_data(g, (gU8)(RA6963_TEXT_AREA>>8)); //0
write_cmd(g, RA6963_SET_TEXT_AREA); //0x41
-/* write_data(g, (uint8_t)RA6963_OFFSET_REGISTER);
+/* write_data(g, (gU8)RA6963_OFFSET_REGISTER);
write_data(g, 0);
write_cmd(g, RA6963_SET_OFFSET_REGISTER);*/
@@ -213,20 +213,20 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
static void set_viewport(GDisplay *g) {
if ((g->p.x >= GDISP_SCREEN_WIDTH) || (g->p.y >= GDISP_SCREEN_HEIGHT))
return; // 0 + ( x / 8 ) + ( y * 16 )
- //uint16_t addr = (RA6963_GRAPHIC_HOME + ((g->p.x) / RA6963_FONT_WIDTH) + ((g->p.y) * RA6963_GRAPHIC_AREA));
- uint16_t addr = (RA6963_GRAPHIC_HOME + ((g->p.x >> 3) + (g->p.y << 4)));
+ //gU16 addr = (RA6963_GRAPHIC_HOME + ((g->p.x) / RA6963_FONT_WIDTH) + ((g->p.y) * RA6963_GRAPHIC_AREA));
+ gU16 addr = (RA6963_GRAPHIC_HOME + ((g->p.x >> 3) + (g->p.y << 4)));
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
#warning "check function set_viewport about the shift operations if you change the resolution!"
#elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
COMPILER_WARNING("check function set_viewport about the shift operations if you change the resolution!")
#endif
- write_data(g, (uint8_t)addr);
- write_data(g, (uint8_t)(addr>>8));
+ write_data(g, (gU8)addr);
+ write_data(g, (gU8)(addr>>8));
write_cmd(g, RA6963_SET_ADDRESS_POINTER);
}
LLDSPEC void gdisp_lld_write_color(GDisplay *g) {
- uint8_t temp;
+ gU8 temp;
#if RA6963_NEED_READ
temp = read_data(g);
@@ -275,7 +275,7 @@ LLDSPEC void gdisp_lld_read_start(GDisplay *g) {
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
@@ -289,7 +289,7 @@ LLDSPEC void gdisp_lld_read_stop(GDisplay *g) {
#if GDISP_HARDWARE_FILLS
LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
- uint8_t data, j;
+ gU8 data, j;
set_viewport(g);
if (g->p.color != GFX_WHITE) {
diff --git a/drivers/gdisp/RA8875/board_RA8875_template.h b/drivers/gdisp/RA8875/board_RA8875_template.h
index 01b5b65d..7ed5bf07 100644
--- a/drivers/gdisp/RA8875/board_RA8875_template.h
+++ b/drivers/gdisp/RA8875/board_RA8875_template.h
@@ -29,12 +29,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -47,7 +47,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
}
diff --git a/drivers/gdisp/RA8875/gdisp_lld_RA8875.c b/drivers/gdisp/RA8875/gdisp_lld_RA8875.c
index d1d0a4d4..d9b2ba97 100644
--- a/drivers/gdisp/RA8875/gdisp_lld_RA8875.c
+++ b/drivers/gdisp/RA8875/gdisp_lld_RA8875.c
@@ -38,7 +38,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg8(g, reg, data) { write_index(g, reg); write_data(g, data); }
#define write_reg16(g, reg, data) { write_index(g, reg); write_data(g, data); write_index(g, reg+1); write_data(g, (data)>>8); }
#define write_reg8x2(g, reg, d1, d2) { write_index(g, reg); write_data(g, d1); write_data(g, d2); }
@@ -58,8 +58,8 @@ static GFXINLINE void set_viewport(GDisplay* g) {
// On this controller the back-light is controlled by the controllers internal PWM
// which is why it is in this file rather than the board file.
-static GFXINLINE void set_backlight(GDisplay* g, uint8_t percent) {
- uint8_t temp;
+static GFXINLINE void set_backlight(GDisplay* g, gU8 percent) {
+ gU8 temp;
//Work in progress: the RA8875 has a built-in PWM, its output can
//be used by a Dynamic Background Control or by a host (user)
diff --git a/drivers/gdisp/S6D1121/board_S6D1121_template.h b/drivers/gdisp/S6D1121/board_S6D1121_template.h
index a1b85c98..d4b8a8fd 100644
--- a/drivers/gdisp/S6D1121/board_S6D1121_template.h
+++ b/drivers/gdisp/S6D1121/board_S6D1121_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/S6D1121/gdisp_lld_S6D1121.c b/drivers/gdisp/S6D1121/gdisp_lld_S6D1121.c
index 4bbb6213..942f9a65 100644
--- a/drivers/gdisp/S6D1121/gdisp_lld_S6D1121.c
+++ b/drivers/gdisp/S6D1121/gdisp_lld_S6D1121.c
@@ -47,7 +47,7 @@
/*===========================================================================*/
/* Some common routines and macros */
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
#define delay(us) gfxSleepMicroseconds(us)
#define delayms(ms) gfxSleepMilliseconds(ms)
@@ -235,7 +235,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/SPFD54124B/board_SPFD54124B_template.h b/drivers/gdisp/SPFD54124B/board_SPFD54124B_template.h
index 778d6fc5..ea6a92eb 100644
--- a/drivers/gdisp/SPFD54124B/board_SPFD54124B_template.h
+++ b/drivers/gdisp/SPFD54124B/board_SPFD54124B_template.h
@@ -24,7 +24,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state)
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent)
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent)
{
(void) g;
(void) percent;
@@ -40,13 +40,13 @@ static GFXINLINE void release_bus(GDisplay *g)
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index)
+static GFXINLINE void write_index(GDisplay *g, gU16 index)
{
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data)
+static GFXINLINE void write_data(GDisplay *g, gU16 data)
{
(void) g;
(void) data;
diff --git a/drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c b/drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c
index 3c83273c..6dd867ee 100644
--- a/drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c
+++ b/drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c
@@ -68,8 +68,8 @@
/*===========================================================================*/
// Use the priv pointer itself to save our color. This save allocating ram for it
-// and works provided sizeof(uint16_t) <= sizeof(void *)
-#define savecolor(g) (*(uint16_t *)&g->priv)
+// and works provided sizeof(gU16) <= sizeof(void *)
+#define savecolor(g) (*(gU16 *)&g->priv)
/*===========================================================================*/
/* Driver local functions. */
@@ -94,7 +94,7 @@ static GFXINLINE void set_viewport(GDisplay* g)
/* Driver exported functions. */
/*===========================================================================*/
-const uint16_t lcd_init_list[] = {
+const gU16 lcd_init_list[] = {
SPFD54124B_CMD_SLPOUT,
SPFD54124B_CMD_COLMOD, SPFD54124B_SEND_DATA | SPFD54124B_CMD_COLMOD_MCU16bit,
SPFD54124B_CMD_DISPON,
@@ -118,8 +118,8 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g)
acquire_bus(g);
- const uint16_t *list = &lcd_init_list[0];
- uint8_t size = sizeof(lcd_init_list) / sizeof(lcd_init_list[0]);
+ const gU16 *list = &lcd_init_list[0];
+ gU8 size = sizeof(lcd_init_list) / sizeof(lcd_init_list[0]);
while(size--) {
write_index(g, *list++);
diff --git a/drivers/gdisp/SSD1289/board_SSD1289_template.h b/drivers/gdisp/SSD1289/board_SSD1289_template.h
index 1cb21fb4..6cee8f1d 100644
--- a/drivers/gdisp/SSD1289/board_SSD1289_template.h
+++ b/drivers/gdisp/SSD1289/board_SSD1289_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c b/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
index 4c05f80f..8aff458c 100644
--- a/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
+++ b/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
@@ -43,7 +43,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
static void set_cursor(GDisplay *g) {
@@ -224,7 +224,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/SSD1306/board_SSD1306_template.h b/drivers/gdisp/SSD1306/board_SSD1306_template.h
index 51b6e5f4..518f932a 100644
--- a/drivers/gdisp/SSD1306/board_SSD1306_template.h
+++ b/drivers/gdisp/SSD1306/board_SSD1306_template.h
@@ -31,12 +31,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
(void) g;
(void) cmd;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
+static GFXINLINE void write_data(GDisplay *g, gU8* data, gU16 length) {
(void) g;
(void) data;
(void) length;
diff --git a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c
index ed55f12a..ebe44447 100644
--- a/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c
+++ b/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c
@@ -49,7 +49,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define RAM(g) ((uint8_t *)g->priv)
+#define RAM(g) ((gU8 *)g->priv)
#define write_cmd2(g, cmd1, cmd2) { write_cmd(g, cmd1); write_cmd(g, cmd2); }
#define write_cmd3(g, cmd1, cmd2, cmd3) { write_cmd(g, cmd1); write_cmd(g, cmd2); write_cmd(g, cmd3); }
@@ -114,7 +114,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#else
write_cmd2(g, SSD1306_SETCOMPINS, 0x22);
#endif
- write_cmd2(g, SSD1306_SETCONTRAST, (uint8_t)(GDISP_INITIAL_CONTRAST*256/101)); // Set initial contrast.
+ write_cmd2(g, SSD1306_SETCONTRAST, (gU8)(GDISP_INITIAL_CONTRAST*256/101)); // Set initial contrast.
write_cmd2(g, SSD1306_SETVCOMDETECT, 0x10);
write_cmd(g, SSD1306_DISPLAYON);
write_cmd(g, SSD1306_NORMALDISPLAY);
@@ -139,7 +139,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FLUSH
LLDSPEC void gdisp_lld_flush(GDisplay *g) {
- uint8_t * ram;
+ gU8 * ram;
unsigned pages;
// Don't flush if we don't need it.
@@ -173,8 +173,8 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
gCoord sx, ex;
gCoord col;
unsigned spage, zpages;
- uint8_t * base;
- uint8_t mask;
+ gU8 * base;
+ gU8 mask;
switch(g->g.Orientation) {
default:
diff --git a/drivers/gdisp/SSD1322/board_SSD1322_template.h b/drivers/gdisp/SSD1322/board_SSD1322_template.h
index 0fd6de8b..931c6e82 100644
--- a/drivers/gdisp/SSD1322/board_SSD1322_template.h
+++ b/drivers/gdisp/SSD1322/board_SSD1322_template.h
@@ -37,18 +37,18 @@ static GFXINLINE void release_bus(GDisplay *g) {
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
(void) g;
(void) cmd;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU8 data) {
(void) g;
(void) data;
}
#if SSD1322_USE_DMA
- static GFXINLINE void write_data_DMA(GDisplay *g, uint8_t* data) {
+ static GFXINLINE void write_data_DMA(GDisplay *g, gU8* data) {
(void) g;
(void) data;
}
diff --git a/drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c b/drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c
index 5f54cc47..054c1201 100644
--- a/drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c
+++ b/drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c
@@ -47,7 +47,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define RAM(g) ((uint8_t *)g->priv)
+#define RAM(g) ((gU8 *)g->priv)
// Some common routines and macros
#define xyaddr(x, y) ((x) + (y)*SSD1322_ROW_WIDTH)
@@ -157,7 +157,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FLUSH
LLDSPEC void gdisp_lld_flush(GDisplay *g) {
- uint8_t * ram;
+ gU8 * ram;
unsigned cols,rows;
// Don't flush if we don't need it.
@@ -190,7 +190,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
gCoord x, y;
- uint8_t *ram;
+ gU8 *ram;
switch(g->g.Orientation) {
default:
diff --git a/drivers/gdisp/SSD1331/board_SSD1331_template.h b/drivers/gdisp/SSD1331/board_SSD1331_template.h
index 943a857d..daa5f4c0 100644
--- a/drivers/gdisp/SSD1331/board_SSD1331_template.h
+++ b/drivers/gdisp/SSD1331/board_SSD1331_template.h
@@ -29,12 +29,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t index) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU8 data) {
(void) g;
(void) data;
}
diff --git a/drivers/gdisp/SSD1331/gdisp_lld_SSD1331.c b/drivers/gdisp/SSD1331/gdisp_lld_SSD1331.c
index c15c6370..76042c75 100644
--- a/drivers/gdisp/SSD1331/gdisp_lld_SSD1331.c
+++ b/drivers/gdisp/SSD1331/gdisp_lld_SSD1331.c
@@ -55,7 +55,7 @@
/* Driver exported functions. */
/*===========================================================================*/
-static const uint8_t initdata[] = {
+static const gU8 initdata[] = {
SSD1331_DISPLAY_OFF,
SSD1331_START_LINE, 0x00,
SSD1331_COM_OFFSET, 0x00,
@@ -157,7 +157,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FILLS
LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
- uint8_t a6, b6, c6;
+ gU8 a6, b6, c6;
acquire_bus(g);
diff --git a/drivers/gdisp/SSD1351/board_SSD1351_template.h b/drivers/gdisp/SSD1351/board_SSD1351_template.h
index fc6fa7b4..b024520f 100644
--- a/drivers/gdisp/SSD1351/board_SSD1351_template.h
+++ b/drivers/gdisp/SSD1351/board_SSD1351_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t index) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU8 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/SSD1351/gdisp_lld_SSD1351.c b/drivers/gdisp/SSD1351/gdisp_lld_SSD1351.c
index 536f3a5e..854cbdce 100644
--- a/drivers/gdisp/SSD1351/gdisp_lld_SSD1351.c
+++ b/drivers/gdisp/SSD1351/gdisp_lld_SSD1351.c
@@ -49,7 +49,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_cmd(g, reg); write_data(g, data); }
/*===========================================================================*/
@@ -171,7 +171,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
//dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay *g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/SSD1848/board_ssd1848_template.h b/drivers/gdisp/SSD1848/board_ssd1848_template.h
index 294703e5..f3a3cb2f 100644
--- a/drivers/gdisp/SSD1848/board_ssd1848_template.h
+++ b/drivers/gdisp/SSD1848/board_ssd1848_template.h
@@ -21,7 +21,7 @@ static void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static void set_backlight(GDisplay *g, uint8_t percent) {
+static void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,18 +34,18 @@ static void release_bus(GDisplay *g) {
(void) g;
}
-static void spi_write_cmd(GDisplay *g, uint8_t cmd) {
+static void spi_write_cmd(GDisplay *g, gU8 cmd) {
(void) g;
(void) cmd;
}
-static void spi_write_data_array(GDisplay *g, uint8_t* datas, size_t length) {
+static void spi_write_data_array(GDisplay *g, gU8* datas, gMemSize length) {
(void) g;
(void) datas;
(void) length;
}
-static void spi_write_data(GDisplay *g, uint8_t data) {
+static void spi_write_data(GDisplay *g, gU8 data) {
(void) g;
(void) data;
}
diff --git a/drivers/gdisp/SSD1848/gdisp_lld_SSD1848.c b/drivers/gdisp/SSD1848/gdisp_lld_SSD1848.c
index 8cefac96..1ae57273 100644
--- a/drivers/gdisp/SSD1848/gdisp_lld_SSD1848.c
+++ b/drivers/gdisp/SSD1848/gdisp_lld_SSD1848.c
@@ -15,13 +15,13 @@
typedef struct LCD_Parameters
{
- uint8_t curXPtr;
- uint8_t startXPtr; /* The area start bit position in the start column */
- uint8_t endXPtr; /* The area end bit position in the end column */
- uint8_t curCol;
- uint8_t startCol; /* The area start column */
- uint8_t endCol; /* The area end column */
- uint8_t curYPtr;
+ gU8 curXPtr;
+ gU8 startXPtr; /* The area start bit position in the start column */
+ gU8 endXPtr; /* The area end bit position in the end column */
+ gU8 curCol;
+ gU8 startCol; /* The area start column */
+ gU8 endCol; /* The area end column */
+ gU8 curYPtr;
} LCD_Parameters;
#include "board_SSD1848.h"
@@ -61,7 +61,7 @@ typedef struct LCD_Parameters
/* Some common routines and macros */
#define PRM(g) ((LCD_Parameters *)g->priv)
-#define RAM(g) ((uint8_t *)(PRM(g)+1))
+#define RAM(g) ((gU8 *)(PRM(g)+1))
#define write_cmd2(g, cmd1, cmd2) { spi_write_cmd (g, cmd1); spi_write_data (g, cmd2); }
#define write_cmd3(g, cmd1, cmd2, cmd3) { spi_write_cmd (g, cmd1); spi_write_data2 (g, cmd2, cmd3); }
@@ -76,7 +76,7 @@ static void set_viewport (GDisplay* g)
default:
case gOrientation0:
spi_write_cmd (g, SSD1848_HV_COLUMN_ADDRESS);
- spi_write_data2 (g, (uint8_t) (g->p.x / 8), (uint8_t) ((g->p.x + g->p.cx - 1) / 8));
+ spi_write_data2 (g, (gU8) (g->p.x / 8), (gU8) ((g->p.x + g->p.cx - 1) / 8));
spi_write_cmd (g, SSD1848_HV_PAGE_ADDRESS);
spi_write_data2 (g, g->p.y, g->p.y + g->p.cy - 1);
spi_write_cmd (g, SSD1848_WRITE_DISP_DATA);
@@ -118,7 +118,7 @@ static void set_viewport (GDisplay* g)
LLDSPEC gBool gdisp_lld_init (GDisplay *g)
{
- uint8_t temp [5] = { 0 };
+ gU8 temp [5] = { 0 };
/* The private area is the display surface. */
g->priv = gfxAlloc (sizeof(DisplayData) + GDISP_SCREEN_WIDTH / 8 * GDISP_SCREEN_HEIGHT);
@@ -226,18 +226,18 @@ LLDSPEC void gdisp_lld_write_start (GDisplay *g)
acquire_bus (g);
set_viewport (g);
- PRM(g)->curCol = PRM(g)->startCol = (uint8_t) (g->p.x / 8);
- PRM(g)->endCol = (uint8_t) ((g->p.x + g->p.cx - 1) / 8);
- PRM(g)->curXPtr = PRM(g)->startXPtr = (uint8_t) (g->p.x % 8);
- PRM(g)->endXPtr = (uint8_t) ((g->p.x + g->p.cx - 1) % 8);
+ PRM(g)->curCol = PRM(g)->startCol = (gU8) (g->p.x / 8);
+ PRM(g)->endCol = (gU8) ((g->p.x + g->p.cx - 1) / 8);
+ PRM(g)->curXPtr = PRM(g)->startXPtr = (gU8) (g->p.x % 8);
+ PRM(g)->endXPtr = (gU8) ((g->p.x + g->p.cx - 1) % 8);
PRM(g)->curYPtr = g->p.y;
}
LLDSPEC void gdisp_lld_write_color (GDisplay *g)
{
- uint8_t temp;
- uint8_t a;
- uint16_t y = PRM(g)->curYPtr;
- uint16_t c = PRM(g)->curCol;
+ gU8 temp;
+ gU8 a;
+ gU16 y = PRM(g)->curYPtr;
+ gU16 c = PRM(g)->curCol;
temp = RAM (g)[y * 16 + c];
if (gdispColor2Native (g->p.color))
@@ -286,7 +286,7 @@ LLDSPEC void gdisp_lld_write_stop (GDisplay *g)
#if GDISP_HARDWARE_FLUSH
LLDSPEC void gdisp_lld_flush (GDisplay *g)
{
- uint8_t * ram;
+ gU8 * ram;
unsigned pages;
/* Don't flush if we don't need it. */
@@ -312,7 +312,7 @@ LLDSPEC void gdisp_lld_flush (GDisplay *g)
#if GDISP_HARDWARE_CLEARS
LLDSPEC void gdisp_lld_clear (GDisplay *g)
{
- uint16_t area = GDISP_SCREEN_WIDTH / 8 * GDISP_SCREEN_HEIGHT;
+ gU16 area = GDISP_SCREEN_WIDTH / 8 * GDISP_SCREEN_HEIGHT;
if (gdispColor2Native (g->p.color))
{
@@ -343,13 +343,13 @@ LLDSPEC void gdisp_lld_fill_area (GDisplay *g)
{
gCoord scol, ecol, sx, ex;
gCoord y, col, x;
- uint16_t area = (uint16_t) g->p.cx * g->p.cy;
- uint8_t temp;
+ gU16 area = (gU16) g->p.cx * g->p.cy;
+ gU8 temp;
- col = scol = (uint8_t) (g->p.x / 8);
- ecol = (uint8_t) ((g->p.x + g->p.cx - 1) / 8);
- x = sx = (uint8_t) (g->p.x % 8);
- ex = (uint8_t) ((g->p.x + g->p.cx - 1) % 8);
+ col = scol = (gU8) (g->p.x / 8);
+ ecol = (gU8) ((g->p.x + g->p.cx - 1) / 8);
+ x = sx = (gU8) (g->p.x % 8);
+ ex = (gU8) ((g->p.x + g->p.cx - 1) % 8);
y = g->p.y;
@@ -534,9 +534,9 @@ LLDSPEC void gdisp_lld_control (GDisplay *g)
g->p.ptr = (void *) 100;
acquire_bus (g);
spi_write_cmd (g, SSD1848_SETCONTRAST);
- spi_write_data (g, (((uint16_t) g->p.ptr) << 8) / 101);
+ spi_write_data (g, (((gU16) g->p.ptr) << 8) / 101);
release_bus (g);
- g->g.Contrast = (uint8_t) g->p.ptr;
+ g->g.Contrast = (gU8) g->p.ptr;
return;
/* Our own special controller code to inverse the display */
@@ -556,12 +556,12 @@ LLDSPEC void gdisp_lld_blit_area (GDisplay *g)
{
gCoord scol, ecol, sx;
gCoord y, col;
- uint16_t area;
- uint8_t temp, temp2, i;
+ gU16 area;
+ gU8 temp, temp2, i;
- col = scol = (uint8_t) (g->p.x / 8);
- ecol = (uint8_t) ((g->p.x + g->p.cx - 1) / 8);
- sx = (uint8_t) (g->p.x % 8);
+ col = scol = (gU8) (g->p.x / 8);
+ ecol = (gU8) ((g->p.x + g->p.cx - 1) / 8);
+ sx = (gU8) (g->p.x % 8);
y = g->p.y;
area = (ecol - scol + 1) * (g->p.cy);
@@ -574,7 +574,7 @@ LLDSPEC void gdisp_lld_blit_area (GDisplay *g)
{
for (; area; area--)
{
- temp = RAM (g)[y * 16 + col] = *((uint8_t *) g->p.ptr)++;
+ temp = RAM (g)[y * 16 + col] = *((gU8 *) g->p.ptr)++;
spi_write_data (g, temp);
if (col == ecol)
{
@@ -595,13 +595,13 @@ LLDSPEC void gdisp_lld_blit_area (GDisplay *g)
temp = RAM (g)[y * 16 + col];
if (col != ecol)
{
- temp |= (*((uint8_t *) g->p.ptr) >> sx);
+ temp |= (*((gU8 *) g->p.ptr) >> sx);
RAM (g)[y * 16 + col] = temp;
temp2 = RAM (g)[y * 16 + col + 1];
- temp2 |= (*((uint8_t *) g->p.ptr) << (8-sx));
+ temp2 |= (*((gU8 *) g->p.ptr) << (8-sx));
RAM (g)[y * 16 + col + 1] = temp2;
- ((uint8_t *) g->p.ptr)++;
+ ((gU8 *) g->p.ptr)++;
}
spi_write_data (g, temp);
diff --git a/drivers/gdisp/SSD1963/board_SSD1963_template.h b/drivers/gdisp/SSD1963/board_SSD1963_template.h
index 82010c3d..9fa5ad6b 100644
--- a/drivers/gdisp/SSD1963/board_SSD1963_template.h
+++ b/drivers/gdisp/SSD1963/board_SSD1963_template.h
@@ -43,12 +43,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
diff --git a/drivers/gdisp/SSD1963/gdisp_lld_SSD1963.c b/drivers/gdisp/SSD1963/gdisp_lld_SSD1963.c
index 9c5ad960..145e9728 100644
--- a/drivers/gdisp/SSD1963/gdisp_lld_SSD1963.c
+++ b/drivers/gdisp/SSD1963/gdisp_lld_SSD1963.c
@@ -18,16 +18,16 @@
typedef struct LCD_Parameters {
gCoord width, height; // Panel width and height
- uint16_t hbporch; // Horizontal Back Porch
- uint16_t hfporch; // Horizontal Front Porch
- uint16_t hpulse; // Horizontal Pulse
- uint16_t hperiod; // Horizontal Period (Total)
- uint16_t vbporch; // Vertical Back Porch
- uint16_t vfporch; // Vertical Front Porch
- uint16_t vpulse; // Vertical Pulse
- uint16_t vperiod; // Vertical Period (Total)
- uint32_t fpr; // Calculated FPR
- uint16_t mode; // For command "SSD1963_SET_LCD_MODE"
+ gU16 hbporch; // Horizontal Back Porch
+ gU16 hfporch; // Horizontal Front Porch
+ gU16 hpulse; // Horizontal Pulse
+ gU16 hperiod; // Horizontal Period (Total)
+ gU16 vbporch; // Vertical Back Porch
+ gU16 vfporch; // Vertical Front Porch
+ gU16 vpulse; // Vertical Pulse
+ gU16 vperiod; // Vertical Period (Total)
+ gU32 fpr; // Calculated FPR
+ gU16 mode; // For command "SSD1963_SET_LCD_MODE"
/* Set the pannel data width */
#define LCD_PANEL_DATA_WIDTH_24BIT (1<<5) // 18bit default
/* Set the color deeph enhancement */
@@ -71,7 +71,7 @@ typedef struct LCD_Parameters {
#include "ssd1963.h"
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
#define write_data16(g, data) { write_data(g, (data)>>8); write_data(g, (data) & 0xFF); }
#define read_reg(g, reg) { write_index(g, reg); read_data(g); }
@@ -124,7 +124,7 @@ static GFXINLINE void set_viewport(GDisplay* g) {
*
* Backlight appears to be forced off (by chip) when display blanked
*/
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
// The SSD1963 has a built-in PWM (duty_cycle 00..FF).
// Its output can be used by a Dynamic Background Control or by a host (user)
// Check your LCD's hardware, the PWM connection is default left open and instead
diff --git a/drivers/gdisp/SSD2119/board_SSD2119_template.h b/drivers/gdisp/SSD2119/board_SSD2119_template.h
index 1cb21fb4..6cee8f1d 100644
--- a/drivers/gdisp/SSD2119/board_SSD2119_template.h
+++ b/drivers/gdisp/SSD2119/board_SSD2119_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
+static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
(void) index;
}
-static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
(void) data;
}
@@ -52,7 +52,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
-static GFXINLINE uint16_t read_data(GDisplay *g) {
+static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}
diff --git a/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c b/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c
index 82b8edaa..cea3319a 100644
--- a/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c
+++ b/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c
@@ -45,7 +45,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_index(g, reg); write_data(g, data); }
static void set_cursor(GDisplay* g) {
@@ -260,7 +260,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g) {
dummy_read(g);
}
LLDSPEC gColor gdisp_lld_read_color(GDisplay* g) {
- uint16_t data;
+ gU16 data;
data = read_data(g);
return gdispNative2Color(data);
diff --git a/drivers/gdisp/ST7565/board_ST7565_template.h b/drivers/gdisp/ST7565/board_ST7565_template.h
index 6835c187..44dfab39 100644
--- a/drivers/gdisp/ST7565/board_ST7565_template.h
+++ b/drivers/gdisp/ST7565/board_ST7565_template.h
@@ -38,12 +38,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
(void) g;
(void) cmd;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
+static GFXINLINE void write_data(GDisplay *g, gU8* data, gU16 length) {
(void) g;
(void) data;
(void) length;
diff --git a/drivers/gdisp/ST7565/gdisp_lld_ST7565.c b/drivers/gdisp/ST7565/gdisp_lld_ST7565.c
index a651b6b7..2998eb3b 100644
--- a/drivers/gdisp/ST7565/gdisp_lld_ST7565.c
+++ b/drivers/gdisp/ST7565/gdisp_lld_ST7565.c
@@ -57,7 +57,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define RAM(g) ((uint8_t *)g->priv)
+#define RAM(g) ((gU8 *)g->priv)
#define write_cmd2(g, cmd1, cmd2) { write_cmd(g, cmd1); write_cmd(g, cmd2); }
#define write_cmd3(g, cmd1, cmd2, cmd3) { write_cmd(g, cmd1); write_cmd(g, cmd2); write_cmd(g, cmd3); }
@@ -150,7 +150,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
return;
acquire_bus(g);
- uint8_t pagemap[8]={ST7565_PAGE_ORDER};
+ gU8 pagemap[8]={ST7565_PAGE_ORDER};
for (p = 0; p < 8; p++) {
write_cmd(g, ST7565_PAGE | pagemap[p]);
write_cmd(g, ST7565_COLUMN_MSB | 0);
diff --git a/drivers/gdisp/ST7735/gdisp_lld_ST7735.c b/drivers/gdisp/ST7735/gdisp_lld_ST7735.c
index bc6b8084..3095dbbf 100644
--- a/drivers/gdisp/ST7735/gdisp_lld_ST7735.c
+++ b/drivers/gdisp/ST7735/gdisp_lld_ST7735.c
@@ -94,7 +94,7 @@
#include "drivers/gdisp/ST7735/st7735.h"
// Some common routines and macros
-#define dummy_read(g) { volatile uint16_t dummy; dummy = read_data(g); (void) dummy; }
+#define dummy_read(g) { volatile gU16 dummy; dummy = read_data(g); (void) dummy; }
#define write_reg(g, reg, data) { write_cmd(g, reg); write_data(g, data); }
// Serial write data for fast fill.
@@ -215,7 +215,7 @@ static const unsigned char
#endif
-static void execute_cmds(GDisplay *g, const uint8_t *addr) {
+static void execute_cmds(GDisplay *g, const gU8 *addr) {
unsigned int cmds = *addr++;
while (cmds--) {
diff --git a/drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h b/drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h
index a3658680..20e47b5e 100644
--- a/drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h
+++ b/drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h
@@ -69,7 +69,7 @@ static GFXINLINE void post_init_board(GDisplay* g)
(void)g;
}
-static GFXINLINE void set_backlight(GDisplay* g, uint8_t percent)
+static GFXINLINE void set_backlight(GDisplay* g, gU8 percent)
{
// This is function may be called with the display for either the foreground
// or the background layer.
diff --git a/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c b/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c
index 54ecf0cc..7cb8e8a0 100644
--- a/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c
+++ b/drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c
@@ -50,19 +50,19 @@ typedef struct ltdcLayerConfig {
LLDCOLOR_TYPE* frame; // Frame buffer address
gCoord width, height; // Frame size in pixels
gCoord pitch; // Line pitch, in bytes
- uint16_t fmt; // Pixel format in LTDC format
+ gU16 fmt; // Pixel format in LTDC format
// Window
gCoord x, y; // Start pixel position of the virtual layer
gCoord cx, cy; // Size of the virtual layer
- uint32_t defcolor; // Default color, ARGB8888
- uint32_t keycolor; // Color key, RGB888
- uint32_t blending; // Blending factors
- const uint32_t* palette; // The palette, RGB888 (can be NULL)
- uint16_t palettelen; // Palette length
- uint8_t alpha; // Constant alpha factor
- uint8_t layerflags; // Layer configuration
+ gU32 defcolor; // Default color, ARGB8888
+ gU32 keycolor; // Color key, RGB888
+ gU32 blending; // Blending factors
+ const gU32* palette; // The palette, RGB888 (can be NULL)
+ gU16 palettelen; // Palette length
+ gU8 alpha; // Constant alpha factor
+ gU8 layerflags; // Layer configuration
} ltdcLayerConfig;
typedef struct ltdcConfig {
@@ -70,8 +70,8 @@ typedef struct ltdcConfig {
gCoord hsync, vsync; // Horizontal and Vertical sync pixels
gCoord hbackporch, vbackporch; // Horizontal and Vertical back porch pixels
gCoord hfrontporch, vfrontporch; // Horizontal and Vertical front porch pixels
- uint32_t syncflags; // Sync flags
- uint32_t bgcolor; // Clear screen color RGB888
+ gU32 syncflags; // Sync flags
+ gU32 bgcolor; // Clear screen color RGB888
ltdcLayerConfig bglayer; // Background layer config
ltdcLayerConfig fglayer; // Foreground layer config
@@ -109,7 +109,7 @@ typedef struct ltdcConfig {
/*===========================================================================*/
#define PIXIL_POS(g, x, y) ((y) * ((ltdcLayerConfig *)g->priv)->pitch + (x) * LTDC_PIXELBYTES)
-#define PIXEL_ADDR(g, pos) ((LLDCOLOR_TYPE *)((uint8_t *)((ltdcLayerConfig *)g->priv)->frame+pos))
+#define PIXEL_ADDR(g, pos) ((LLDCOLOR_TYPE *)((gU8 *)((ltdcLayerConfig *)g->priv)->frame+pos))
/*===========================================================================*/
/* Driver exported functions. */
@@ -124,7 +124,7 @@ static void _ltdc_reload(void) {
}
static void _ltdc_layer_init(LTDC_Layer_TypeDef* pLayReg, const ltdcLayerConfig* pCfg) {
- static const uint8_t fmt2Bpp[] = {
+ static const gU8 fmt2Bpp[] = {
4, /* LTDC_FMT_ARGB8888 */
3, /* LTDC_FMT_RGB888 */
2, /* LTDC_FMT_RGB565 */
@@ -134,37 +134,37 @@ static void _ltdc_layer_init(LTDC_Layer_TypeDef* pLayReg, const ltdcLayerConfig*
1, /* LTDC_FMT_AL44 */
2 /* LTDC_FMT_AL88 */
};
- uint32_t start, stop;
+ gU32 start, stop;
// Set the framebuffer dimensions and format
- pLayReg->PFCR = (pLayReg->PFCR & ~LTDC_LxPFCR_PF) | ((uint32_t)pCfg->fmt & LTDC_LxPFCR_PF);
- pLayReg->CFBAR = (uint32_t)pCfg->frame & LTDC_LxCFBAR_CFBADD;
- pLayReg->CFBLR = ((((uint32_t)pCfg->pitch << 16) & LTDC_LxCFBLR_CFBP) | (((uint32_t)fmt2Bpp[pCfg->fmt] * pCfg->width + 3) & LTDC_LxCFBLR_CFBLL));
- pLayReg->CFBLNR = (uint32_t)pCfg->height & LTDC_LxCFBLNR_CFBLNBR;
+ pLayReg->PFCR = (pLayReg->PFCR & ~LTDC_LxPFCR_PF) | ((gU32)pCfg->fmt & LTDC_LxPFCR_PF);
+ pLayReg->CFBAR = (gU32)pCfg->frame & LTDC_LxCFBAR_CFBADD;
+ pLayReg->CFBLR = ((((gU32)pCfg->pitch << 16) & LTDC_LxCFBLR_CFBP) | (((gU32)fmt2Bpp[pCfg->fmt] * pCfg->width + 3) & LTDC_LxCFBLR_CFBLL));
+ pLayReg->CFBLNR = (gU32)pCfg->height & LTDC_LxCFBLNR_CFBLNBR;
// Set the display window boundaries
- start = (uint32_t)pCfg->x + driverCfg.hsync + driverCfg.hbackporch;
+ start = (gU32)pCfg->x + driverCfg.hsync + driverCfg.hbackporch;
stop = start + pCfg->cx - 1;
pLayReg->WHPCR = ((start << 0) & LTDC_LxWHPCR_WHSTPOS) | ((stop << 16) & LTDC_LxWHPCR_WHSPPOS);
- start = (uint32_t)pCfg->y + driverCfg.vsync + driverCfg.vbackporch;
+ start = (gU32)pCfg->y + driverCfg.vsync + driverCfg.vbackporch;
stop = start + pCfg->cy - 1;
pLayReg->WVPCR = ((start << 0) & LTDC_LxWVPCR_WVSTPOS) | ((stop << 16) & LTDC_LxWVPCR_WVSPPOS);
// Set colors
pLayReg->DCCR = pCfg->defcolor;
pLayReg->CKCR = (pLayReg->CKCR & ~0x00FFFFFF) | (pCfg->keycolor & 0x00FFFFFF);
- pLayReg->CACR = (pLayReg->CACR & ~LTDC_LxCACR_CONSTA) | ((uint32_t)pCfg->alpha & LTDC_LxCACR_CONSTA);
- pLayReg->BFCR = (pLayReg->BFCR & ~(LTDC_LxBFCR_BF1 | LTDC_LxBFCR_BF2)) | ((uint32_t)pCfg->blending & (LTDC_LxBFCR_BF1 | LTDC_LxBFCR_BF2));
+ pLayReg->CACR = (pLayReg->CACR & ~LTDC_LxCACR_CONSTA) | ((gU32)pCfg->alpha & LTDC_LxCACR_CONSTA);
+ pLayReg->BFCR = (pLayReg->BFCR & ~(LTDC_LxBFCR_BF1 | LTDC_LxBFCR_BF2)) | ((gU32)pCfg->blending & (LTDC_LxBFCR_BF1 | LTDC_LxBFCR_BF2));
for (start = 0; start < pCfg->palettelen; start++)
- pLayReg->CLUTWR = ((uint32_t)start << 24) | (pCfg->palette[start] & 0x00FFFFFF);
+ pLayReg->CLUTWR = ((gU32)start << 24) | (pCfg->palette[start] & 0x00FFFFFF);
// Final flags
- pLayReg->CR = (pLayReg->CR & ~LTDC_LEF_MASK) | ((uint32_t)pCfg->layerflags & LTDC_LEF_MASK);
+ pLayReg->CR = (pLayReg->CR & ~LTDC_LEF_MASK) | ((gU32)pCfg->layerflags & LTDC_LEF_MASK);
}
static void _ltdc_init(void) {
// Set up the display scanning
- uint32_t hacc, vacc;
+ gU32 hacc, vacc;
// Reset the LTDC peripheral
RCC->APB2RSTR |= RCC_APB2RSTR_LTDCRST;
@@ -446,9 +446,9 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
// Uses p.x,p.y p.cx,p.cy p.color
LLDSPEC void gdisp_lld_fill_area(GDisplay* g)
{
- uint32_t pos;
- uint32_t lineadd;
- uint32_t shape;
+ gU32 pos;
+ gU32 lineadd;
+ gU32 shape;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@@ -484,13 +484,13 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
{
// This is slightly less than optimal as we flush the whole line in the source and destination image
// instead of just the cx portion but this saves us having to iterate over each line.
- uint32_t f, e;
+ gU32 f, e;
// Data memory barrier
__ugfxDSB();
// Flush then invalidate the destination area
- e = pos + (g->p.cy > 1 ? ((uint32_t)((ltdcLayerConfig *)g->priv)->pitch*(shape & 0xFFFF)) : ((shape>>16)*LTDC_PIXELBYTES));
+ e = pos + (g->p.cy > 1 ? ((gU32)((ltdcLayerConfig *)g->priv)->pitch*(shape & 0xFFFF)) : ((shape>>16)*LTDC_PIXELBYTES));
for(f=(pos & ~31); f < e; f += 32) {
SCB->DCCIMVAC = f;
SCB->DCIMVAC = f;
@@ -505,16 +505,16 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
while(DMA2D->CR & DMA2D_CR_START);
// Start the DMA2D
- DMA2D->OMAR = (uint32_t)PIXEL_ADDR(g, pos);
+ DMA2D->OMAR = (gU32)PIXEL_ADDR(g, pos);
DMA2D->OOR = lineadd;
DMA2D->NLR = shape;
#if GDISP_LLD_PIXELFORMAT == GDISP_PIXELFORMAT_RGB888
// As we don't support ARGB pixel types in uGFX yet we will
// use RGB with an inverted alpha value for compatibility
// ie. 0x00FFFFFF is fully opaque white, 0xFFFFFFFF is fully transparent white
- DMA2D->OCOLR = (uint32_t)(gdispColor2Native(g->p.color)) ^ 0xFF000000;
+ DMA2D->OCOLR = (gU32)(gdispColor2Native(g->p.color)) ^ 0xFF000000;
#else
- DMA2D->OCOLR = (uint32_t)(gdispColor2Native(g->p.color));
+ DMA2D->OCOLR = (gU32)(gdispColor2Native(g->p.color));
#endif
;
DMA2D->CR = DMA2D_CR_MODE_R2M | DMA2D_CR_START;
@@ -540,27 +540,27 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay* g) {
#if GDISP_HARDWARE_BITFILLS
// Uses p.x,p.y p.cx,p.cy p.x1,p.y1 (=srcx,srcy) p.x2 (=srccx), p.ptr (=buffer)
LLDSPEC void gdisp_lld_blit_area(GDisplay* g) {
- uint32_t srcstart, dststart;
+ gU32 srcstart, dststart;
- srcstart = LTDC_PIXELBYTES * ((uint32_t)g->p.x2 * g->p.y1 * + g->p.x1) + (uint32_t)g->p.ptr;
- dststart = (uint32_t)PIXEL_ADDR(g, PIXIL_POS(g, g->p.x, g->p.y));
+ srcstart = LTDC_PIXELBYTES * ((gU32)g->p.x2 * g->p.y1 * + g->p.x1) + (gU32)g->p.ptr;
+ dststart = (gU32)PIXEL_ADDR(g, PIXIL_POS(g, g->p.x, g->p.y));
#if LTDC_DMA_CACHE_FLUSH
{
// This is slightly less than optimal as we flush the whole line in the source and destination image
// instead of just the cx portion but this saves us having to iterate over each line.
- uint32_t f, e;
+ gU32 f, e;
// Data memory barrier
__ugfxDSB();
// Flush the source area
- e = srcstart + (g->p.cy > 1 ? ((uint32_t)g->p.x2*g->p.cy) : (uint32_t)g->p.cx)*LTDC_PIXELBYTES;
+ e = srcstart + (g->p.cy > 1 ? ((gU32)g->p.x2*g->p.cy) : (gU32)g->p.cx)*LTDC_PIXELBYTES;
for(f=(srcstart & ~31); f < e; f += 32)
SCB->DCCIMVAC = f;
// Flush then invalidate the destination area
- e = dststart + (g->p.cy > 1 ? ((uint32_t)((ltdcLayerConfig *)g->priv)->pitch*g->p.cy) : ((uint32_t)g->p.cx*LTDC_PIXELBYTES));
+ e = dststart + (g->p.cy > 1 ? ((gU32)((ltdcLayerConfig *)g->priv)->pitch*g->p.cy) : ((gU32)g->p.cx*LTDC_PIXELBYTES));
for(f=(dststart & ~31); f < e; f += 32) {
SCB->DCCIMVAC = f;
SCB->DCIMVAC = f;
diff --git a/drivers/gdisp/STM32LTDC/stm32_dma2d.h b/drivers/gdisp/STM32LTDC/stm32_dma2d.h
index 1b3478c9..38995479 100644
--- a/drivers/gdisp/STM32LTDC/stm32_dma2d.h
+++ b/drivers/gdisp/STM32LTDC/stm32_dma2d.h
@@ -11,8 +11,8 @@
#define FGPFCCR_CM_RGB888 0x01
#define FGPFCCR_CM_RGB565 0x02
-#define DMA2D_CR_MODE_R2M ((uint32_t)0x00030000) /* Register-to-memory mode */
-#define DMA2D_CR_MODE_M2M ((uint32_t)0x00000000) /* Register-to-memory mode */
+#define DMA2D_CR_MODE_R2M ((gU32)0x00030000) /* Register-to-memory mode */
+#define DMA2D_CR_MODE_M2M ((gU32)0x00000000) /* Register-to-memory mode */
static void dma2d_init(void);
diff --git a/drivers/gdisp/TLS8204/board_TLS8204_template.h b/drivers/gdisp/TLS8204/board_TLS8204_template.h
index 6b48d83b..0749f5a8 100644
--- a/drivers/gdisp/TLS8204/board_TLS8204_template.h
+++ b/drivers/gdisp/TLS8204/board_TLS8204_template.h
@@ -21,7 +21,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
(void) state;
}
-static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
+static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@@ -34,12 +34,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
(void) g;
(void) cmd;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
+static GFXINLINE void write_data(GDisplay *g, gU8* data, gU16 length) {
(void) g;
(void) data;
(void) length;
diff --git a/drivers/gdisp/TLS8204/gdisp_lld_TLS8204.c b/drivers/gdisp/TLS8204/gdisp_lld_TLS8204.c
index c7ec75a8..8cfdb862 100644
--- a/drivers/gdisp/TLS8204/gdisp_lld_TLS8204.c
+++ b/drivers/gdisp/TLS8204/gdisp_lld_TLS8204.c
@@ -33,7 +33,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define RAM(g) ((uint8_t *)g->priv)
+#define RAM(g) ((gU8 *)g->priv)
#define xyaddr(x, y) ((x) + ((y) >> 3) * GDISP_TLS8204_WIDTH)
#define xybit(y) (1 << ((y) & 7))
@@ -261,7 +261,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_CONTROL_CONTRAST:
if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100;
{
- uint8_t cval;
+ gU8 cval;
cval = (unsigned)g->p.ptr * 2 + 22;
acquire_bus(g);
diff --git a/drivers/gdisp/UC1601s/board_UC1601s_template.h b/drivers/gdisp/UC1601s/board_UC1601s_template.h
index 51b6e5f4..518f932a 100644
--- a/drivers/gdisp/UC1601s/board_UC1601s_template.h
+++ b/drivers/gdisp/UC1601s/board_UC1601s_template.h
@@ -31,12 +31,12 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
(void) g;
(void) cmd;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
+static GFXINLINE void write_data(GDisplay *g, gU8* data, gU16 length) {
(void) g;
(void) data;
(void) length;
diff --git a/drivers/gdisp/UC1601s/gdisp_lld_UC1601s.c b/drivers/gdisp/UC1601s/gdisp_lld_UC1601s.c
index 9b801ea5..c5c78cad 100644
--- a/drivers/gdisp/UC1601s/gdisp_lld_UC1601s.c
+++ b/drivers/gdisp/UC1601s/gdisp_lld_UC1601s.c
@@ -53,7 +53,7 @@
/*===========================================================================*/
// Some common routines and macros
-#define RAM(g) ((uint8_t *)g->priv)
+#define RAM(g) ((gU8 *)g->priv)
#define xyaddr(x, y) ((x) + ((y) >> 3) * GDISP_SCREEN_WIDTH)
#define xybit(y) (1 << ((y) & 7))
@@ -94,7 +94,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
write_cmd(g, UC1601s_RESET);
gfxSleepMilliseconds(10);
- write_cmd2(g, UC1601s_SET_BIAS, (uint8_t)(((GDISP_INITIAL_CONTRAST << 8) - 1) / 100));
+ write_cmd2(g, UC1601s_SET_BIAS, (gU8)(((GDISP_INITIAL_CONTRAST << 8) - 1) / 100));
write_cmd(g, UC1601s_SET_EN | UC1601s_ENABLE);
@@ -266,7 +266,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_CONTROL_CONTRAST:
if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100;
acquire_bus(g);
- write_cmd2(g, UC1601s_SET_BIAS, (uint8_t)(((((unsigned)g->p.ptr) << 8) - 1) / 100));
+ write_cmd2(g, UC1601s_SET_BIAS, (gU8)(((((unsigned)g->p.ptr) << 8) - 1) / 100));
release_bus(g);
g->g.Contrast = (unsigned)g->p.ptr;
return;
diff --git a/drivers/gdisp/UC1610/board_UC1610_template.h b/drivers/gdisp/UC1610/board_UC1610_template.h
index bc5d3a88..ee27a6e3 100644
--- a/drivers/gdisp/UC1610/board_UC1610_template.h
+++ b/drivers/gdisp/UC1610/board_UC1610_template.h
@@ -30,13 +30,13 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t * cmd, uint8_t length) {
+static GFXINLINE void write_cmd(GDisplay *g, gU8 * cmd, gU8 length) {
(void) g;
(void) cmd;
(void) length;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
+static GFXINLINE void write_data(GDisplay *g, gU8* data, gU16 length) {
(void) g;
(void) data;
(void) length;
diff --git a/drivers/gdisp/UC1610/gdisp_lld_UC1610.c b/drivers/gdisp/UC1610/gdisp_lld_UC1610.c
index 10e1e2f3..001a87a6 100644
--- a/drivers/gdisp/UC1610/gdisp_lld_UC1610.c
+++ b/drivers/gdisp/UC1610/gdisp_lld_UC1610.c
@@ -39,7 +39,7 @@
// Some common routines and macros
#define PRIV(g) ((UC1610_Window *)g->priv)
-#define RAM(g) ((uint8_t *)(PRIV(g) + 1))
+#define RAM(g) ((gU8 *)(PRIV(g) + 1))
#define xyaddr(x, y) ((x) + GDISP_SCREEN_WIDTH * ((y) >> 2))
#define xybit(y, c) ((c) << (((y) & 3) << 1))
#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER << 0)
@@ -55,7 +55,7 @@ typedef struct UC1610_Window {
/* Driver local varriables. */
/*===========================================================================*/
-static uint8_t cmdBuffer[11];
+static gU8 cmdBuffer[11];
/*===========================================================================*/
/* Driver local functions. */
@@ -70,7 +70,7 @@ static void GFXINLINE power_on_sequence(GDisplay* g) {
cmdBuffer[2] = UC1610_SET_PANEL_LOADING;
cmdBuffer[3] = UC1610_SET_LCD_BIAS_RATIO;
cmdBuffer[4] = UC1610_SET_VBIAS_POT; // set contrast
- cmdBuffer[5] = (uint8_t) (GDISP_INITIAL_CONTRAST * 254 / 100);
+ cmdBuffer[5] = (gU8) (GDISP_INITIAL_CONTRAST * 254 / 100);
cmdBuffer[6] = UC1610_SET_MAPPING_CONTROL; // bottom view
cmdBuffer[7] = UC1610_SET_SCROLL_LINES_LSB | 0;
cmdBuffer[8] = UC1610_SET_SCROLL_LINES_MSB | 0; // set scroll line on line 0
@@ -134,7 +134,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
gCoord x, y;
- uint8_t *c;
+ gU8 *c;
// handle orientation
switch (g->g.Orientation) {
@@ -171,7 +171,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
LLDSPEC void gdisp_lld_flush(GDisplay* g)
{
gCoord x1, y1, x2, y2, cx;
- uint8_t *c;
+ gU8 *c;
// Don't flush unless we really need to
if (!(g->flags & GDISP_FLG_NEEDFLUSH))
@@ -307,7 +307,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
if ((unsigned)g->p.ptr > 100) { g->p.ptr = (void *)100; }
acquire_bus(g);
cmdBuffer[0] = UC1610_SET_VBIAS_POT;
- cmdBuffer[1] = (uint8_t)((unsigned)g->p.ptr * 254 / 100);
+ cmdBuffer[1] = (gU8)((unsigned)g->p.ptr * 254 / 100);
write_cmd(g, cmdBuffer, 2);
release_bus(g);
g->g.Contrast = (unsigned)g->p.ptr;
diff --git a/drivers/gdisp/UC8173/UC8173_waveform_examples.h b/drivers/gdisp/UC8173/UC8173_waveform_examples.h
index e8ac919b..8bfaf93f 100644
--- a/drivers/gdisp/UC8173/UC8173_waveform_examples.h
+++ b/drivers/gdisp/UC8173/UC8173_waveform_examples.h
@@ -1,4 +1,4 @@
-static uint8_t const _lut_ft[] = {
+static gU8 const _lut_ft[] = {
0x55,0x55,0x55,0x55,0x55,0xAA,0xAA,0xAA,0xAA,0xAA,0x55,0x55,0x55,0x55,0x55,0x55,
0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x5A,0x5A,
0x5A,0x5A,0x5A,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0x5A,0x5A,
@@ -9,11 +9,11 @@ static uint8_t const _lut_ft[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static uint8_t const _lut_KWvcom_DC_GU[] = {
+static gU8 const _lut_KWvcom_DC_GU[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static uint8_t const _lut_kw_GU[] = {
+static gU8 const _lut_kw_GU[] = {
0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,
0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,
0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
@@ -48,11 +48,11 @@ static uint8_t const _lut_kw_GU[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static uint8_t const _lut_KWvcom_GC[] = {
+static gU8 const _lut_KWvcom_GC[] = {
0x55,0x6A,0xA5,0x55,0x55,0x55,0x55,0x55,0x56,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0x0C,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static uint8_t const _lut_kw_GC[] = {
+static gU8 const _lut_kw_GC[] = {
0x41,0x00,0x00,0x81,0x41,0x00,0x00,0x81,0x41,0x00,0x00,0x81,0x41,0x00,0x00,0x81,
0x41,0x00,0x00,0x81,0x81,0x00,0x00,0x82,0x81,0x00,0x00,0x82,0x81,0x00,0x00,0x82,
0x81,0x00,0x00,0x82,0x81,0x00,0x00,0x82,0x42,0x00,0x00,0x41,0x42,0x00,0x00,0x41,
@@ -87,11 +87,11 @@ static uint8_t const _lut_kw_GC[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static uint8_t const _lut_KWvcom_DC_A2_240ms[] = {
+static gU8 const _lut_KWvcom_DC_A2_240ms[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static uint8_t const _lut_kw_A2_240ms[] = {
+static gU8 const _lut_kw_A2_240ms[] = {
0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
@@ -126,11 +126,11 @@ static uint8_t const _lut_kw_A2_240ms[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static uint8_t const _lut_KWvcom_DC_A2_120ms[] = {
+static gU8 const _lut_KWvcom_DC_A2_120ms[] = {
0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static uint8_t const _lut_kw_A2_120ms[] = {
+static gU8 const _lut_kw_A2_120ms[] = {
0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,0x00,0x00,0x40,
diff --git a/drivers/gdisp/UC8173/board_UC8173_template.h b/drivers/gdisp/UC8173/board_UC8173_template.h
index 94677979..5321afe7 100644
--- a/drivers/gdisp/UC8173/board_UC8173_template.h
+++ b/drivers/gdisp/UC8173/board_UC8173_template.h
@@ -61,19 +61,19 @@ static GFXINLINE void release_bus(GDisplay* g)
(void) g;
}
-static GFXINLINE void write_cmd(GDisplay* g, uint8_t cmd)
+static GFXINLINE void write_cmd(GDisplay* g, gU8 cmd)
{
(void) g;
(void) cmd;
}
-static GFXINLINE void write_data(GDisplay* g, uint8_t data)
+static GFXINLINE void write_data(GDisplay* g, gU8 data)
{
(void) g;
(void) data;
}
-static GFXINLINE void write_data_burst(GDisplay* g, uint8_t* data, unsigned length)
+static GFXINLINE void write_data_burst(GDisplay* g, gU8* data, unsigned length)
{
(void) g;
(void) data;
@@ -81,7 +81,7 @@ static GFXINLINE void write_data_burst(GDisplay* g, uint8_t* data, unsigned leng
}
#if UC8173_CAN_READ
- static GFXINLINE uint8_t read_data(GDisplay* g)
+ static GFXINLINE gU8 read_data(GDisplay* g)
{
(void)g;
return 0;
diff --git a/drivers/gdisp/UC8173/gdisp_lld_UC8173.c b/drivers/gdisp/UC8173/gdisp_lld_UC8173.c
index 05fcf557..fdd9fd23 100644
--- a/drivers/gdisp/UC8173/gdisp_lld_UC8173.c
+++ b/drivers/gdisp/UC8173/gdisp_lld_UC8173.c
@@ -25,9 +25,9 @@
/*------------------ Load the board file ------------------*/
typedef struct UC8173Lut {
- uint8_t const *lutVCOM; // 32 bytes
- uint8_t const *lutFW; // 512 bytes
- uint8_t const *lutFT; // 128 bytes
+ gU8 const *lutVCOM; // 32 bytes
+ gU8 const *lutFW; // 512 bytes
+ gU8 const *lutFT; // 128 bytes
gBool regal;
} UC8173Lut;
@@ -115,7 +115,7 @@ typedef struct UC8173_Private {
} UC8173_Private;
#if !UC8173_INIT_REAL_LUT
- static uint8_t const UC8173_LUT_None[] = {
+ static gU8 const UC8173_LUT_None[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -234,7 +234,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
write_data(g, UC8173_VCOM_VOLTAGEBYTE); // was 0x12 in example code = -1.0V
#elif UC8173_CAN_READ
{
- uint8_t vc;
+ gU8 vc;
write_cmd(g, VV);
vc = read_data(g);
@@ -340,12 +340,12 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
// Setup the window
// Datasheet says x,y,w,h but in practice it needs to be x,y,w-1,h-1
write_cmd(g, DTMW);
- write_data(g, (uint8_t)((priv->fb.fa0.x >> 0) & 0xFF));
- write_data(g, (uint8_t)((priv->fb.fa0.y >> 8) & 0x03));
- write_data(g, (uint8_t)((priv->fb.fa0.y >> 0) & 0xFF));
- write_data(g, (uint8_t)(((cx-1) >> 0) & 0xFF));
- write_data(g, (uint8_t)(((cy-1) >> 8) & 0x03));
- write_data(g, (uint8_t)(((cy-1) >> 0) & 0xFF));
+ write_data(g, (gU8)((priv->fb.fa0.x >> 0) & 0xFF));
+ write_data(g, (gU8)((priv->fb.fa0.y >> 8) & 0x03));
+ write_data(g, (gU8)((priv->fb.fa0.y >> 0) & 0xFF));
+ write_data(g, (gU8)(((cx-1) >> 0) & 0xFF));
+ write_data(g, (gU8)(((cy-1) >> 8) & 0x03));
+ write_data(g, (gU8)(((cy-1) >> 0) & 0xFF));
// Transfer the buffer
#if GDISP_LLD_PIXELFORMAT == GDISP_PIXELFORMAT_MONO
@@ -357,7 +357,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
#endif
dx = (cx+FB_TYPE_PIXELS-1)/FB_TYPE_PIXELS * (LLDCOLOR_TYPE_BITS/8);
for (fb = FB_ADDR(&priv->fb, 0, priv->fb.fa0.x, priv->fb.fa0.y), dy = cy; dy; dy--, fb += FB_LINE_TYPES)
- write_data_burst(g, (uint8_t *)fb, dx);
+ write_data_burst(g, (gU8 *)fb, dx);
// Power-up the DC/DC converter to update the display panel
write_cmd(g, PON);
@@ -367,12 +367,12 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
// Datasheet says x,y,w,h but in practice it needs to be x,y,w-1,h-1
write_cmd(g, DRF); // data: Partial Scan = 0x10, REGAL = 0x08, VCOM_DoNothing = 0x04 (GC4/A2 = 0x00, GU4 = 0x08)
write_data(g, (priv->lut->regal ? 0x08 : 0x00));
- write_data(g, (uint8_t)((priv->fb.fa0.x >> 0) & 0xFF));
- write_data(g, (uint8_t)((priv->fb.fa0.y >> 8) & 0x03));
- write_data(g, (uint8_t)((priv->fb.fa0.y >> 0) & 0xFF));
- write_data(g, (uint8_t)(((cx-1) >> 0) & 0xFF));
- write_data(g, (uint8_t)(((cy-1) >> 8) & 0x03));
- write_data(g, (uint8_t)(((cy-1) >> 0) & 0xFF));
+ write_data(g, (gU8)((priv->fb.fa0.x >> 0) & 0xFF));
+ write_data(g, (gU8)((priv->fb.fa0.y >> 8) & 0x03));
+ write_data(g, (gU8)((priv->fb.fa0.y >> 0) & 0xFF));
+ write_data(g, (gU8)(((cx-1) >> 0) & 0xFF));
+ write_data(g, (gU8)(((cy-1) >> 8) & 0x03));
+ write_data(g, (gU8)(((cy-1) >> 0) & 0xFF));
while (!getpin_busy(g));
// Power-down the DC/DC converter
diff --git a/drivers/gdisp/WS29EPD/board_WS29EPD_template.h b/drivers/gdisp/WS29EPD/board_WS29EPD_template.h
index 8d8b1077..1682ebf6 100644
--- a/drivers/gdisp/WS29EPD/board_WS29EPD_template.h
+++ b/drivers/gdisp/WS29EPD/board_WS29EPD_template.h
@@ -31,23 +31,23 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
-static GFXINLINE void write_data(GDisplay *g, uint8_t data) {
+static GFXINLINE void write_data(GDisplay *g, gU8 data) {
(void) g;
(void) data;
}
-static GFXINLINE void write_reg(GDisplay *g, uint8_t reg, uint8_t data){
+static GFXINLINE void write_reg(GDisplay *g, gU8 reg, gU8 data){
(void) g;
(void) reg;
(void) data;
}
-static GFXINLINE void write_cmd(GDisplay *g, uint8_t reg){
+static GFXINLINE void write_cmd(GDisplay *g, gU8 reg){
(void) g;
(void) reg;
}
-static GFXINLINE void write_reg_data(GDisplay *g, uint8_t reg, uint8_t *data, uint8_t len) {
+static GFXINLINE void write_reg_data(GDisplay *g, gU8 reg, gU8 *data, gU8 len) {
(void) g;
(void) reg;
(void) data;
diff --git a/drivers/gdisp/WS29EPD/gdisp_lld_WS29EPD.c b/drivers/gdisp/WS29EPD/gdisp_lld_WS29EPD.c
index 5073ed61..07bf8e8f 100644
--- a/drivers/gdisp/WS29EPD/gdisp_lld_WS29EPD.c
+++ b/drivers/gdisp/WS29EPD/gdisp_lld_WS29EPD.c
@@ -37,9 +37,9 @@
/*===========================================================================*/
/* initialization variables according to WaveShare. */
-uint8_t GDOControl[] = {(GDISP_SCREEN_HEIGHT-1)%256,(GDISP_SCREEN_HEIGHT-1)/256,0x00};
-uint8_t softstart[] = {0xd7,0xd6,0x9d};
-uint8_t LUTDefault_full[] = {0x02,0x02,0x01,0x11,0x12,0x12,0x22,0x22,0x66,0x69,0x69,0x59,0x58,0x99,0x99,0x88,0x00,0x00,0x00,0x00,0xF8,0xB4,0x13,0x51,0x35,0x51,0x51,0x19,0x01,0x00}; // Initialize the full display
+gU8 GDOControl[] = {(GDISP_SCREEN_HEIGHT-1)%256,(GDISP_SCREEN_HEIGHT-1)/256,0x00};
+gU8 softstart[] = {0xd7,0xd6,0x9d};
+gU8 LUTDefault_full[] = {0x02,0x02,0x01,0x11,0x12,0x12,0x22,0x22,0x66,0x69,0x69,0x59,0x58,0x99,0x99,0x88,0x00,0x00,0x00,0x00,0xF8,0xB4,0x13,0x51,0x35,0x51,0x51,0x19,0x01,0x00}; // Initialize the full display
/*===========================================================================*/
/* Driver local functions. */
@@ -55,7 +55,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
* [y=0; y=1; y=2; y=3; ...; y=GDISP_SCREEN_HEIGHT][y=0; y=1; y=2; y=3; ...; y=GDISP_SCREEN_HEIGHT]...
*
*/
- g->priv = gfxAlloc((GDISP_SCREEN_WIDTH / WS29EPD_PPB) * GDISP_SCREEN_HEIGHT * sizeof(uint8_t));
+ g->priv = gfxAlloc((GDISP_SCREEN_WIDTH / WS29EPD_PPB) * GDISP_SCREEN_HEIGHT * sizeof(gU8));
if (!g->priv)
return gFalse;
@@ -85,12 +85,12 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
write_cmd(g, MASTER_ACTIVATION);
write_reg(g, DEEP_SLEEP_MODE, 0x00);
- uint8_t zeros[2] = { 0, 0 };
+ gU8 zeros[2] = { 0, 0 };
write_reg(g, SET_RAM_X_CNT, 0x00); // Set cursor at origin
write_reg_data(g, SET_RAM_Y_CNT, zeros, 2);
- uint8_t dataX[2] = { 0, (GDISP_SCREEN_WIDTH-1)/8 };
- uint8_t dataY[4] = { 0, 0, (GDISP_SCREEN_HEIGHT-1)%256, (GDISP_SCREEN_HEIGHT-1)/256 };
+ gU8 dataX[2] = { 0, (GDISP_SCREEN_WIDTH-1)/8 };
+ gU8 dataY[4] = { 0, 0, (GDISP_SCREEN_HEIGHT-1)%256, (GDISP_SCREEN_HEIGHT-1)/256 };
write_reg_data(g, SET_RAM_X_ADR, dataX, 2); // Set viewport for the whole screen
write_reg_data(g, SET_RAM_Y_ADR, dataY, 4);
@@ -111,7 +111,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if 0 // Not needed yet
static void set_cursor(GDisplay *g) {
- uint8_t dataY[2];
+ gU8 dataY[2];
dataY[0] = g->p.y % 256; // Y-data is send in two bytes
dataY[1] = g->p.y / 256;
@@ -133,8 +133,8 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
}
static void set_viewport(GDisplay *g) {
- uint8_t dataX[2];
- uint8_t dataY[4];
+ gU8 dataX[2];
+ gU8 dataY[4];
// Fill up the X and Y position buffers.
dataX[0] = g->p.x / WS29EPD_PPB;
@@ -186,9 +186,9 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
}
/* There is only black and no black (white). */
if (gdispColor2Native(g->p.color) != Black) // Indexing in the array is done as described in the init routine
- ((uint8_t *)g->priv)[(GDISP_SCREEN_HEIGHT*(x/WS29EPD_PPB)) + y] |= (1 << (WS29EPD_PPB-1 - (x % WS29EPD_PPB)));
+ ((gU8 *)g->priv)[(GDISP_SCREEN_HEIGHT*(x/WS29EPD_PPB)) + y] |= (1 << (WS29EPD_PPB-1 - (x % WS29EPD_PPB)));
else
- ((uint8_t *)g->priv)[(GDISP_SCREEN_HEIGHT*(x/WS29EPD_PPB)) + y] &= ~(1 << (WS29EPD_PPB-1 - (x % WS29EPD_PPB)));
+ ((gU8 *)g->priv)[(GDISP_SCREEN_HEIGHT*(x/WS29EPD_PPB)) + y] &= ~(1 << (WS29EPD_PPB-1 - (x % WS29EPD_PPB)));
}
#endif
@@ -201,7 +201,7 @@ LLDSPEC void gdisp_lld_flush(GDisplay *g) {
for(int i=0; i<GDISP_SCREEN_HEIGHT; i++)
for(int j=0; j<=((GDISP_SCREEN_WIDTH-1)/8); j++)
- write_data(g, ((uint8_t *)g->priv)[(GDISP_SCREEN_HEIGHT*j) + i]);
+ write_data(g, ((gU8 *)g->priv)[(GDISP_SCREEN_HEIGHT*j) + i]);
/* Update the screen. */
write_reg(g, DISPLAY_UPDATE_CTRL2, 0xc7); // Full update (partial hasn't been implemented yet)
diff --git a/drivers/gdisp/framebuffer/board_framebuffer_template.h b/drivers/gdisp/framebuffer/board_framebuffer_template.h
index 594f4340..9b01f075 100644
--- a/drivers/gdisp/framebuffer/board_framebuffer_template.h
+++ b/drivers/gdisp/framebuffer/board_framebuffer_template.h
@@ -35,13 +35,13 @@
#endif
#if GDISP_NEED_CONTROL
- static void board_backlight(GDisplay *g, uint8_t percent) {
+ static void board_backlight(GDisplay *g, gU8 percent) {
// TODO: Can be an empty function if your hardware doesn't support this
(void) g;
(void) percent;
}
- static void board_contrast(GDisplay *g, uint8_t percent) {
+ static void board_contrast(GDisplay *g, gU8 percent) {
// TODO: Can be an empty function if your hardware doesn't support this
(void) g;
(void) percent;