diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-11-03 10:51:23 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-11-03 10:51:23 +1000 |
commit | 7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d (patch) | |
tree | 95cf152ef65ff19c7b2515b427bbe86b92b611d0 /boards/base/Mikromedia-STM32-M4-ILI9341 | |
parent | 8bd70d953bcd3e32ceb4e45a4e561c973726280a (diff) | |
download | uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.tar.gz uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.tar.bz2 uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.zip |
For all source files update integer types to the new gI8 etc type names
Diffstat (limited to 'boards/base/Mikromedia-STM32-M4-ILI9341')
3 files changed, 25 insertions, 25 deletions
diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c b/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c index ccd3ab9f..56a1b99a 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c @@ -19,10 +19,10 @@ static const SPIConfig flash_spicfg = { }; bool flash_is_write_busy(void) { - static uint8_t is_write_busy_cmd[1]; + static gU8 is_write_busy_cmd[1]; is_write_busy_cmd[0] = _SERIAL_FLASH_CMD_RDSR; - uint8_t result[1]; + gU8 result[1]; spiAcquireBus(&SPID3); spiStart(&SPID3, &flash_spicfg); @@ -44,9 +44,9 @@ void flash_write_enable(void) { spiReleaseBus(&SPID3); } -void flash_sector_erase(uint32_t sector) { +void flash_sector_erase(gU32 sector) { flash_write_enable(); - static uint8_t sector_erase_cmd[4]; + static gU8 sector_erase_cmd[4]; sector_erase_cmd[0] = _SERIAL_FLASH_CMD_SER; sector_erase_cmd[1] = (sector >> 16) & 0xFF; sector_erase_cmd[2] = (sector >> 8) & 0xFF; @@ -64,8 +64,8 @@ void flash_sector_erase(uint32_t sector) { while(flash_is_write_busy()); } -void flash_read(uint32_t address, size_t bytes, uint8_t *out) { - static uint8_t sector_read_cmd[4]; +void flash_read(gU32 address, gMemSize bytes, gU8 *out) { + static gU8 sector_read_cmd[4]; sector_read_cmd[0] = _SERIAL_FLASH_CMD_READ; sector_read_cmd[1] = (address >> 16) & 0xFF; sector_read_cmd[2] = (address >> 8) & 0xFF; @@ -80,8 +80,8 @@ void flash_read(uint32_t address, size_t bytes, uint8_t *out) { spiReleaseBus(&SPID3); } -void flash_write(uint32_t address, size_t bytes, const uint8_t *data) { - static uint8_t flash_write_cmd[4]; +void flash_write(gU32 address, gMemSize bytes, const gU8 *data) { + static gU8 flash_write_cmd[4]; flash_write_enable(); @@ -103,21 +103,21 @@ void flash_write(uint32_t address, size_t bytes, const uint8_t *data) { } bool flash_tp_calibrated(void) { - uint8_t out[1]; + gU8 out[1]; flash_read(0x0F0000, 1, out); return (out[0] == 0x01); } -void flash_tp_calibration_save(uint16_t instance, const uint8_t *calbuf, size_t sz) { +void flash_tp_calibration_save(gU16 instance, const gU8 *calbuf, gMemSize sz) { if (instance) return; flash_sector_erase(0x0F0000); - uint8_t calibrated = 0x01; + gU8 calibrated = 0x01; flash_write(0x0F0000, 1, &calibrated); flash_write(0x0F0001, sz, calbuf); } -const char *flash_tp_calibration_load(uint16_t instance) { - static uint8_t foo[24]; +const char *flash_tp_calibration_load(gU16 instance) { + static gU8 foo[24]; if (instance) return 0; if (!flash_tp_calibrated()) return 0; diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.h b/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.h index 2dcc9206..8dfdbb20 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.h +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.h @@ -1,6 +1,6 @@ -void flash_sector_erase(uint32_t sector); -void flash_read(uint32_t address, size_t bytes, uint8_t *out); -void flash_write(uint32_t address, size_t bytes, const uint8_t *data); +void flash_sector_erase(gU32 sector); +void flash_read(gU32 address, gMemSize bytes, gU8 *out); +void flash_write(gU32 address, gMemSize bytes, const gU8 *data); bool flash_tp_calibrated(void); -void flash_tp_calibration_save(uint16_t instance, const uint8_t *calbuf, size_t sz); -const char *flash_tp_calibration_load(uint16_t instance); +void flash_tp_calibration_save(gU16 instance, const gU8 *calbuf, gMemSize sz); +const char *flash_tp_calibration_load(gU16 instance); diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h b/boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h index 93bdd982..2fb1940d 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h @@ -49,7 +49,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) { } } -static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) { +static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) { (void) g; // TODO: can probably pwm this if(percent) { @@ -76,19 +76,19 @@ static GFXINLINE void release_bus(GDisplay *g) { * * @notapi */ -static GFXINLINE void ili9341_delay(uint16_t dly) { - static uint16_t i; +static GFXINLINE void ili9341_delay(gU16 dly) { + static gU16 i; for(i = 0; i < dly; i++) asm("nop"); } -static GFXINLINE void write_index(GDisplay *g, uint16_t index) { +static GFXINLINE void write_index(GDisplay *g, gU16 index) { (void) g; palWriteGroup(GPIOE, 0x00FF, 0, index); CLR_RS; CLR_WR; ili9341_delay(1); SET_WR; ili9341_delay(1); SET_RS; } -static GFXINLINE void write_data(GDisplay *g, uint16_t data) { +static GFXINLINE void write_data(GDisplay *g, gU16 data) { (void) g; palWriteGroup(GPIOE, 0x00FF, 0, data); CLR_WR; ili9341_delay(1); SET_WR; ili9341_delay(1); @@ -106,8 +106,8 @@ static GFXINLINE void setwritemode(GDisplay *g) { palSetGroupMode(GPIOE, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL); } -static GFXINLINE uint16_t read_data(GDisplay *g) { - uint16_t value; +static GFXINLINE gU16 read_data(GDisplay *g) { + gU16 value; (void) g; CLR_RD; value = palReadPort(GPIOE); |