Browse Source

Replace all inline definitions with GFXINLINE

remotes/origin_old/ugfx_release_2.6
inmarket 7 years ago
parent
commit
48a9d334b7
  1. 24
      boards/addons/gdisp/board_ED060SC4_example.h
  2. 22
      boards/addons/gdisp/board_HX8347D_stm32f4discovery.h
  3. 10
      boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h
  4. 22
      boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h
  5. 24
      boards/addons/gdisp/board_ILI9341_spi.h
  6. 22
      boards/addons/gdisp/board_ILI9481_firebullstm32f103.h
  7. 20
      boards/addons/gdisp/board_S6D1121_olimex_e407.h
  8. 20
      boards/addons/gdisp/board_SPFD54124B_stm32f3.h
  9. 26
      boards/addons/gdisp/board_SSD1289_stm32f4discovery.h
  10. 14
      boards/addons/gdisp/board_SSD1306_i2c.h
  11. 14
      boards/addons/gdisp/board_SSD1306_spi.h
  12. 14
      boards/addons/gdisp/board_SSD1306_spi2.h
  13. 14
      boards/addons/gdisp/board_SSD1963_fsmc.h
  14. 14
      boards/addons/gdisp/board_SSD1963_gpio.h
  15. 8
      boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h
  16. 8
      boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h
  17. 26
      boards/base/Embest-STM32-DMSTF4BB/board_SSD2119.h
  18. 4
      boards/base/Embest-STM32-DMSTF4BB/gmouse_lld_STMPE811_board.h
  19. 22
      boards/base/FireBull-STM32F103-FB/board_SSD1289.h
  20. 8
      boards/base/FireBull-STM32F103-FB/gmouse_lld_ADS7843_board.h
  21. 26
      boards/base/HY-MiniSTM32V/board_SSD1289.h
  22. 8
      boards/base/HY-MiniSTM32V/gmouse_lld_ADS7843_board.h
  23. 20
      boards/base/Marlin/board_RA8875.h
  24. 4
      boards/base/Marlin/gmouse_lld_FT5x06_board.h
  25. 20
      boards/base/Mikromedia-Plus-STM32-M4/board_SSD1963.h
  26. 10
      boards/base/Mikromedia-Plus-STM32-M4/gaudio_play_board.h
  27. 4
      boards/base/Mikromedia-Plus-STM32-M4/gmouse_lld_STMPE610_board.h
  28. 24
      boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h
  29. 10
      boards/base/Mikromedia-STM32-M4-ILI9341/gaudio_play_board.h
  30. 16
      boards/base/Olimex-SAM7EX256-GE12/board_Nokia6610GE12.h
  31. 16
      boards/base/Olimex-SAM7EX256-GE8/board_Nokia6610GE8.h
  32. 16
      boards/base/Olimex-SAM7EX256-GE8/board_SSD1306_i2c.h
  33. 16
      boards/base/Olimex-SAM7EX256-GE8/board_SSD1306_spi.h
  34. 16
      boards/base/Olimex-SAM7EX256-GE8/board_SSD1331.h
  35. 16
      boards/base/Olimex-SAM7EX256-GE8/board_TLS8204.h
  36. 22
      boards/base/Olimex-STM32-LCD/board_ILI9320.h
  37. 2
      boards/base/Olimex-STM32-LCD/gmouse_lld_MCU_board.h
  38. 4
      boards/base/RaspberryPi/FreeRTOS/mmio.h
  39. 14
      boards/base/STM32F429i-Discovery/board_STM32F429iDiscovery.h
  40. 4
      boards/base/STM32F429i-Discovery/gmouse_lld_STMPE811_board.h
  41. 71
      boards/base/STM32F746-Discovery/board_STM32LTDC.h
  42. 4
      boards/base/STM32F746-Discovery/gmouse_lld_FT5336_board.h
  43. 4
      boards/base/STM32F746-Discovery/stm32f746g_discovery_sdram.c
  44. 22
      boards/base/STM32F746-Discovery/stm32f746g_raw32_ugfx.c
  45. 26
      demos/applications/tetris/Example_Makefiles/stm32f4/board_SSD1289.h
  46. 10
      demos/applications/tetris/Example_Makefiles/stm32f4/ginput_lld_mouse_board.h
  47. 8
      demos/applications/tetris/Example_Makefiles/stm32f4/gmouse_lld_ADS7843_board.h
  48. 8
      demos/applications/tetris/Example_Makefiles/stm32f4/gmouse_lld_ADS7843_board.h.old
  49. 26
      demos/applications/tetris/Example_Makefiles/stm32f4_chibios_3.x/board_SSD1289.h
  50. 10
      demos/applications/tetris/Example_Makefiles/stm32f4_chibios_3.x/ginput_lld_mouse_board.h
  51. 8
      demos/applications/tetris/Example_Makefiles/stm32f4_chibios_3.x/gmouse_lld_ADS7843_board.h
  52. 2
      docs/releases.txt
  53. 2
      drivers/gaudio/vs1053/gaudio_play_lld.c
  54. 24
      drivers/gdisp/ED060SC4/board_ED060SC4_template.h
  55. 2
      drivers/gdisp/ED060SC4/gdisp_lld_ED060SC4.c
  56. 24
      drivers/gdisp/ED060SC4/gdisp_lld_board_example.h
  57. 24
      drivers/gdisp/ED060SC4/gdisp_lld_board_template.h
  58. 22
      drivers/gdisp/HX8347D/board_HX8347D_template.h
  59. 2
      drivers/gdisp/HX8347D/gdisp_lld_HX8347D.c
  60. 22
      drivers/gdisp/ILI9320/board_ILI9320_template.h
  61. 22
      drivers/gdisp/ILI9325/board_ILI9325_template.h
  62. 22
      drivers/gdisp/ILI9341/board_ILI9341_template.h
  63. 22
      drivers/gdisp/ILI93xx/board_ILI93xx_template.h
  64. 2
      drivers/gdisp/ILI93xx/gdisp_lld_ILI93xx.c
  65. 22
      drivers/gdisp/ILI9481/board_ILI9481_template.h
  66. 22
      drivers/gdisp/LGDP4532/board_LGDP4532_template.h
  67. 16
      drivers/gdisp/Nokia6610GE12/board_Nokia6610GE12_template.h
  68. 2
      drivers/gdisp/Nokia6610GE12/gdisp_lld_Nokia6610GE12.c
  69. 16
      drivers/gdisp/Nokia6610GE8/board_Nokia6610GE8_template.h
  70. 4
      drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c
  71. 16
      drivers/gdisp/PCD8544/board_PCD8544_template.h
  72. 14
      drivers/gdisp/PCF8812/board_PCF8812_template.h
  73. 22
      drivers/gdisp/R61505U/board_R61505U_template.h
  74. 20
      drivers/gdisp/RA8875/board_RA8875_template.h
  75. 6
      drivers/gdisp/RA8875/gdisp_lld_RA8875.c
  76. 22
      drivers/gdisp/S6D1121/board_S6D1121_template.h
  77. 4
      drivers/gdisp/S6D1121/gdisp_lld_S6D1121.c
  78. 16
      drivers/gdisp/SPFD54124B/board_SPFD54124B_template.h
  79. 2
      drivers/gdisp/SPFD54124B/gdisp_lld_SPFD54124B.c
  80. 26
      drivers/gdisp/SSD1289/board_SSD1289_template.h
  81. 14
      drivers/gdisp/SSD1306/board_SSD1306_template.h
  82. 14
      drivers/gdisp/SSD1331/board_SSD1331_template.h
  83. 22
      drivers/gdisp/SSD1351/board_SSD1351_template.h
  84. 14
      drivers/gdisp/SSD1963/board_SSD1963_template.h
  85. 4
      drivers/gdisp/SSD1963/gdisp_lld_SSD1963.c
  86. 26
      drivers/gdisp/SSD2119/board_SSD2119_template.h
  87. 14
      drivers/gdisp/ST7565/board_ST7565_template.h
  88. 14
      drivers/gdisp/STM32F429iDiscovery/board_STM32F429iDiscovery_template.h
  89. 6
      drivers/gdisp/STM32LTDC/board_STM32LTDC_template.h
  90. 16
      drivers/gdisp/TLS8204/board_TLS8204_template.h
  91. 8
      drivers/ginput/touch/ADS7843/gmouse_lld_ADS7843_board_template.h
  92. 4
      drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06_board_template.h
  93. 12
      drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802_board_template.h
  94. 4
      drivers/ginput/touch/STMPE610/gmouse_lld_STMPE610_board_template.h
  95. 4
      drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811_board_template.h
  96. 22
      gfx.h
  97. 1
      gfxconf.example.h
  98. 8
      src/gdisp/gdisp.c
  99. 8
      src/ginput/ginput_mouse.c

24
boards/addons/gdisp/board_ED060SC4_example.h

@ -45,7 +45,7 @@
#define GPIOC_VPOS_CTRL 14
#define GPIOC_VNEG_CTRL 15
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -76,68 +76,68 @@ static void eink_delay(int us) {
}
/* Turn the E-ink panel Vdd supply (+3.3V) on or off. */
static inline void setpower_vdd(GDisplay *g, bool_t on) {
static GFXINLINE void setpower_vdd(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOB, GPIOB_SMPS_CTRL, !on);
palWritePad(GPIOA, GPIOA_EINK_VDD, on);
}
/* Turn the E-ink panel negative supplies (-15V, -20V) on or off. */
static inline void setpower_vneg(GDisplay *g, bool_t on) {
static GFXINLINE void setpower_vneg(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOA, GPIOA_VNEG_CTRL, on);
}
/* Turn the E-ink panel positive supplies (-15V, -20V) on or off. */
static inline void setpower_vpos(GDisplay *g, bool_t on) {
static GFXINLINE void setpower_vpos(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOA, GPIOA_VPOS_CTRL, on);
}
/* Set the state of the LE (source driver Latch Enable) pin. */
static inline void setpin_le(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_le(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_LE, on);
}
/* Set the state of the OE (source driver Output Enable) pin. */
static inline void setpin_oe(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_oe(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_OE, on);
}
/* Set the state of the CL (source driver Clock) pin. */
static inline void setpin_cl(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_cl(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_CL, on);
}
/* Set the state of the SPH (source driver Start Pulse Horizontal) pin. */
static inline void setpin_sph(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_sph(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_SPH, on);
}
/* Set the state of the D0-D7 (source driver Data) pins. */
static inline void setpins_data(GDisplay *g, uint8_t value) {
static GFXINLINE void setpins_data(GDisplay *g, uint8_t value) {
(void) g;
palWriteGroup(GPIOB, 0xFF, GPIOB_EINK_D0, value);
}
/* Set the state of the CKV (gate driver Clock Vertical) pin. */
static inline void setpin_ckv(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_ckv(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_CKV, on);
}
/* Set the state of the GMODE (gate driver Gate Mode) pin. */
static inline void setpin_gmode(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_gmode(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOC, GPIOC_EINK_GMODE, on);
}
/* Set the state of the SPV (gate driver Start Pulse Vertical) pin. */
static inline void setpin_spv(GDisplay *g, bool_t on) {
static GFXINLINE void setpin_spv(GDisplay *g, bool_t on) {
(void) g;
palWritePad(GPIOB, GPIOB_EINK_SPV, on);
}

22
boards/addons/gdisp/board_HX8347D_stm32f4discovery.h

@ -67,7 +67,7 @@ static const SPIConfig spi1cfg_16bit = {
SPI_CR1_DFF //SPI_CR1_BR_0
};
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -99,11 +99,11 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
if (state) {
CLR_RST;
@ -112,35 +112,35 @@ static inline void setpin_reset(GDisplay *g, bool_t state) {
}
}
static inline void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
pwmEnableChannel(&PWMD4, 1, percent);
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
spiAcquireBus(&SPID1);
while(((SPI1->SR & SPI_SR_TXE) == 0) || ((SPI1->SR & SPI_SR_BSY) != 0)); // Safety
CLR_CS;
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
SET_CS;
spiReleaseBus(&SPID1);
}
static inline void busmode16(GDisplay *g) {
static GFXINLINE void busmode16(GDisplay *g) {
(void) g;
spiStart(&SPID1, &spi1cfg_16bit);
}
static inline void busmode8(GDisplay *g) {
static GFXINLINE void busmode8(GDisplay *g) {
(void) g;
spiStart(&SPID1, &spi1cfg_8bit);
}
static inline void write_index(GDisplay *g, uint8_t index) {
static GFXINLINE void write_index(GDisplay *g, uint8_t index) {
(void) g;
CLR_DATA;
SPI1->DR = index;
@ -148,13 +148,13 @@ static inline void write_index(GDisplay *g, uint8_t index) {
SET_DATA;
}
static inline void write_data(GDisplay *g, uint8_t data) {
static GFXINLINE void write_data(GDisplay *g, uint8_t data) {
(void) g;
SPI1->DR = data;
while(((SPI1->SR & SPI_SR_TXE) == 0) || ((SPI1->SR & SPI_SR_BSY) != 0));
}
static inline void write_ram16(GDisplay *g, uint16_t data) {
static GFXINLINE void write_ram16(GDisplay *g, uint16_t data) {
(void) g;
SPI1->DR = data;
while((SPI1->SR & SPI_SR_TXE) == 0);

10
boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h

@ -64,7 +64,7 @@ static void init_board(GDisplay *g) {
#define PmpWaitBusy() do {} while (PMMODEbits.BUSY)
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
@ -84,11 +84,11 @@ static void set_backlight(GDisplay *g, uint8_t percent) {
palSetPad(IOPORTD, 3);
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
@ -112,11 +112,11 @@ static noinline void write_data(GDisplay *g, uint16_t data) {
PmpWaitBusy();
}
static inline void setreadmode(GDisplay *g) {
static GFXINLINE void setreadmode(GDisplay *g) {
(void) g;
}
static inline void setwritemode(GDisplay *g) {
static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}

22
boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h

@ -34,7 +34,7 @@
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -64,11 +64,11 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
if(state)
palClearPad(GPIOE, GPIOE_TFT_RST);
@ -76,38 +76,38 @@ static inline void setpin_reset(GDisplay *g, bool_t state) {
palSetPad(GPIOE, GPIOE_TFT_RST);
}
static inline void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
(void)percent;
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
static inline void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;
GDISP_REG = index;
}
static inline void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;
GDISP_RAM = data;
}
static inline void setreadmode(GDisplay *g) {
static GFXINLINE void setreadmode(GDisplay *g) {
(void) g;
}
static inline void setwritemode(GDisplay *g) {
static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
static inline uint16_t read_data(GDisplay *g) {
static GFXINLINE uint16_t read_data(GDisplay *g) {
(void) g;
return GDISP_RAM;
}

24
boards/addons/gdisp/board_ILI9341_spi.h

@ -55,7 +55,7 @@ static void send_data(uint16_t data);
*
* @notapi
*/
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -75,7 +75,7 @@ static inline void init_board(GDisplay *g) {
*
* @notapi
*/
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
@ -87,7 +87,7 @@ static inline void post_init_board(GDisplay *g) {
*
* @notapi
*/
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
if (state == TRUE) {
@ -105,7 +105,7 @@ static inline void setpin_reset(GDisplay *g, bool_t state) {
*
* @notapi
*/
static inline void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
(void) percent;
}
@ -117,7 +117,7 @@ static inline void set_backlight(GDisplay *g, uint8_t percent) {
*
* @notapi
*/
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
}
@ -128,7 +128,7 @@ static inline void acquire_bus(GDisplay *g) {
*
* @notapi
*/
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
@ -139,7 +139,7 @@ static inline void release_bus(GDisplay *g) {
*
* @notapi
*/
static inline void send_data(uint16_t data) {
static GFXINLINE void send_data(uint16_t 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 inline void send_data(uint16_t data) {
*
* @notapi
*/
static inline void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;
while (SPI2->SR & SPI_SR_BSY);
@ -177,7 +177,7 @@ static inline void write_index(GDisplay *g, uint16_t index) {
*
* @notapi
*/
static inline void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;
send_data(data);
@ -190,7 +190,7 @@ static inline void write_data(GDisplay *g, uint16_t data) {
*
* @notapi
*/
static inline void setreadmode(GDisplay *g) {
static GFXINLINE void setreadmode(GDisplay *g) {
(void) g;
}
@ -201,7 +201,7 @@ static inline void setreadmode(GDisplay *g) {
*
* @notapi
*/
static inline void setwritemode(GDisplay *g) {
static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
@ -213,7 +213,7 @@ static inline void setwritemode(GDisplay *g) {
*
* @notapi
*/
static inline uint16_t read_data(GDisplay *g) {
static GFXINLINE uint16_t read_data(GDisplay *g) {
(void) g;
return 0;
}

22
boards/addons/gdisp/board_ILI9481_firebullstm32f103.h

@ -27,7 +27,7 @@
#define SET_RD palSetPad(GPIOD, 15);
#define CLR_RD palClearPad(GPIOD, 15);
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -49,53 +49,53 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
(void) state;
}
static inline void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
(void) percent;
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
static inline void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;
palWritePort(GPIOE, index);
CLR_RS; CLR_WR; SET_WR; SET_RS;
}
static inline void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;
palWritePort(GPIOE, data);
CLR_WR; SET_WR;
}
static inline void setreadmode(GDisplay *g) {
static GFXINLINE void setreadmode(GDisplay *g) {
(void) g;
// change pin mode to digital input
palSetGroupMode(GPIOE, PAL_WHOLE_PORT, 0, PAL_MODE_INPUT);
}
static inline void setwritemode(GDisplay *g) {
static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
// change pin mode back to digital output
palSetGroupMode(GPIOE, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
}
static inline uint16_t read_data(GDisplay *g) {
static GFXINLINE uint16_t read_data(GDisplay *g) {
uint16_t value;
(void) g;

20
boards/addons/gdisp/board_S6D1121_olimex_e407.h

@ -21,7 +21,7 @@
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -50,43 +50,43 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
(void) state;
}
static inline void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
(void) percent;
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
static inline void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;
GDISP_REG = index;
}
static inline void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;
GDISP_RAM = data;
}
static inline void setreadmode(GDisplay *g) {
static GFXINLINE void setreadmode(GDisplay *g) {
(void) g;
}
static inline void setwritemode(GDisplay *g) {
static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
static inline uint16_t read_data(GDisplay *g) {
static GFXINLINE uint16_t read_data(GDisplay *g) {
(void) g;
return GDISP_RAM;
}

20
boards/addons/gdisp/board_SPFD54124B_stm32f3.h

@ -53,12 +53,12 @@ static const SPIConfig hs_spicfg = {
#endif
#if USE_SOFT_SPI
static inline void soft_spi_sck(void){
static GFXINLINE void soft_spi_sck(void){
palSetPad(SPFD54124B_SPI_PORT, SPFD54124B_SPI_SCK);
palClearPad(SPFD54124B_SPI_PORT, SPFD54124B_SPI_SCK);
}
static inline void soft_spi_write_9bit(uint16_t data){
static GFXINLINE void soft_spi_write_9bit(uint16_t data){
uint8_t i;
@ -81,7 +81,7 @@ static inline void soft_spi_write_9bit(uint16_t data){
}
#endif
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
if(state) {
CLR_RST;
@ -90,7 +90,7 @@ static inline void setpin_reset(GDisplay *g, bool_t state) {
}
}
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -127,7 +127,7 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
#if USE_HARD_SPI
#if GFX_USE_OS_CHIBIOS
@ -138,7 +138,7 @@ static inline void acquire_bus(GDisplay *g) {
#endif
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
#if USE_HARD_SPI
#if GFX_USE_OS_CHIBIOS
@ -148,7 +148,7 @@ static inline void release_bus(GDisplay *g) {
#endif
}
static inline void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;
uint16_t b;
@ -176,7 +176,7 @@ static inline void write_data(GDisplay *g, uint16_t data) {
}
static inline void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;
#if USE_HARD_SPI
@ -191,11 +191,11 @@ static inline void write_index(GDisplay *g, uint16_t index) {
#endif
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
(void) percent;
}

26
boards/addons/gdisp/board_SSD1289_stm32f4discovery.h

@ -38,7 +38,7 @@ static const PWMConfig pwmcfg = {
0
};
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -101,55 +101,55 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
(void) state;
}
static inline void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
pwmEnableChannel(&PWMD3, 2, percent);
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
static inline void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;
GDISP_REG = index;
}
static inline void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;
GDISP_RAM = data;
}
static inline void setreadmode(GDisplay *g) {
static GFXINLINE void setreadmode(GDisplay *g) {
(void) g;
FSMC_Bank1->BTCR[FSMC_BANK+1] = FSMC_BTR1_ADDSET_3 | FSMC_BTR1_DATAST_3 | FSMC_BTR1_BUSTURN_0; /* FSMC timing */
}
static inline void setwritemode(GDisplay *g) {
static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
FSMC_Bank1->BTCR[FSMC_BANK+1] = FSMC_BTR1_ADDSET_0 | FSMC_BTR1_DATAST_2 | FSMC_BTR1_BUSTURN_0; /* FSMC timing */
}
static inline uint16_t read_data(GDisplay *g) {
static GFXINLINE uint16_t read_data(GDisplay *g) {
(void) g;
return GDISP_RAM;
}
#if defined(GDISP_USE_DMA) || defined(__DOXYGEN__)
static inline void dma_with_noinc(GDisplay *g, color_t *buffer, int area) {
static GFXINLINE void dma_with_noinc(GDisplay *g, color_t *buffer, int area) {
(void) g;
dmaStreamSetPeripheral(GDISP_DMA_STREAM, buffer);
dmaStreamSetMode(GDISP_DMA_STREAM, STM32_DMA_CR_PL(0) | STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD | STM32_DMA_CR_DIR_M2M);
@ -160,7 +160,7 @@ static inline uint16_t read_data(GDisplay *g) {
}
}
static inline void dma_with_inc(GDisplay *g, color_t *buffer, int area) {
static GFXINLINE void dma_with_inc(GDisplay *g, color_t *buffer, int area) {
(void) g;
dmaStreamSetPeripheral(GDISP_DMA_STREAM, buffer);
dmaStreamSetMode(GDISP_DMA_STREAM, STM32_DMA_CR_PL(0) | STM32_DMA_CR_PINC | STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD | STM32_DMA_CR_DIR_M2M);

14
boards/addons/gdisp/board_SSD1306_i2c.h

@ -49,7 +49,7 @@ static I2CConfig i2cconfig;
static int32_t thdPriority = 0;
#endif
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -78,11 +78,11 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
if(state)
CLR_RST
@ -90,7 +90,7 @@ static inline void setpin_reset(GDisplay *g, bool_t state) {
SET_RST
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
#if GFX_USE_OS_CHIBIOS
thdPriority = (int32_t)chThdGetPriority();
@ -99,7 +99,7 @@ static inline void acquire_bus(GDisplay *g) {
i2cAcquireBus(&I2CD1);
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
#if GFX_USE_OS_CHIBIOS
chThdSetPriority(thdPriority);
@ -107,7 +107,7 @@ static inline void release_bus(GDisplay *g) {
i2cReleaseBus(&I2CD1);
}
static inline void write_cmd(GDisplay *g, uint8_t cmd) {
static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
uint8_t command[2];
(void) g;
@ -119,7 +119,7 @@ static inline void write_cmd(GDisplay *g, uint8_t cmd) {
i2cStop(&I2CD1);
}
static inline void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
(void) g;
i2cStart(&I2CD1, &i2cconfig);

14
boards/addons/gdisp/board_SSD1306_spi.h

@ -52,7 +52,7 @@ static const SPIConfig spi1config = {
static int32_t thdPriority = 0;
#endif
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
unsigned i;
// As we are not using multiple displays we set g->board to NULL as we don't use it.
@ -78,11 +78,11 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
if(state)
CLR_RST
@ -90,7 +90,7 @@ static inline void setpin_reset(GDisplay *g, bool_t state) {
SET_RST
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
#if GFX_USE_OS_CHIBIOS
thdPriority = (int32_t)chThdGetPriority();
@ -99,7 +99,7 @@ static inline void acquire_bus(GDisplay *g) {
spiAcquireBus(&SPID1);
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
#if GFX_USE_OS_CHIBIOS
chThdSetPriority(thdPriority);
@ -107,7 +107,7 @@ static inline void release_bus(GDisplay *g) {
spiReleaseBus(&SPID1);
}
static inline void write_cmd(GDisplay *g, uint8_t cmd) {
static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
uint8_t command[2];
(void) g;
@ -121,7 +121,7 @@ static inline void write_cmd(GDisplay *g, uint8_t cmd) {
spiStop(&SPID1);
}
static inline void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
(void) g;
spiStart(&SPID1, &spi1config);

14
boards/addons/gdisp/board_SSD1306_spi2.h

@ -33,7 +33,7 @@
static SPIConfig spi_cfg = { NULL, CS_PORT, CS_PAD, 0 };
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
(void) g;
g->board = 0;
// Maximum speed of SSD1306 is 10Mhz, so set SPI speed less or = to that.
@ -73,31 +73,31 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
palWritePad(RESET_PORT, RESET_PAD, !state);
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
spiAcquireBus(SPI_DRIVER);
spiStart(SPI_DRIVER, &spi_cfg);
spiSelect(SPI_DRIVER);
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
spiUnselect(SPI_DRIVER);
spiStop(SPI_DRIVER);
spiReleaseBus(SPI_DRIVER);
}
static inline void write_cmd(GDisplay *g, uint8_t cmd) {
static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) {
(void) g;
static uint8_t buf;
palClearPad(DNC_PORT, DNC_PAD);
@ -105,7 +105,7 @@ static inline void write_cmd(GDisplay *g, uint8_t cmd) {
spiSend(SPI_DRIVER, 1, &buf);
}
static inline void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
(void) g;
palSetPad(DNC_PORT, DNC_PAD);
spiSend(SPI_DRIVER, length, data);

14
boards/addons/gdisp/board_SSD1963_fsmc.h

@ -35,7 +35,7 @@ static const LCD_Parameters DisplayTimings[] = {
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -74,32 +74,32 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
/* FSMC delay reduced as the controller now runs at full speed */
FSMC_Bank1->BTCR[0+1] = FSMC_BTR1_ADDSET_0 | FSMC_BTR1_DATAST_2 | FSMC_BTR1_BUSTURN_0 ;
FSMC_Bank1->BTCR[0] = FSMC_BCR1_MWID_0 | FSMC_BCR1_WREN | FSMC_BCR1_MBKEN;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
(void) state;
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
static inline void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;
GDISP_REG = index;
}
static inline void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;
GDISP_RAM = data;
}

14
boards/addons/gdisp/board_SSD1963_gpio.h

@ -53,7 +53,7 @@ static const LCD_Parameters DisplayTimings[] = {
#define Set_RD palSetPad(GDISP_CMD_PORT, GDISP_RD);
#define Clr_RD palClearPad(GDISP_CMD_PORT, GDISP_RD);
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -68,33 +68,33 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
(void) state;
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
Set_CS;
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
Clr_CS;
}
static inline void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;
Set_RS; Clr_RD; Set_WR;
palWritePort(GDISP_DATA_PORT, index);
Clr_WR;
}
static inline void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;
Clr_RS; Clr_RD; Set_WR;
palWritePort(GDISP_DATA_PORT, data);

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

@ -44,13 +44,13 @@ static bool_t init_board(GMouse* m, unsigned driverinstance) {
return TRUE;
}
static inline bool_t getpin_pressed(GMouse* m) {
static GFXINLINE bool_t getpin_pressed(GMouse* m) {
(void) m;
return (!palReadPad(GPIOG, 0));
}
static inline void aquire_bus(GMouse* m) {
static GFXINLINE void aquire_bus(GMouse* m) {
(void) m;
spiAcquireBus(&SPID2);
@ -58,7 +58,7 @@ static inline void aquire_bus(GMouse* m) {
palClearPad(GPIOG, 10);
}
static inline void release_bus(GMouse* m) {
static GFXINLINE void release_bus(GMouse* m) {
(void) m;
palSetPad(GPIOG, 10);
@ -66,7 +66,7 @@ static inline void release_bus(GMouse* m) {
//TOUCHSCREEN_SPI_EPILOGUE();
}
static inline uint16_t read_value(GMouse* m, uint16_t port) {
static GFXINLINE uint16_t read_value(GMouse* m, uint16_t port) {
static uint8_t txbuf[3] = {0};
static uint8_t rxbuf[3] = {0};
(void) m;

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

@ -60,27 +60,27 @@ static bool_t init_board(GMouse* m, unsigned driverinstance) {
return TRUE;
}
static inline bool_t getpin_pressed(GMouse* m) {
static GFXINLINE bool_t getpin_pressed(GMouse* m) {
(void) m;
return (!palReadPad(GPIOC, 5));
}
static inline void aquire_bus(GMouse* m) {
static GFXINLINE void aquire_bus(GMouse* m) {
(void) m;
spiAcquireBus(&SPID2);
palClearPad(GPIOC, 4);
}
static inline void release_bus(GMouse* m) {
static GFXINLINE void release_bus(GMouse* m) {
(void) m;
palSetPad(GPIOC, 4);
spiReleaseBus(&SPID2);
}
static inline uint16_t read_value(GMouse* m, uint16_t port) {
static GFXINLINE uint16_t read_value(GMouse* m, uint16_t port) {
static uint8_t txbuf[3] = {0};
static uint8_t rxbuf[3] = {0};
(void) m;

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

@ -42,7 +42,7 @@ static const PWMConfig pwmcfg = {
0
};
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {
// As we are not using multiple displays we set g->board to NULL as we don't use it.
g->board = 0;
@ -95,11 +95,11 @@ static inline void init_board(GDisplay *g) {
}
}
static inline void post_init_board(GDisplay *g) {
static GFXINLINE void post_init_board(GDisplay *g) {
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state) {
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
(void) g;
if (state) {
CLR_RST;
@ -108,44 +108,44 @@ static inline void setpin_reset(GDisplay *g, bool_t state) {
}
}
static inline void set_backlight(GDisplay *g, uint8_t percent) {
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
(void) g;
pwmEnableChannel(&PWMD4, 1, percent);
}
static inline void acquire_bus(GDisplay *g) {
static GFXINLINE void acquire_bus(GDisplay *g) {
(void) g;
}
static inline void release_bus(GDisplay *g) {
static GFXINLINE void release_bus(GDisplay *g) {
(void) g;
}
static inline void write_index(GDisplay *g, uint16_t index) {
static GFXINLINE void write_index(GDisplay *g, uint16_t index) {
(void) g;
GDISP_REG = index;
}
static inline void write_data(GDisplay *g, uint16_t data) {
static GFXINLINE void write_data(GDisplay *g, uint16_t data) {
(void) g;
GDISP_RAM = data;
}
static inline void setreadmode(GDisplay *g) {
static GFXINLINE void setreadmode(GDisplay *g) {
(void) g;
}
static inline void setwritemode(GDisplay *g) {
static GFXINLINE void setwritemode(GDisplay *g) {
(void) g;
}
static inline uint16_t read_data(GDisplay *g) {
static GFXINLINE uint16_t read_data(GDisplay *g) {
(void) g;
return GDISP_RAM;
}
#if defined(GDISP_USE_DMA)
static inline void dma_with_noinc(GDisplay *g, color_t *buffer, int area) {
static GFXINLINE void dma_with_noinc(GDisplay *g, color_t *buffer, int area) {
(void) g;
dmaStreamSetPeripheral(GDISP_DMA_STREAM, buffer);
dmaStreamSetMode(GDISP_DMA_STREAM, STM32_DMA_CR_PL(0) | STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD | STM32_DMA_CR_DIR_M2M);
@ -156,7 +156,7 @@ static inline uint16_t read_data(GDisplay *g) {
}
}
static inline void dma_with_inc(GDisplay *g, color_t *buffer, int area) {
static GFXINLINE void dma_with_inc(GDisplay *g, color_t *buffer, int area) {
(void) g;
dmaStreamSetPeripheral(GDISP_DMA_STREAM, buffer);
dmaStreamSetMode(GDISP_DMA_STREAM, STM32_DMA_CR_PL(0) | STM32_DMA_CR_PINC | STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD | STM32_DMA_CR_DIR_M2M);

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

@ -67,12 +67,12 @@ static bool_t init_board(GMouse* m, unsigned driverinstance) {
}
#endif
static inline void aquire_bus(GMouse* m) {
static GFXINLINE void aquire_bus(GMouse* m) {
(void) m;
}
static inline void release_bus(GMouse* m) {
static GFXINLINE void release_bus(GMouse* m) {
(void) m;
}

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

@ -19,7 +19,7 @@
#define SET_RD palSetPad(GPIOD, 15);
#define CLR_RD palClearPad(GPIOD, 15);
static inline void init_board(GDisplay *g)
static GFXINLINE void init_board(GDisplay *g)
{
// As we are not using multiple displays we set g->board to NULL as we don't use it.
@ -43,12 +43,12 @@ static inline void init_board(GDisplay *g)
}
}
static inline void post_init_board(GDisplay *g)
static GFXINLINE void post_init_board(GDisplay *g)
{
(void) g;
}
static inline void setpin_reset(GDisplay *g, bool_t state)
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state)
{
(void) g;
(void) state;
@ -56,7 +56,7 @@ static inline void setpin_reset(GDisplay *g, bool_t state)
/* Nothing to do here - reset pin tied to Vcc */
}
static inline void set_backlight(GDisplay *g, uint8_t percent)
static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent)
{
(void) g;
(void) percent;
@ -64,17 +64,17 @@ static inline void set_backlight(GDisplay *g, uint8_t percent)
/* Nothing to do here - Backlight always on */
}
static inline void acquire_bus(GDisplay *g)
static GFXINLINE void acquire_bus(GDisplay *g)
{
(void) g;
}
static inline void release_bus(GDisplay *g)
static GFXINLINE void release_bus(GDisplay *g)
{
(void) g;
}
static inline void write_index(GDisplay *g, uint16_t index)
static GFXINLINE void write_index(GDisplay *g, uint16_t index)
{
(void) g;
@ -85,7 +85,7 @@ static inline void write_index(GDisplay *g, uint16_t index)
SET_RS;
}
static inline void write_data(GDisplay *g, uint16_t data)
static GFXINLINE void write_data(GDisplay *g, uint16_t data)
{
(void) g;
@ -94,7 +94,7 @@ static inline void write_data(GDisplay *g, uint16_t data)
SET_WR;
}
static inline void setreadmode(GDisplay *g)
static GFXINLINE void setreadmode(GDisplay *g)
{
(void) g;
@ -103,7 +103,7 @@ static inline void setreadmode(GDisplay *g)
CLR_RD;
}
static inline void setwritemode(GDisplay *g)
static GFXINLINE void setwritemode(GDisplay *g)
{
(void) g;
@ -112,7 +112,7 @@ static inline void setwritemode(GDisplay *g)
palSetGroupMode(GPIOE, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
}
static inline uint16_t read_data(GDisplay *g) {
static GFXINLINE uint16_t read_data(GDisplay *g) {
(void) g;
return palReadPort(GPIOE);

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

@ -43,14 +43,14 @@ static bool_t init_board(GMouse* m, unsigned driverinstance)
return TRUE;
}
static inline bool_t getpin_pressed(GMouse* m)
static GFXINLINE bool_t getpin_pressed(GMouse* m)
{
(void) m;
return (!palReadPad(GPIOC, 4));
}
static inline void aquire_bus(GMouse* m)
static GFXINLINE void aquire_bus(GMouse* m)
{
(void) m;
@ -58,7 +58,7 @@ static inline void aquire_bus(GMouse* m)
palClearPad(GPIOC, 6);
}
static inline void release_bus(GMouse* m)
static GFXINLINE void release_bus(GMouse* m)
{
(void) m;
@ -66,7 +66,7 @@ static inline void release_bus(GMouse* m)
spiReleaseBus(&SPID1);
}
static inline uint16_t read_value(GMouse* m, uint16_t port)
static GFXINLINE uint16_t read_value(GMouse* m, uint16_t port)
{
static uint8_t txbuf[3] = {0};
static uint8_t rxbuf[3] = {0};

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

@ -49,7 +49,7 @@ static const PWMConfig pwmcfg =
#define GDISP_DMA_STREAM STM32_DMA1_STREAM7
#define FSMC_BANK 0
static inline void init_board(GDisplay *g) {
static GFXINLINE void init_board(GDisplay *g) {