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/base/Mikromedia-STM32-M4-ILI9341 | |
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/base/Mikromedia-STM32-M4-ILI9341')
-rw-r--r-- | boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h | 24 | ||||
-rw-r--r-- | boards/base/Mikromedia-STM32-M4-ILI9341/gaudio_play_board.h | 10 |
2 files changed, 17 insertions, 17 deletions
diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h b/boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h index b09d66c2..43d5eb20 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/board_ILI9341.h @@ -19,7 +19,7 @@ #define SET_RD palSetPad(GPIOE, GPIOE_PMRD); #define CLR_RD palClearPad(GPIOE, GPIOE_PMRD); -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; @@ -35,11 +35,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) { // reset lcd @@ -49,7 +49,7 @@ 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; // TODO: can probably pwm this if(percent) { @@ -61,11 +61,11 @@ static inline void set_backlight(GDisplay *g, uint8_t 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; } @@ -76,37 +76,37 @@ static inline void release_bus(GDisplay *g) { * * @notapi */ -static inline void ili9341_delay(uint16_t dly) { +static GFXINLINE void ili9341_delay(uint16_t dly) { static uint16_t i; for(i = 0; i < dly; i++) asm("nop"); } -static inline void write_index(GDisplay *g, uint16_t index) { +static GFXINLINE void write_index(GDisplay *g, uint16_t index) { (void) g; palWriteGroup(GPIOE, 0x00FF, 0, index); CLR_RS; CLR_WR; ili9341_delay(1); SET_WR; ili9341_delay(1); SET_RS; } -static inline void write_data(GDisplay *g, uint16_t data) { +static GFXINLINE void write_data(GDisplay *g, uint16_t data) { (void) g; palWriteGroup(GPIOE, 0x00FF, 0, data); CLR_WR; ili9341_delay(1); SET_WR; ili9341_delay(1); } -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; CLR_RD; diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/gaudio_play_board.h b/boards/base/Mikromedia-STM32-M4-ILI9341/gaudio_play_board.h index 370861ee..99e232fc 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/gaudio_play_board.h +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/gaudio_play_board.h @@ -32,7 +32,7 @@ static const SPIConfig spicfg = { }; // Initialise the board -static inline void board_init(void) { +static GFXINLINE void board_init(void) { palSetPadMode(GPIOC, GPIOC_MP3_CS, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, GPIOC_MP3_RST, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, GPIOC_MP3_DCS, PAL_MODE_OUTPUT_PUSHPULL); @@ -51,7 +51,7 @@ static inline void board_init(void) { #define board_dreq() GET_DREQ // Start a command write -static inline void board_startcmdwrite(void) { +static GFXINLINE void board_startcmdwrite(void) { #if SPI_USE_MUTUAL_EXCLUSION spiAcquireBus(SPI_PORT); #endif @@ -59,7 +59,7 @@ static inline void board_startcmdwrite(void) { } // End a command write -static inline void board_endcmdwrite(void) { +static GFXINLINE void board_endcmdwrite(void) { SET_CS; #if SPI_USE_MUTUAL_EXCLUSION spiReleaseBus(SPI_PORT); @@ -73,7 +73,7 @@ static inline void board_endcmdwrite(void) { #define board_endcmdread() board_endcmdwrite() // Start a data write -static inline void board_startdatawrite(void) { +static GFXINLINE void board_startdatawrite(void) { #if SPI_USE_MUTUAL_EXCLUSION spiAcquireBus(SPI_PORT); #endif @@ -81,7 +81,7 @@ static inline void board_startdatawrite(void) { } // End a data write -static inline void board_enddatawrite(void) { +static GFXINLINE void board_enddatawrite(void) { #if SPI_USE_MUTUAL_EXCLUSION spiReleaseBus(SPI_PORT); #endif |