Browse Source

For all source files update integer types to the new gI8 etc type names

remotes/origin_old/release/v2.9
inmarket 3 years ago
parent
commit
7c5a6c928f
  1. 2
      boards/addons/gdisp/board_ED060SC4_example.h
  2. 8
      boards/addons/gdisp/board_HX8347D_stm32f4discovery.h
  3. 10
      boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h
  4. 12
      boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h
  5. 12
      boards/addons/gdisp/board_ILI9341_spi.h
  6. 10
      boards/addons/gdisp/board_ILI9481_firebullstm32f103.h
  7. 14
      boards/addons/gdisp/board_ILI9488_stm32f4cube_hal.h
  8. 12
      boards/addons/gdisp/board_S6D1121_olimex_e407.h
  9. 16
      boards/addons/gdisp/board_SPFD54124B_stm32f3.h
  10. 12
      boards/addons/gdisp/board_SSD1289_stm32f4discovery.h
  11. 6
      boards/addons/gdisp/board_SSD1306_chibios_16.1.3_stm32f4.h
  12. 10
      boards/addons/gdisp/board_SSD1306_i2c.h
  13. 8
      boards/addons/gdisp/board_SSD1963_fsmc.h
  14. 4
      boards/addons/gdisp/board_SSD1963_gpio.h
  15. 6
      boards/addons/gdisp/board_UC8173_nordic_nrf52_sdk11.h
  16. 8
      boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h
  17. 8
      boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h
  18. 8
      boards/addons/ginput/touch/ADS7843/stm32f4cube_hal.h
  19. 4
      boards/base/Altera-MAX10-Neek/board_alteraframereader.h
  20. 14
      boards/base/Altera-MAX10-Neek/gmouse_lld_FT5316_board.h
  21. 8
      boards/base/ArduinoTinyScreen/gfx/board_SSD1331.cpp
  22. 4
      boards/base/ArduinoTinyScreen/gfx/board_SSD1331.h
  23. 12
      boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h
  24. 14
      boards/base/Embest-STM32-DMSTF4BB/gmouse_lld_STMPE811_board.h
  25. 8
      boards/base/FireBull-STM32F103-FB/board_SSD1289.h
  26. 8
      boards/base/FireBull-STM32F103-FB/gmouse_lld_ADS7843_board.h
  27. 12
      boards/base/HY-MiniSTM32V/board_SSD1289.h
  28. 8
      boards/base/HY-MiniSTM32V/gmouse_lld_ADS7843_board.h
  29. 4
      boards/base/Linux-Framebuffer/board_framebuffer.h
  30. 10
      boards/base/Marlin/board_RA8875.h
  31. 14
      boards/base/Marlin/gmouse_lld_FT5x06_board.h
  32. 26
      boards/base/Mikromedia-Plus-STM32-M4/ChibiOS_Board/flash_memory.c
  33. 10
      boards/base/Mikromedia-Plus-STM32-M4/ChibiOS_Board/flash_memory.h
  34. 8
      boards/base/Mikromedia-Plus-STM32-M4/board_SSD1963.h
  35. 14
      boards/base/Mikromedia-Plus-STM32-M4/gmouse_lld_STMPE610_board.h
  36. 26
      boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.c
  37. 10
      boards/base/Mikromedia-STM32-M4-ILI9341/ChibiOS_Board/flash_memory.h
  38. 14
      boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h
  39. 6
      boards/base/Olimex-SAM7EX256-GE12/board_Nokia6610GE12.h
  40. 6
      boards/base/Olimex-SAM7EX256-GE8/board_Nokia6610GE8.h
  41. 8
      boards/base/Olimex-SAM7EX256-GE8/board_SSD1306_i2c.h
  42. 10
      boards/base/Olimex-SAM7EX256-GE8/board_SSD1306_spi.h
  43. 10
      boards/base/Olimex-SAM7EX256-GE8/board_SSD1331.h
  44. 10
      boards/base/Olimex-SAM7EX256-GE8/board_TLS8204.h
  45. 6
      boards/base/Olimex-SAM7EX256-GE8/gaudio_play_board.h
  46. 2
      boards/base/Olimex-SAM7EX256-GE8/gaudio_record_board.h
  47. 12
      boards/base/Olimex-STM32-LCD/board_ILI9320.h
  48. 2
      boards/base/Olimex-STM32-LCD/gmouse_lld_MCU_board.h
  49. 10
      boards/base/RaspberryPi/FreeRTOS/mmio.h
  50. 8
      boards/base/RaspberryPi/FreeRTOS/uart.c
  51. 4
      boards/base/RaspberryPi/FreeRTOS/uart.h
  52. 24
      boards/base/RaspberryPi/board_framebuffer.h
  53. 14
      boards/base/STM32F429i-Discovery/chibios/board_STM32LTDC.h
  54. 14
      boards/base/STM32F429i-Discovery/chibios/gmouse_lld_STMPE811_board.h
  55. 16
      boards/base/STM32F429i-Discovery/chibios/stm32f429i_discovery_sdram.c
  56. 28
      boards/base/STM32F429i-Discovery/chibios/stm32f429i_discovery_sdram.h
  57. 136
      boards/base/STM32F429i-Discovery/chibios/stm32f4xx_fmc.c
  58. 342
      boards/base/STM32F429i-Discovery/chibios/stm32f4xx_fmc.h
  59. 2
      boards/base/STM32F439i-Eval/CubeHal/board_STM32LTDC.h
  60. 6
      boards/base/STM32F439i-Eval/CubeHal/gmouse_lld_EXC7200_board.h
  61. 28
      boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.c
  62. 44
      boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.h
  63. 26
      boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_system.c
  64. 8
      boards/base/STM32F469i-Discovery/CubeHAL/board_STM32LTDC.h
  65. 16
      boards/base/STM32F469i-Discovery/CubeHAL/gmouse_lld_FT6x06_board.h
  66. 368
      boards/base/STM32F469i-Discovery/otm8009a.c
  67. 34
      boards/base/STM32F469i-Discovery/otm8009a.h
  68. 32
      boards/base/STM32F469i-Discovery/stm32f469i_discovery_sdram.c
  69. 50
      boards/base/STM32F469i-Discovery/stm32f469i_discovery_sdram.h
  70. 24
      boards/base/STM32F469i-Discovery/stm32f469i_raw32_system.c
  71. 2
      boards/base/STM32F746-Discovery/board_STM32LTDC.h
  72. 56
      boards/base/STM32F746-Discovery/example_chibios3/stm32f7xx_hal_conf.h
  73. 76
      boards/base/STM32F746-Discovery/example_raw32/stm32f7xx_hal_conf.h
  74. 10
      boards/base/STM32F746-Discovery/gmouse_lld_FT5336_board.h
  75. 94
      boards/base/STM32F746-Discovery/stm32f746g_discovery_sdram.c
  76. 4
      boards/base/STM32F746-Discovery/stm32f746g_discovery_sdram.h
  77. 22
      boards/base/STM32F746-Discovery/stm32f746g_raw32_system.c
  78. 30
      boards/base/STM32F746-Discovery/stm32f7_i2c.c
  79. 12
      boards/base/STM32F746-Discovery/stm32f7_i2c.h
  80. 6
      boards/base/eCos-Synthetic-Framebuffer/board_framebuffer.h
  81. 4
      changelog.txt
  82. 50
      demos/3rdparty/bubbles/main.c
  83. 2
      demos/3rdparty/notepad-2/main.c
  84. 2
      demos/3rdparty/notepad-2/notepadApp.c
  85. 18
      demos/3rdparty/notepad-2/notepadCore.c
  86. 8
      demos/3rdparty/notepad-2/notepadCore.h
  87. 2
      demos/applications/combo/mandelbrot.c
  88. 2
      demos/applications/mandelbrot/main.c
  89. 2
      demos/applications/notepad/main.c
  90. 2
      demos/benchmarks/main.c
  91. 54
      demos/games/justget10/jg10.c
  92. 28
      demos/games/minesweeper/mines.c
  93. 8
      demos/games/minesweeper/resources/romfs/userfonts.h
  94. 12
      demos/games/tetris/Example_Makefiles/stm32f4/board_SSD1289.h
  95. 8
      demos/games/tetris/Example_Makefiles/stm32f4/ginput_lld_mouse_board.h
  96. 8
      demos/games/tetris/Example_Makefiles/stm32f4/gmouse_lld_ADS7843_board.h
  97. 8
      demos/games/tetris/Example_Makefiles/stm32f4/gmouse_lld_ADS7843_board.h.old
  98. 12
      demos/games/tetris/Example_Makefiles/stm32f4_chibios_3.x/board_SSD1289.h
  99. 8
      demos/games/tetris/Example_Makefiles/stm32f4_chibios_3.x/ginput_lld_mouse_board.h
  100. 8
      demos/games/tetris/Example_Makefiles/stm32f4_chibios_3.x/gmouse_lld_ADS7843_board.h

2
boards/addons/gdisp/board_ED060SC4_example.h

@ -119,7 +119,7 @@ static GFXINLINE void setpin_sph(GDisplay *g, gBool on) {
}
/* Set the state of the D0-D7 (source driver Data) pins. */
static GFXINLINE void setpins_data(GDisplay *g, uint8_t value) {
static GFXINLINE void setpins_data(GDisplay *g, gU8 value) {
(void) g;
palWriteGroup(GPIOB, 0xFF, GPIOB_EINK_D0, value);
}

8
boards/addons/gdisp/board_HX8347D_stm32f4discovery.h

@ -112,7 +112,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;
pwmEnableChannel(&PWMD4, 1, percent);
}
@ -140,7 +140,7 @@ static GFXINLINE void busmode8(GDisplay *g) {
spiStart(&SPID1, &spi1cfg_8bit);
}
static GFXINLINE void write_index(GDisplay *g, uint8_t index) {
static GFXINLINE void write_index(GDisplay *g, gU8 index) {
(void) g;
CLR_DATA;
SPI1->DR = index;
@ -148,13 +148,13 @@ static GFXINLINE void write_index(GDisplay *g, uint8_t index) {
SET_DATA;
}
static GFXINLINE void write_data(GDisplay *g, uint8_t data) {
static GFXINLINE void write_data(GDisplay *g, gU8 data) {
(void) g;
SPI1->DR = data;
while(((SPI1->SR & SPI_SR_TXE) == 0) || ((SPI1->SR & SPI_SR_BSY) != 0));
}
static GFXINLINE void write_ram16(GDisplay *g, uint16_t data) {
static GFXINLINE void write_ram16(GDisplay *g, gU16 data) {
(void) g;
SPI1->DR = data;
while((SPI1->SR & SPI_SR_TXE) == 0);

10
boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h

@ -76,7 +76,7 @@ static noinline void setpin_reset(GDisplay *g, gBool state) {
palSetPad(IOPORTA, 7);
}
static void set_backlight(GDisplay *g, uint8_t percent) {
static void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
if (percentage)
palClearPad(IOPORTD, 3);
@ -92,8 +92,8 @@ static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
static noinline void write_index(GDisplay *g, uint16_t index) {
volatile uint16_t dummy;
static noinline void write_index(GDisplay *g, gU16 index) {
volatile gU16 dummy;
(void) g;
PmpWaitBusy();
@ -106,7 +106,7 @@ static noinline void write_index(GDisplay *g, uint16_t index) {
(void)dummy;
}
static noinline void write_data(GDisplay *g, uint16_t data) {
static noinline void write_data(GDisplay *g, gU16 data) {
(void) g;
PMDIN = data;
PmpWaitBusy();
@ -120,7 +120,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
static noinline uint16_t read_data(GDisplay *g) {
static noinline gU16 read_data(GDisplay *g) {
(void) g;
PmpWaitBusy();
return PMDIN;

12
boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h

@ -31,8 +31,8 @@
// For a multiple display configuration we would put all this in a structure and then
// set g->board to that structure.
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
#define GDISP_REG (*((volatile gU16 *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile gU16 *) 0x60020000)) /* RS = 1 */
static GFXINLINE void init_board(GDisplay *g) {
@ -76,7 +76,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
palSetPad(GPIOE, GPIOE_TFT_RST);
}
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void)percent;
}
@ -89,12 +89,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;
GDISP_REG = index;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
GDISP_RAM = data;
}
@ -107,7 +107,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 GDISP_RAM;
}

12
boards/addons/gdisp/board_ILI9341_spi.h

@ -43,7 +43,7 @@ static const SPIConfig spi2cfg = {
(SPI_CR1_MSTR | SPI_CR1_SPE | SPI_CR1_SSM | SPI_CR1_SSI)
};
static void send_data(uint16_t data);
static void send_data(gU16 data);
/**
* @brief Initialise the board for the display.
@ -105,7 +105,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
*
* @notapi
*/
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
(void) percent;
}
@ -139,7 +139,7 @@ static GFXINLINE void release_bus(GDisplay *g) {
*
* @notapi
*/
static GFXINLINE void send_data(uint16_t data) {
static GFXINLINE void send_data(gU16 data) {
// http://forum.easyelectronics.ru/viewtopic.php?p=262122#p262122
while (!(SPI2->SR & SPI_SR_TXE)); // ïðè âõîäå íà îòïðàâêó ïðîâåðÿåì - à ïóñòîé ëè SPI_DR
SPI2->DR = data; // çàãðóçèëè â SPI_DR êîä êîìàíäû
@ -154,7 +154,7 @@ static GFXINLINE void send_data(uint16_t data) {
*
* @notapi
*/
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
while (SPI2->SR & SPI_SR_BSY);
@ -177,7 +177,7 @@ static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
*
* @notapi
*/
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
send_data(data);
@ -213,7 +213,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
*
* @notapi
*/
static GFXINLINE uint16_t read_data(GDisplay *g) {
static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return 0;
}

10
boards/addons/gdisp/board_ILI9481_firebullstm32f103.h

@ -58,7 +58,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;
}
@ -71,13 +71,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;
palWritePort(GPIOE, index);
CLR_RS; CLR_WR; SET_WR; SET_RS;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
palWritePort(GPIOE, data);
CLR_WR; SET_WR;
@ -95,8 +95,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;

14
boards/addons/gdisp/board_ILI9488_stm32f4cube_hal.h

@ -10,8 +10,8 @@
#include "stm32f4xx_hal.h"
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
#define GDISP_REG (*((volatile gU16 *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile gU16 *) 0x60020000)) /* RS = 1 */
static GFXINLINE void init_board(GDisplay *g)
{
@ -108,7 +108,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;
@ -129,14 +129,14 @@ 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;
GDISP_REG = index;
}
static GFXINLINE void write_data(GDisplay* g, uint16_t data)
static GFXINLINE void write_data(GDisplay* g, gU16 data)
{
(void) g;
@ -153,11 +153,11 @@ 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 (uint16_t)GDISP_RAM;
return (gU16)GDISP_RAM;
}
#endif /* _GDISP_LLD_BOARD_H */

12
boards/addons/gdisp/board_S6D1121_olimex_e407.h

@ -18,8 +18,8 @@
// For a multiple display configuration we would put all this in a structure and then
// set g->board to that structure.
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
#define GDISP_REG (*((volatile gU16 *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile gU16 *) 0x60020000)) /* RS = 1 */
static GFXINLINE void init_board(GDisplay *g) {
@ -55,7 +55,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;
}
@ -68,12 +68,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;
GDISP_REG = index;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
GDISP_RAM = data;
}
@ -86,7 +86,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 GDISP_RAM;
}

16
boards/addons/gdisp/board_SPFD54124B_stm32f3.h

@ -37,7 +37,7 @@
#if USE_HARD_SPI
#if GFX_USE_OS_CHIBIOS
static int32_t thdPriority = 0;
static gI32 thdPriority = 0;
#endif
/*
@ -58,9 +58,9 @@ static GFXINLINE void soft_spi_sck(void){
palClearPad(SPFD54124B_SPI_PORT, SPFD54124B_SPI_SCK);
}
static GFXINLINE void soft_spi_write_9bit(uint16_t data){
static GFXINLINE void soft_spi_write_9bit(gU16 data){
uint8_t i;
gU8 i;
// activate lcd by low on CS pin
palClearPad(SPFD54124B_SPI_PORT, SPFD54124B_SPI_NSS);
@ -131,7 +131,7 @@ static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
#if USE_HARD_SPI
#if GFX_USE_OS_CHIBIOS
thdPriority = (int32_t)chThdGetPriority();
thdPriority = (gI32)chThdGetPriority();
chThdSetPriority(HIGHPRIO);
#endif
spiAcquireBus(&SPFD54124B_SPID);
@ -148,10 +148,10 @@ static GFXINLINE void release_bus(GDisplay *g) {
#endif
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
uint16_t b;
gU16 b;
#if USE_HARD_SPI
@ -176,7 +176,7 @@ static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
}
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
#if USE_HARD_SPI
@ -195,7 +195,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) {
(void) g;
(void) percent;
}

12
boards/addons/gdisp/board_SSD1289_stm32f4discovery.h

@ -18,8 +18,8 @@
// For a multiple display configuration we would put all this in a structure and then
// set g->board to that structure.
#define GDISP_REG ((volatile uint16_t *) 0x60000000)[0] /* RS = 0 */
#define GDISP_RAM ((volatile uint16_t *) 0x60020000)[0] /* RS = 1 */
#define GDISP_REG ((volatile gU16 *) 0x60000000)[0] /* RS = 0 */
#define GDISP_RAM ((volatile gU16 *) 0x60020000)[0] /* RS = 1 */
#define GDISP_DMA_STREAM STM32_DMA2_STREAM6
#define FSMC_BANK 0
@ -114,7 +114,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;
pwmEnableChannel(&PWMD3, 2, percent);
}
@ -127,12 +127,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;
GDISP_REG = index;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
GDISP_RAM = data;
}
@ -147,7 +147,7 @@ static GFXINLINE void setwritemode(GDisplay *g) {
FSMC_Bank1->BTCR[FSMC_BANK+1] = FSMC_BTR1_ADDSET_0 | FSMC_BTR1_DATAST_2 | FSMC_BTR1_BUSTURN_0; /* FSMC timing */
}
static GFXINLINE uint16_t read_data(GDisplay *g) {
static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return GDISP_RAM;
}

6
boards/addons/gdisp/board_SSD1306_chibios_16.1.3_stm32f4.h

@ -72,17 +72,17 @@ static GFXINLINE void release_bus(GDisplay* g)
spiReleaseBus(SPI_DRIVER);
}
static GFXINLINE void write_cmd(GDisplay* g, uint8_t cmd)
static GFXINLINE void write_cmd(GDisplay* g, gU8 cmd)
{
(void)g;
static uint8_t buf;
static gU8 buf;
palClearPad(DC_PORT, DC_PAD);
buf = cmd;
spiSend(SPI_DRIVER, 1, &buf);
}
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;

10
boards/addons/gdisp/board_SSD1306_i2c.h

@ -46,7 +46,7 @@
static I2CConfig i2cconfig;
#if GFX_USE_OS_CHIBIOS
static int32_t thdPriority = 0;
static gI32 thdPriority = 0;
#endif
static GFXINLINE void init_board(GDisplay *g) {
@ -93,7 +93,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
#if GFX_USE_OS_CHIBIOS
thdPriority = (int32_t)chThdGetPriority();
thdPriority = (gI32)chThdGetPriority();
chThdSetPriority(HIGHPRIO);
#endif
i2cAcquireBus(&I2CD1);
@ -107,8 +107,8 @@ static GFXINLINE void release_bus(GDisplay *g) {
i2cReleaseBus(&I2CD1);
}
static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
uint8_t command[2];
static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
gU8 command[2];
(void) g;
command[0] = 0x00; // Co = 0, D/C = 0
@ -119,7 +119,7 @@ static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
i2cStop(&I2CD1);
}
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;
i2cStart(&I2CD1, &i2cconfig);

8
boards/addons/gdisp/board_SSD1963_fsmc.h

@ -32,8 +32,8 @@ static const LCD_Parameters DisplayTimings[] = {
// set g->board to that structure.
/* Using FSMC A16 as RS */
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
#define GDISP_REG (*((volatile gU16 *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile gU16 *) 0x60020000)) /* RS = 1 */
static GFXINLINE void init_board(GDisplay *g) {
@ -94,12 +94,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;
GDISP_REG = index;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
GDISP_RAM = data;
}

4
boards/addons/gdisp/board_SSD1963_gpio.h

@ -87,14 +87,14 @@ static GFXINLINE void release_bus(GDisplay *g) {
Clr_CS;
}
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
Set_RS; Clr_RD; Set_WR;
palWritePort(GDISP_DATA_PORT, index);
Clr_WR;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
Clr_RS; Clr_RD; Set_WR;
palWritePort(GDISP_DATA_PORT, data);

6
boards/addons/gdisp/board_UC8173_nordic_nrf52_sdk11.h

@ -94,7 +94,7 @@ static GFXINLINE void release_bus(GDisplay* g)
nrf_gpio_pin_set(PIN_CS);
}
static GFXINLINE void write_cmd(GDisplay* g, uint8_t cmd)
static GFXINLINE void write_cmd(GDisplay* g, gU8 cmd)
{
(void)g;
@ -102,7 +102,7 @@ static GFXINLINE void write_cmd(GDisplay* g, uint8_t cmd)
nrf_drv_spi_transfer(&spi, &cmd, 1, 0, 0);
}
static GFXINLINE void write_data(GDisplay* g, uint8_t data)
static GFXINLINE void write_data(GDisplay* g, gU8 data)
{
(void)g;
@ -110,7 +110,7 @@ static GFXINLINE void write_data(GDisplay* g, uint8_t data)
nrf_drv_spi_transfer(&spi, &data, 1, 0, 0);
}
static GFXINLINE void write_data_burst(GDisplay* g, uint8_t* data, uint8_t length)
static GFXINLINE void write_data_burst(GDisplay* g, gU8* data, gU8 length)
{
(void)g;

8
boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h

@ -66,14 +66,14 @@ static GFXINLINE void release_bus(GMouse* m) {
//TOUCHSCREEN_SPI_EPILOGUE();
}
static GFXINLINE uint16_t read_value(GMouse* m, uint16_t port) {
static uint8_t txbuf[3] = {0};
static uint8_t rxbuf[3] = {0};
static GFXINLINE gU16 read_value(GMouse* m, gU16 port) {
static gU8 txbuf[3] = {0};
static gU8 rxbuf[3] = {0};
(void) m;
txbuf[0] = port;
spiExchange(&SPID2, 3, txbuf, rxbuf);
return ((uint16_t)rxbuf[1] << 5) | (rxbuf[2] >> 3);
return ((gU16)rxbuf[1] << 5) | (rxbuf[2] >> 3);
}
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */

8
boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h

@ -80,15 +80,15 @@ static GFXINLINE void release_bus(GMouse* m) {
spiReleaseBus(&SPID2);
}
static GFXINLINE uint16_t read_value(GMouse* m, uint16_t port) {
static uint8_t txbuf[3] = {0};
static uint8_t rxbuf[3] = {0};
static GFXINLINE gU16 read_value(GMouse* m, gU16 port) {
static gU8 txbuf[3] = {0};
static gU8 rxbuf[3] = {0};
(void) m;
txbuf[0] = port;
spiExchange(&SPID2, 3, txbuf, rxbuf);
return ((uint16_t)rxbuf[1] << 5) | (rxbuf[2] >> 3);
return ((gU16)rxbuf[1] << 5) | (rxbuf[2] >> 3);
}
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */

8
boards/addons/ginput/touch/ADS7843/stm32f4cube_hal.h

@ -123,11 +123,11 @@ static GFXINLINE void release_bus(GMouse* m)
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_SET);
}
static GFXINLINE uint16_t read_value(GMouse* m, uint16_t reg)
static GFXINLINE gU16 read_value(GMouse* m, gU16 reg)
{
uint8_t txbuf[3] = {0, 0, 0};
uint8_t rxbuf[3] = {0, 0, 0};
uint16_t ret;
gU8 txbuf[3] = {0, 0, 0};
gU8 rxbuf[3] = {0, 0, 0};
gU16 ret;
(void)m;

4
boards/base/Altera-MAX10-Neek/board_alteraframereader.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;

14
boards/base/Altera-MAX10-Neek/gmouse_lld_FT5316_board.h

@ -76,29 +76,29 @@ static gBool init_board(GMouse* m, unsigned instance)
return gTrue;
}
static void write_reg(GMouse* m, uint8_t reg, uint8_t val)
static void write_reg(GMouse* m, gU8 reg, gU8 val)
{
(void)m;
device_write(FT5316_I2C_SLAVE_ADDRESS, reg, val);
}
static uint8_t read_byte(GMouse* m, uint8_t reg)
static gU8 read_byte(GMouse* m, gU8 reg)
{
(void)m;
uint8_t ret = 0;
gU8 ret = 0;
ret = (uint8_t)device_read(FT5316_I2C_SLAVE_ADDRESS, reg);
ret = (gU8)device_read(FT5316_I2C_SLAVE_ADDRESS, reg);
return ret;
}
static uint16_t read_word(GMouse* m, uint8_t reg)
static gU16 read_word(GMouse* m, gU8 reg)
{
(void)m;
uint16_t ret = 0;
gU16 ret = 0;
ret = (uint16_t)device_read(FT5316_I2C_SLAVE_ADDRESS, reg);
ret = (gU16)device_read(FT5316_I2C_SLAVE_ADDRESS, reg);
return ret;
}

8
boards/base/ArduinoTinyScreen/gfx/board_SSD1331.cpp

@ -26,9 +26,9 @@
// Wire address of the SX1505 chip
#define GPIO_ADDR 0x20
static void writeGPIO(uint8_t regAddr, uint8_t regData)
static void writeGPIO(gU8 regAddr, gU8 regData)
{
uint8_t oldTWBR=TWBR;
gU8 oldTWBR=TWBR;
TWBR=0;
Wire.beginTransmission(GPIO_ADDR + LCD_BOARD_ID);
Wire.write(regAddr);
@ -69,7 +69,7 @@ void SSD1331_releasebus(void) {
isDataMode = isCmdMode = false;
}
void SSD1331_write_cmd(uint8_t cmd) {
void SSD1331_write_cmd(gU8 cmd) {
if (!isCmdMode) {
writeGPIO(GPIO_RegData,GPIO_CMD_START);
isDataMode = false;
@ -78,7 +78,7 @@ void SSD1331_write_cmd(uint8_t cmd) {
SPI.transfer(cmd);
}
void SSD1331_write_data(uint8_t data) {
void SSD1331_write_data(gU8 data) {
if (!isDataMode) {
writeGPIO(GPIO_RegData,GPIO_DATA_START);
isDataMode = true;

4
boards/base/ArduinoTinyScreen/gfx/board_SSD1331.h

@ -25,8 +25,8 @@ void SSD1331_init_board(void);
void SSD1331_setpin_reset(int state);
void SSD1331_aquirebus(void);
void SSD1331_releasebus(void);
void SSD1331_write_cmd(uint8_t cmd);
void SSD1331_write_data(uint8_t data);
void SSD1331_write_cmd(gU8 cmd);
void SSD1331_write_data(gU8 data);
#ifdef __cplusplus
}

12
boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h

@ -12,8 +12,8 @@
// set g->board to that structure.
/* Using FSMC A19 (PE3) as DC */
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* DC = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60100000)) /* DC = 1 */
#define GDISP_REG (*((volatile gU16 *) 0x60000000)) /* DC = 0 */
#define GDISP_RAM (*((volatile gU16 *) 0x60100000)) /* DC = 1 */
#define GDISP_DMA_STREAM STM32_DMA2_STREAM6
#define SET_RST palSetPad(GPIOD, 3);
@ -108,7 +108,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;
pwmEnableChannel(&PWMD4, 1, percent);
}
@ -121,12 +121,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;
GDISP_REG = index;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
GDISP_RAM = data;
}
@ -139,7 +139,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 GDISP_RAM;
}

14
boards/base/Embest-STM32-DMSTF4BB/gmouse_lld_STMPE811_board.h

@ -77,8 +77,8 @@ static GFXINLINE void release_bus(GMouse* m) {
}
static void write_reg(GMouse* m, uint8_t reg, uint8_t val) {
uint8_t txbuf[2];
static void write_reg(GMouse* m, gU8 reg, gU8 val) {
gU8 txbuf[2];
(void) m;
txbuf[0] = reg;
@ -89,8 +89,8 @@ static void write_reg(GMouse* m, uint8_t reg, uint8_t val) {
i2cReleaseBus(&I2CD1);
}
static uint8_t read_byte(GMouse* m, uint8_t reg) {
uint8_t rxbuf[1];
static gU8 read_byte(GMouse* m, gU8 reg) {
gU8 rxbuf[1];
(void) m;
rxbuf[0] = 0;
@ -102,8 +102,8 @@ static uint8_t read_byte(GMouse* m, uint8_t reg) {
return rxbuf[0];
}
static uint16_t read_word(GMouse* m, uint8_t reg) {
uint8_t rxbuf[2];
static gU16 read_word(GMouse* m, gU8 reg) {
gU8 rxbuf[2];
(void) m;
rxbuf[0] = 0;
@ -113,7 +113,7 @@ static uint16_t read_word(GMouse* m, uint8_t reg) {
i2cMasterTransmitTimeout(&I2CD1, STMPE811_ADDR, &reg, 1, rxbuf, 2, MS2ST(STMPE811_TIMEOUT));
i2cReleaseBus(&I2CD1);
return (((uint16_t)rxbuf[0]) << 8) | rxbuf[1];
return (((gU16)rxbuf[0]) << 8) | rxbuf[1];
}
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */

8
boards/base/FireBull-STM32F103-FB/board_SSD1289.h

@ -56,7 +56,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state)
/* Nothing to do here - reset pin tied to Vcc */
}
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent)
static GFXINLINE void set_backlight(GDisplay *g, gU8 percent)
{
(void) g;
(void) percent;
@ -74,7 +74,7 @@ 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;
@ -85,7 +85,7 @@ static GFXINLINE void write_index(GDisplay *g, uint16_t index)
SET_RS;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data)
static GFXINLINE void write_data(GDisplay *g, gU16 data)
{
(void) g;
@ -112,7 +112,7 @@ static GFXINLINE void setwritemode(GDisplay *g)
palSetGroupMode(GPIOE, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
}
static GFXINLINE uint16_t read_data(GDisplay *g) {
static GFXINLINE gU16 read_data(GDisplay *g) {
(void) g;
return palReadPort(GPIOE);

8
boards/base/FireBull-STM32F103-FB/gmouse_lld_ADS7843_board.h

@ -66,11 +66,11 @@ static GFXINLINE void release_bus(GMouse* m)
spiReleaseBus(&SPID1);
}
static GFXINLINE uint16_t read_value(GMouse* m, uint16_t port)
static GFXINLINE gU16 read_value(GMouse* m, gU16 port)
{
static uint8_t txbuf[3] = {0};
static uint8_t rxbuf[3] = {0};
uint16_t ret;
static gU8 txbuf[3] = {0};
static gU8 rxbuf[3] = {0};
gU16 ret;
(void) m;
txbuf[0] = port;

12
boards/base/HY-MiniSTM32V/board_SSD1289.h

@ -40,8 +40,8 @@ static const PWMConfig pwmcfg =
/*
* LCD_RS is on A16 (PD11)
*/
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
#define GDISP_REG (*((volatile gU16 *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile gU16 *) 0x60020000)) /* RS = 1 */
/*
* STM32_DMA1_STREAM7
* NOTE: conflicts w/ USART2_TX, TIM2_CH2, TIM2_CH4, TIM4_UP, I2C1_RX in case
@ -131,7 +131,7 @@ static GFXINLINE void setpin_reset(GDisplay *g, gBool state) {
else {}
}
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, gU8 percent) {
(void) g;
if (percent > 100) { percent = 100; }
pwmEnableChannel(&PWMD3, 1, percent);
@ -145,12 +145,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;
GDISP_REG = index;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
GDISP_RAM = data;
}
@ -163,7 +163,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 GDISP_RAM;
}

8
boards/base/HY-MiniSTM32V/gmouse_lld_ADS7843_board.h

@ -83,11 +83,11 @@ static GFXINLINE void release_bus(GMouse* m) {
spiReleaseBus(&SPID1);
}
static GFXINLINE uint16_t read_value(GMouse* m, uint16_t port) {
static GFXINLINE gU16 read_value(GMouse* m, gU16 port) {
(void)m;
static uint8_t txbuf[3] = {0};
static uint8_t rxbuf[3] = {0};
uint16_t ret;
static gU8 txbuf[3] = {0};
static gU8 rxbuf[3] = {0};
gU16 ret;
txbuf[0] = port;
spiExchange(&SPID1, 3, txbuf, rxbuf);

4
boards/base/Linux-Framebuffer/board_framebuffer.h

@ -203,12 +203,12 @@
#endif
#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;
}

10
boards/base/Marlin/board_RA8875.h

@ -15,8 +15,8 @@
// For a multiple display configuration we would put all this in a structure and then
// set g->board to that structure.
#define GDISP_RAM (*((volatile uint16_t *) 0x68000000)) /* RS = 0 */
#define GDISP_REG (*((volatile uint16_t *) 0x68020000)) /* RS = 1 */
#define GDISP_RAM (*((volatile gU16 *) 0x68000000)) /* RS = 0 */
#define GDISP_REG (*((volatile gU16 *) 0x68020000)) /* RS = 1 */
#define FSMC_BANK 4
@ -83,13 +83,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;
GDISP_REG = index;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
GDISP_RAM = data;
@ -103,7 +103,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 GDISP_RAM;

14
boards/base/Marlin/gmouse_lld_FT5x06_board.h

@ -51,8 +51,8 @@ static GFXINLINE void release_bus(GMouse* m) {
}
static void write_reg(GMouse* m, uint8_t reg, uint8_t val) {
uint8_t txbuf[2];
static void write_reg(GMouse* m, gU8 reg, gU8 val) {
gU8 txbuf[2];
(void) m;
txbuf[0] = reg;
@ -63,8 +63,8 @@ static void write_reg(GMouse* m, uint8_t reg, uint8_t val) {
i2cReleaseBus(&I2CD2);
}
static uint8_t read_byte(GMouse* m, uint8_t reg) {
uint8_t rxbuf[1];
static gU8 read_byte(GMouse* m, gU8 reg) {
gU8 rxbuf[1];
(void) m;
rxbuf[0] = 0;
@ -76,8 +76,8 @@ static uint8_t read_byte(GMouse* m, uint8_t reg) {
return rxbuf[0];
}
static uint16_t read_word(GMouse* m, uint8_t reg) {
uint8_t rxbuf[2];
static gU16 read_word(GMouse* m, gU8 reg) {
gU8 rxbuf[2];
(void) m;
rxbuf[0] = 0;
@ -87,7 +87,7 @@ static uint16_t read_word(GMouse* m, uint8_t reg) {
i2cMasterTransmitTimeout(&I2CD2, FT5x06_ADDR, &reg, 1, rxbuf, 2, MS2ST(FT5x06_TIMEOUT));
i2cReleaseBus(&I2CD2);
return (((uint16_t)rxbuf[0]) << 8) | rxbuf[1];
return (((gU16)rxbuf[0]) << 8) | rxbuf[1];
}
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */

26
boards/base/Mikromedia-Plus-STM32-M4/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;

10
boards/base/Mikromedia-Plus-STM32-M4/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);

8
boards/base/Mikromedia-Plus-STM32-M4/board_SSD1963.h

@ -87,7 +87,7 @@ static GFXINLINE void release_bus(GDisplay *g) {
SET_CS;
}
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, gU16 index) {
(void) g;
CLR_DC;
@ -97,7 +97,7 @@ static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
SET_DC;
}
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, gU16 data) {
(void) g;
palWriteBus(&busDataLo, (data & 0xFF));
@ -117,8 +117,8 @@ static GFXINLINE void setwritemode(GDisplay *g) {
palSetBusMode(&busDataHi, PAL_MODE_OUTPUT_PUSHPULL);
}
static GFXINLINE uint16_t read_data(GDisplay *g) {
uint16_t data;
static GFXINLINE gU16 read_data(GDisplay *g) {
gU16 data;
(void) g;
CLR_RD;

14
boards/base/Mikromedia-Plus-STM32-M4/gmouse_lld_STMPE610_board.h

@ -77,8 +77,8 @@ static GFXINLINE void release_bus(GMouse* m) {
}
static void write_reg(GMouse* m, uint8_t reg, uint8_t val) {
uint8_t txbuf[2];
static void write_reg(GMouse* m, gU8 reg, gU8 val) {
gU8 txbuf[2];
(void) m;
txbuf[0] = reg;
@ -89,8 +89,8 @@ static void write_reg(GMouse* m, uint8_t reg, uint8_t val) {
i2cReleaseBus(&I2CD1);
}
static uint8_t read_byte(GMouse* m, uint8_t reg) {
uint8_t rxbuf[1];
static gU8 read_byte(GMouse* m, gU8 reg) {
gU8 rxbuf[1];
(void) m;
rxbuf[0] = 0;
@ -102,8 +102,8 @@ static uint8_t read_byte(GMouse* m, uint8_t reg) {
return rxbuf[0];
}
static uint16_t read_word(GMouse* m, uint8_t reg) {
uint8_t rxbuf[2];
static gU16 read_word(GMouse* m, gU8 reg) {
gU8 rxbuf[2];
(void) m;
rxbuf[0] = 0;
@ -113,7 +113,7 @@ static uint16_t read_word(GMouse* m, uint8_t reg) {
i2cMasterTransmitTimeout(&I2CD1, STMPE610_ADDR, &reg, 1, rxbuf, 2, MS2ST(STMPE610_TIMEOUT));
i2cReleaseBus(&I2CD1);
return (((uint16_t)rxbuf[0]) << 8) | rxbuf[1];
return (((gU16)rxbuf[0]) << 8) | rxbuf[1];
}
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */

26
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;