diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-10-23 18:24:49 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-10-23 18:24:49 +1000 |
commit | 48a9d334b7a5b462b32c17a5fde07159deb4c280 (patch) | |
tree | 0f7032657b98730750a74ba6d09d01f2de119d4d /boards/addons/gdisp | |
parent | 17c940423ba2159b20965ea6d004386bc392aa68 (diff) | |
download | uGFX-48a9d334b7a5b462b32c17a5fde07159deb4c280.tar.gz uGFX-48a9d334b7a5b462b32c17a5fde07159deb4c280.tar.bz2 uGFX-48a9d334b7a5b462b32c17a5fde07159deb4c280.zip |
Replace all inline definitions with GFXINLINE
Diffstat (limited to 'boards/addons/gdisp')
-rw-r--r-- | boards/addons/gdisp/board_ED060SC4_example.h | 24 | ||||
-rw-r--r-- | boards/addons/gdisp/board_HX8347D_stm32f4discovery.h | 22 | ||||
-rw-r--r-- | boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h | 10 | ||||
-rw-r--r-- | boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h | 22 | ||||
-rw-r--r-- | boards/addons/gdisp/board_ILI9341_spi.h | 24 | ||||
-rw-r--r-- | boards/addons/gdisp/board_ILI9481_firebullstm32f103.h | 22 | ||||
-rw-r--r-- | boards/addons/gdisp/board_S6D1121_olimex_e407.h | 20 | ||||
-rw-r--r-- | boards/addons/gdisp/board_SPFD54124B_stm32f3.h | 20 | ||||
-rw-r--r-- | boards/addons/gdisp/board_SSD1289_stm32f4discovery.h | 26 | ||||
-rw-r--r-- | boards/addons/gdisp/board_SSD1306_i2c.h | 14 | ||||
-rw-r--r-- | boards/addons/gdisp/board_SSD1306_spi.h | 14 | ||||
-rw-r--r-- | boards/addons/gdisp/board_SSD1306_spi2.h | 14 | ||||
-rw-r--r-- | boards/addons/gdisp/board_SSD1963_fsmc.h | 14 | ||||
-rw-r--r-- | boards/addons/gdisp/board_SSD1963_gpio.h | 14 |
14 files changed, 130 insertions, 130 deletions
diff --git a/boards/addons/gdisp/board_ED060SC4_example.h b/boards/addons/gdisp/board_ED060SC4_example.h index 008e85d4..4c25ba55 100644 --- a/boards/addons/gdisp/board_ED060SC4_example.h +++ b/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); } diff --git a/boards/addons/gdisp/board_HX8347D_stm32f4discovery.h b/boards/addons/gdisp/board_HX8347D_stm32f4discovery.h index 341f4366..bece729d 100644 --- a/boards/addons/gdisp/board_HX8347D_stm32f4discovery.h +++ b/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); diff --git a/boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h b/boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h index 0e399f1f..8ae7715f 100644 --- a/boards/addons/gdisp/board_ILI9320_olimex_pic32mx_lcd.h +++ b/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; } diff --git a/boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h b/boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h index 87c4530d..51090f5d 100644 --- a/boards/addons/gdisp/board_ILI9325_hy_stm32_100p.h +++ b/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; } diff --git a/boards/addons/gdisp/board_ILI9341_spi.h b/boards/addons/gdisp/board_ILI9341_spi.h index 4b3b058d..fbb710b0 100644 --- a/boards/addons/gdisp/board_ILI9341_spi.h +++ b/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; } diff --git a/boards/addons/gdisp/board_ILI9481_firebullstm32f103.h b/boards/addons/gdisp/board_ILI9481_firebullstm32f103.h index 08cbaf3d..fb57fb62 100644 --- a/boards/addons/gdisp/board_ILI9481_firebullstm32f103.h +++ b/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; diff --git a/boards/addons/gdisp/board_S6D1121_olimex_e407.h b/boards/addons/gdisp/board_S6D1121_olimex_e407.h index 1e2b53f7..fd924e7f 100644 --- a/boards/addons/gdisp/board_S6D1121_olimex_e407.h +++ b/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; } diff --git a/boards/addons/gdisp/board_SPFD54124B_stm32f3.h b/boards/addons/gdisp/board_SPFD54124B_stm32f3.h index 765af495..df11a337 100644 --- a/boards/addons/gdisp/board_SPFD54124B_stm32f3.h +++ b/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; } diff --git a/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h b/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h index 6198b73a..33142e83 100644 --- a/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h +++ b/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); diff --git a/boards/addons/gdisp/board_SSD1306_i2c.h b/boards/addons/gdisp/board_SSD1306_i2c.h index e147a918..ee92ded6 100644 --- a/boards/addons/gdisp/board_SSD1306_i2c.h +++ b/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); diff --git a/boards/addons/gdisp/board_SSD1306_spi.h b/boards/addons/gdisp/board_SSD1306_spi.h index 56e1abae..f7b1ac6d 100644 --- a/boards/addons/gdisp/board_SSD1306_spi.h +++ b/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); diff --git a/boards/addons/gdisp/board_SSD1306_spi2.h b/boards/addons/gdisp/board_SSD1306_spi2.h index 5b647578..2bc0679f 100644 --- a/boards/addons/gdisp/board_SSD1306_spi2.h +++ b/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); diff --git a/boards/addons/gdisp/board_SSD1963_fsmc.h b/boards/addons/gdisp/board_SSD1963_fsmc.h index 55fabacc..1bccac71 100644 --- a/boards/addons/gdisp/board_SSD1963_fsmc.h +++ b/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; } diff --git a/boards/addons/gdisp/board_SSD1963_gpio.h b/boards/addons/gdisp/board_SSD1963_gpio.h index cc7d1579..e3b80917 100644 --- a/boards/addons/gdisp/board_SSD1963_gpio.h +++ b/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); |