__inline becomes inline because most compilers dont like the prefix

This commit is contained in:
Joel Bodenmann 2013-03-04 23:50:21 +01:00
parent fa2f4b0f19
commit b91e619573
31 changed files with 191 additions and 191 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -76,30 +76,30 @@ uint32_t DISPLAY_CODE;
/*===========================================================================*/
/* Driver local functions. */
/*===========================================================================*/
static __inline void lld_lcdDelay(uint16_t us) {
static inline void lld_lcdDelay(uint16_t us) {
chThdSleepMicroseconds(us);
}
static __inline void lld_lcdWriteIndex(uint16_t index) {
static inline void lld_lcdWriteIndex(uint16_t index) {
gdisp_lld_write_index(index);
}
static __inline void lld_lcdWriteData(uint16_t data) {
static inline void lld_lcdWriteData(uint16_t data) {
gdisp_lld_write_data(data);
}
static __inline void lld_lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
static inline void lld_lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
gdisp_lld_write_index(lcdReg);
gdisp_lld_write_data(lcdRegValue);
}
static __inline uint16_t lld_lcdReadData(void) {
static inline uint16_t lld_lcdReadData(void) {
/* fix this! */
//return gdisp_lld_read_data;
return GDISP_RAM;
}
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
static inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
volatile uint16_t dummy;
gdisp_lld_write_index(lcdReg);
@ -109,30 +109,30 @@ static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
return lld_lcdReadData();
}
static __inline void lld_lcdWriteStreamStart(void) {
static inline void lld_lcdWriteStreamStart(void) {
lld_lcdWriteIndex(0x0022);
}
static __inline void lld_lcdWriteStreamStop(void) {
static inline void lld_lcdWriteStreamStop(void) {
}
static __inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
static inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
uint16_t i;
for(i = 0; i < size; i++)
lld_lcdWriteData(buffer[i]);
}
static __inline void lld_lcdReadStreamStart(void) {
static inline void lld_lcdReadStreamStart(void) {
lld_lcdWriteIndex(0x0022);
}
static __inline void lld_lcdReadStreamStop(void) {
static inline void lld_lcdReadStreamStop(void) {
}
static __inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
static inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
uint16_t i;
volatile uint16_t dummy;
@ -293,7 +293,7 @@ static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy)
lld_lcdSetCursor(x, y);
}
static __inline void lld_lcdResetViewPort(void) {
static inline void lld_lcdResetViewPort(void) {
switch(GDISP.Orientation) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:

View File

@ -29,28 +29,28 @@
#ifndef GDISP_LLD_BOARD_H
#define GDISP_LLD_BOARD_H
static __inline void gdisp_lld_init_board(void) {
static inline void gdisp_lld_init_board(void) {
#error "ILI9320: You must implement the init_board routine for your board"
}
static __inline void gdisp_lld_reset_pin(bool_t state) {
static inline void gdisp_lld_reset_pin(bool_t state) {
#error "ILI9320: You must implement setpin_reset routine for your board"
}
static __inline void gdisp_lld_write_index(uint16_t data) {
static inline void gdisp_lld_write_index(uint16_t data) {
#error "ILI9320: You must implement write_index routine for your board"
}
static __inline void gdisp_lld_write_data(uint16_t data) {
static inline void gdisp_lld_write_data(uint16_t data) {
#error "ILI9320: You must implement write_data routine for your board"
}
static __inline uint16_t gdisp_lld_read_data(void) {
static inline uint16_t gdisp_lld_read_data(void) {
#error "ILI9320: You must implement read_data routine for your board"
}
/* if not available, just ignore the argument and return */
static __inline uint16_t gdisp_lld_backlight(uint8_t percentage) {
static inline uint16_t gdisp_lld_backlight(uint8_t percentage) {
#error "ILI9320: You must implement set_backlight routine for your board"
}

View File

@ -32,7 +32,7 @@
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60100000)) /* RS = 1 */
static __inline void gdisp_lld_init_board(void) {
static inline void gdisp_lld_init_board(void) {
/* FSMC setup for F1 */
rccEnableAHB(RCC_AHBENR_FSMCEN, 0);
@ -54,26 +54,26 @@ static __inline void gdisp_lld_init_board(void) {
FSMC_Bank1->BTCR[FSMC_Bank] = FSMC_BCR1_MWID_0 | FSMC_BCR1_WREN | FSMC_BCR1_MBKEN;
}
static __inline void gdisp_lld_reset_pin(bool_t state) {
static inline void gdisp_lld_reset_pin(bool_t state) {
if(state)
palClearPad(GPIOE, GPIOE_TFT_RST);
else
palSetPad(GPIOE, GPIOE_TFT_RST);
}
static __inline void gdisp_lld_write_index(uint16_t reg) {
static inline void gdisp_lld_write_index(uint16_t reg) {
GDISP_REG = reg;
}
static __inline void gdisp_lld_write_data(uint16_t data) {
static inline void gdisp_lld_write_data(uint16_t data) {
GDISP_RAM = data;
}
static __inline uint16_t gdisp_lld_read_data(void) {
static inline uint16_t gdisp_lld_read_data(void) {
return GDISP_RAM;
}
static __inline void gdisp_lld_backlight(uint8_t percent) {
static inline void gdisp_lld_backlight(uint8_t percent) {
if(percent == 100)
palClearPad(GPIOD, GPIOD_TFT_LIGHT);
else

View File

@ -76,30 +76,30 @@ uint32_t DISPLAY_CODE;
/*===========================================================================*/
/* Driver local functions. */
/*===========================================================================*/
static __inline void lld_lcdDelay(uint16_t us) {
static inline void lld_lcdDelay(uint16_t us) {
chThdSleepMicroseconds(us);
}
static __inline void lld_lcdWriteIndex(uint16_t index) {
static inline void lld_lcdWriteIndex(uint16_t index) {
gdisp_lld_write_index(index);
}
static __inline void lld_lcdWriteData(uint16_t data) {
static inline void lld_lcdWriteData(uint16_t data) {
gdisp_lld_write_data(data);
}
static __inline void lld_lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
static inline void lld_lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
gdisp_lld_write_index(lcdReg);
gdisp_lld_write_data(lcdRegValue);
}
static __inline uint16_t lld_lcdReadData(void) {
static inline uint16_t lld_lcdReadData(void) {
/* fix this! */
//return gdisp_lld_read_data;
return GDISP_RAM;
}
static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
static inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
volatile uint16_t dummy;
gdisp_lld_write_index(lcdReg);
@ -109,30 +109,30 @@ static __inline uint16_t lld_lcdReadReg(uint16_t lcdReg) {
return lld_lcdReadData();
}
static __inline void lld_lcdWriteStreamStart(void) {
static inline void lld_lcdWriteStreamStart(void) {
lld_lcdWriteIndex(0x0022);
}
static __inline void lld_lcdWriteStreamStop(void) {
static inline void lld_lcdWriteStreamStop(void) {
}
static __inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
static inline void lld_lcdWriteStream(uint16_t *buffer, uint16_t size) {
uint16_t i;
for(i = 0; i < size; i++)
lld_lcdWriteData(buffer[i]);
}
static __inline void lld_lcdReadStreamStart(void) {
static inline void lld_lcdReadStreamStart(void) {
lld_lcdWriteIndex(0x0022);
}
static __inline void lld_lcdReadStreamStop(void) {
static inline void lld_lcdReadStreamStop(void) {
}
static __inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
static inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
uint16_t i;
volatile uint16_t dummy;
@ -289,7 +289,7 @@ static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy)
lld_lcdSetCursor(x, y);
}
static __inline void lld_lcdResetViewPort(void) {
static inline void lld_lcdResetViewPort(void) {
switch(GDISP.Orientation) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:

View File

@ -29,28 +29,28 @@
#ifndef GDISP_LLD_BOARD_H
#define GDISP_LLD_BOARD_H
static __inline void gdisp_lld_init_board(void) {
static inline void gdisp_lld_init_board(void) {
#error "ILI9325: You must implement the init_board routine for your board"
}
static __inline void gdisp_lld_reset_pin(bool_t state) {
static inline void gdisp_lld_reset_pin(bool_t state) {
#error "ILI9325: You must implement setpin_reset routine for your board"
}
static __inline void gdisp_lld_write_index(uint16_t data) {
static inline void gdisp_lld_write_index(uint16_t data) {
#error "ILI9325: You must implement write_index routine for your board"
}
static __inline void gdisp_lld_write_data(uint16_t data) {
static inline void gdisp_lld_write_data(uint16_t data) {
#error "ILI9325: You must implement write_data routine for your board"
}
static __inline uint16_t gdisp_lld_read_data(void) {
static inline uint16_t gdisp_lld_read_data(void) {
#error "ILI9325: You must implement read_data routine for your board"
}
/* if not available, just ignore the argument and return */
static __inline uint16_t gdisp_lld_backlight(uint8_t percentage) {
static inline uint16_t gdisp_lld_backlight(uint8_t percentage) {
#error "ILI9325: You must implement set_backlight routine for your board"
}

View File

@ -45,7 +45,7 @@
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
static __inline void gdisp_lld_init_board(void) {
static inline void gdisp_lld_init_board(void) {
/* FSMC setup for F1 */
rccEnableAHB(RCC_AHBENR_FSMCEN, 0);
@ -68,26 +68,26 @@ static __inline void gdisp_lld_init_board(void) {
}
static __inline void gdisp_lld_reset_pin(bool_t state) {
static inline void gdisp_lld_reset_pin(bool_t state) {
if(state)
palClearPad(GPIOE, GPIOE_TFT_RST);
else
palSetPad(GPIOE, GPIOE_TFT_RST);
}
static __inline void gdisp_lld_write_index(uint16_t reg) {
static inline void gdisp_lld_write_index(uint16_t reg) {
GDISP_REG = reg;
}
static __inline void gdisp_lld_write_data(uint16_t data) {
static inline void gdisp_lld_write_data(uint16_t data) {
GDISP_RAM = data;
}
static __inline uint16_t gdisp_lld_read_data(void) {
static inline uint16_t gdisp_lld_read_data(void) {
return GDISP_RAM;
}
static __inline void gdisp_lld_backlight(uint8_t percent) {
static inline void gdisp_lld_backlight(uint8_t percent) {
percent=percent; // avoid a warning
}

View File

@ -89,7 +89,7 @@
// A very common thing to do.
// An inline function has been used here incase the parameters have side effects with the internal calculations.
static __inline void setviewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
static inline void setviewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
write_cmd2(CASET, x, x+cx-1); // Column address set
write_cmd2(PASET, y, y+cy-1); // Page address set
}

View File

@ -39,7 +39,7 @@
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
/* Code here */
#error "gdispNokia6610GE12: You must supply a definition for init_board for your board"
}
@ -51,7 +51,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
/* Code here */
#error "gdispNokia6610GE12: You must supply a definition for setpin_reset for your board"
}
@ -66,7 +66,7 @@ static __inline void setpin_reset(bool_t state) {
*
* @notapi
*/
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
/* Code here */
#error "gdispNokia6610GE12: You must supply a definition for set_backlight for your board"
}
@ -76,7 +76,7 @@ static __inline void set_backlight(uint8_t percent) {
*
* @notapi
*/
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
/* Code here */
#error "gdispNokia6610GE12: You must supply a definition for acquire_bus for your board"
}
@ -86,7 +86,7 @@ static __inline void acquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
/* Code here */
#error "gdispNokia6610GE12: You must supply a definition for release_bus for your board"
}
@ -98,7 +98,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline void write_cmd(uint16_t cmd) {
static inline void write_cmd(uint16_t cmd) {
/* Code here */
#error "gdispNokia6610GE12: You must supply a definition for write_cmd for your board"
}
@ -110,7 +110,7 @@ static __inline void write_cmd(uint16_t cmd) {
*
* @notapi
*/
static __inline void write_data(uint16_t data) {
static inline void write_data(uint16_t data) {
/* Code here */
#error "gdispNokia6610GE12: You must supply a definition for write_data for your board"
}
@ -125,7 +125,7 @@ static __inline void write_data(uint16_t data) {
*
* @notapi
*/
static __inline uint16_t read_data(void) {
static inline uint16_t read_data(void) {
/* Code here */
#error "gdispNokia6610GE12: You must supply a definition for read_data for your board"
}

View File

@ -48,7 +48,7 @@ volatile AT91PS_PDC pPDC = AT91C_BASE_PDC_SPI0;
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
// *********************************************************************************************
// InitSpi( )
//
@ -108,7 +108,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
if (state)
palClearPad(IOPORT1, PIOA_LCD_RESET);
else
@ -125,7 +125,7 @@ static __inline void setpin_reset(bool_t state) {
*
* @notapi
*/
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
if (percent)
palSetPad(IOPORT2, PIOB_LCD_BL);
else
@ -137,7 +137,7 @@ static __inline void set_backlight(uint8_t percent) {
*
* @notapi
*/
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
/* Nothing to do for this board as the LCD is the only device on the SPI port */
}
@ -146,7 +146,7 @@ static __inline void acquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
// Nothing to do for this board as the LCD is the only device on the SPI port
}
@ -157,7 +157,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline void write_cmd(uint16_t cmd) {
static inline void write_cmd(uint16_t cmd) {
// wait for the previous transfer to complete
while((pSPI->SPI_SR & AT91C_SPI_TXEMPTY) == 0);
// send the command
@ -171,7 +171,7 @@ static __inline void write_cmd(uint16_t cmd) {
*
* @notapi
*/
static __inline void write_data(uint16_t data) {
static inline void write_data(uint16_t data) {
// wait for the previous transfer to complete
while((pSPI->SPI_SR & AT91C_SPI_TXEMPTY) == 0);
// send the data
@ -186,7 +186,7 @@ static __inline void write_data(uint16_t data) {
*
* @notapi
*/
static __inline uint16_t read_data(void) {
static inline uint16_t read_data(void) {
#error "gdispNokia6610GE12: GDISP_HARDWARE_READPIXEL and GDISP_HARDWARE_SCROLL are not supported on this board"
return 0;
}

View File

@ -88,7 +88,7 @@
// A very common thing to do.
// An inline function has been used here incase the parameters have side effects with the internal calculations.
static __inline void setviewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
static inline void setviewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
write_cmd2(CASET, x, x+cx-1); // Column address set
write_cmd2(PASET, y, y+cy-1); // Page address set
}

View File

@ -39,7 +39,7 @@
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
/* Code here */
#error "gdispNokia6610GE8: You must supply a definition for init_board for your board"
}
@ -51,7 +51,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
/* Code here */
#error "gdispNokia6610GE8: You must supply a definition for setpin_reset for your board"
}
@ -66,7 +66,7 @@ static __inline void setpin_reset(bool_t state) {
*
* @notapi
*/
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
/* Code here */
#error "gdispNokia6610GE8: You must supply a definition for set_backlight for your board"
}
@ -76,7 +76,7 @@ static __inline void set_backlight(uint8_t percent) {
*
* @notapi
*/
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
/* Code here */
#error "gdispNokia6610GE8: You must supply a definition for acquire_bus for your board"
}
@ -86,7 +86,7 @@ static __inline void acquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
/* Code here */
#error "gdispNokia6610GE8: You must supply a definition for release_bus for your board"
}
@ -98,7 +98,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline void write_cmd(uint16_t cmd) {
static inline void write_cmd(uint16_t cmd) {
/* Code here */
#error "gdispNokia6610GE8: You must supply a definition for write_cmd for your board"
}
@ -110,7 +110,7 @@ static __inline void write_cmd(uint16_t cmd) {
*
* @notapi
*/
static __inline void write_data(uint16_t data) {
static inline void write_data(uint16_t data) {
/* Code here */
#error "gdispNokia6610GE8: You must supply a definition for write_data for your board"
}
@ -125,7 +125,7 @@ static __inline void write_data(uint16_t data) {
*
* @notapi
*/
static __inline uint16_t read_data(void) {
static inline uint16_t read_data(void) {
/* Code here */
#error "gdispNokia6610GE8: You must supply a definition for read_data for your board"
}

View File

@ -68,7 +68,7 @@ static bool_t pwmRunning = FALSE;
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
// *********************************************************************************************
// InitSpi( )
//
@ -132,7 +132,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
if (state)
palClearPad(IOPORT1, PIOA_LCD_RESET);
else
@ -149,7 +149,7 @@ static __inline void setpin_reset(bool_t state) {
*
* @notapi
*/
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
if (percent == 100) {
/* Turn the pin on - No PWM */
if (pwmRunning) {
@ -179,7 +179,7 @@ static __inline void set_backlight(uint8_t percent) {
*
* @notapi
*/
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
/* Nothing to do for this board as the LCD is the only device on the SPI port */
}
@ -188,7 +188,7 @@ static __inline void acquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
// Nothing to do for this board as the LCD is the only device on the SPI port
}
@ -199,7 +199,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline void write_cmd(uint16_t cmd) {
static inline void write_cmd(uint16_t cmd) {
// wait for the previous transfer to complete
while((pSPI->SPI_SR & AT91C_SPI_TXEMPTY) == 0);
// send the command
@ -213,7 +213,7 @@ static __inline void write_cmd(uint16_t cmd) {
*
* @notapi
*/
static __inline void write_data(uint16_t data) {
static inline void write_data(uint16_t data) {
// wait for the previous transfer to complete
while((pSPI->SPI_SR & AT91C_SPI_TXEMPTY) == 0);
// send the data
@ -228,7 +228,7 @@ static __inline void write_data(uint16_t data) {
*
* @notapi
*/
static __inline uint16_t read_data(void) {
static inline uint16_t read_data(void) {
#error "gdispNokia6610GE8: GDISP_HARDWARE_READPIXEL and GDISP_HARDWARE_SCROLL are not supported on this board"
return 0;
}

View File

@ -74,7 +74,7 @@
#define delay(us) chThdSleepMicroseconds(us)
#define delayms(ms) chThdSleepMilliseconds(ms)
static __inline void set_cursor(coord_t x, coord_t y) {
static inline void set_cursor(coord_t x, coord_t y) {
/* R20h - 8 bit
* R21h - 9 bit
*/
@ -99,7 +99,7 @@ static __inline void set_cursor(coord_t x, coord_t y) {
}
}
static __inline void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
static inline void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
/* HSA / HEA are 8 bit
* VSA / VEA are 9 bit
* use masks 0x00FF and 0x01FF to enforce this
@ -137,7 +137,7 @@ static __inline void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy)
set_cursor(x, y);
}
static __inline void reset_viewport(void) {
static inline void reset_viewport(void) {
switch(GDISP.Orientation) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:

View File

@ -34,7 +34,7 @@
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
/* Code here */
#error "SSD1289: You must supply a definition for init_board for your board"
}
@ -46,7 +46,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
/* Code here */
#error "SSD1289: You must supply a definition for setpin_reset for your board"
}
@ -58,7 +58,7 @@ static __inline void setpin_reset(bool_t state) {
*
* @notapi
*/
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
/* Code here */
#error "SSD1289: You must supply a definition for set_backlight for your board"
}
@ -68,7 +68,7 @@ static __inline void set_backlight(uint8_t percent) {
*
* @notapi
*/
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
#error "SSD1289: You must supply a definition for acquire_bus for your board"
}
@ -77,7 +77,7 @@ static __inline void acquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
#error "SSD1289: You must supply a definition for release_bus for your board"
}
@ -88,7 +88,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline void write_index(uint16_t index) {
static inline void write_index(uint16_t index) {
/* Code here */
#error "SSD1289: You must supply a definition for write_index for your board"
}
@ -100,7 +100,7 @@ static __inline void write_index(uint16_t index) {
*
* @notapi
*/
static __inline void write_data(uint16_t data) {
static inline void write_data(uint16_t data) {
/* Code here */
#error "SSD1289: You must supply a definition for write_data for your board"
}
@ -115,7 +115,7 @@ static __inline void write_data(uint16_t data) {
*
* @notapi
*/
static __inline uint16_t read_data(void) {
static inline uint16_t read_data(void) {
/* Code here */
#error "SSD1289: You must supply a definition for read_data for your board"
}

View File

@ -32,7 +32,7 @@
#define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */
static __inline void init_board(void) {
static inline void init_board(void) {
int FSMC_Bank = 0;
/* STM32F4 FSMC init */
@ -55,36 +55,36 @@ static __inline void init_board(void) {
FSMC_Bank1->BTCR[FSMC_Bank] = FSMC_BCR1_MWID_0 | FSMC_BCR1_WREN | FSMC_BCR1_MBKEN;
}
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
(void)state;
/* Nothing to do here */
}
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
(void)percent;
/* Nothing to do here */
}
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
/* Nothing to do here */
}
static __inline void release_bus(void) {
static inline void release_bus(void) {
/* Nothing to do here */
}
static __inline void write_index(uint16_t index) {
static inline void write_index(uint16_t index) {
GDISP_REG = index;
}
static __inline void write_data(uint16_t data) {
static inline void write_data(uint16_t data) {
GDISP_RAM = data;
}
#if GDISP_HARDWARE_READPIXEL || GDISP_HARDWARE_SCROLL || defined(__DOXYGEN__)
static __inline uint16_t read_data(void) {
static inline uint16_t read_data(void) {
return GDISP_RAM;
}
#endif

View File

@ -70,7 +70,7 @@
#define delay(us) chThdSleepMicroseconds(us)
#define delayms(ms) chThdSleepMilliseconds(ms)
static __inline void set_cursor(coord_t x, coord_t y) {
static inline void set_cursor(coord_t x, coord_t y) {
/* Reg 0x004E is an 8 bit value
* Reg 0x004F is 9 bit
* Use a bit mask to make sure they are not set too high
@ -134,7 +134,7 @@ static void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
set_cursor(x, y);
}
static __inline void reset_viewport(void) {
static inline void reset_viewport(void) {
set_viewport(0, 0, GDISP.Width, GDISP.Height);
}

View File

@ -34,7 +34,7 @@
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
/* Code here */
#error "SSD1289: You must supply a definition for init_board for your board"
}
@ -46,7 +46,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
/* Code here */
#error "SSD1289: You must supply a definition for setpin_reset for your board"
}
@ -58,7 +58,7 @@ static __inline void setpin_reset(bool_t state) {
*
* @notapi
*/
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
/* Code here */
#error "SSD1289: You must supply a definition for set_backlight for your board"
}
@ -68,7 +68,7 @@ static __inline void set_backlight(uint8_t percent) {
*
* @notapi
*/
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
#error "SSD1289: You must supply a definition for acquire_bus for your board"
}
@ -77,7 +77,7 @@ static __inline void acquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
#error "SSD1289: You must supply a definition for release_bus for your board"
}
@ -88,7 +88,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline void write_index(uint16_t index) {
static inline void write_index(uint16_t index) {
/* Code here */
#error "SSD1289: You must supply a definition for write_index for your board"
}
@ -100,7 +100,7 @@ static __inline void write_index(uint16_t index) {
*
* @notapi
*/
static __inline void write_data(uint16_t data) {
static inline void write_data(uint16_t data) {
/* Code here */
#error "SSD1289: You must supply a definition for write_data for your board"
}
@ -115,7 +115,7 @@ static __inline void write_data(uint16_t data) {
*
* @notapi
*/
static __inline uint16_t read_data(void) {
static inline uint16_t read_data(void) {
/* Code here */
#error "SSD1289: You must supply a definition for read_data for your board"
}

View File

@ -42,7 +42,7 @@
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
const unsigned char FSMC_Bank;
#if defined(STM32F1XX) || defined(STM32F3XX)
@ -94,7 +94,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
(void) state;
/* Nothing to do here */
}
@ -106,7 +106,7 @@ static __inline void setpin_reset(bool_t state) {
*
* @notapi
*/
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
(void) percent;
/* Nothing to do here */
}
@ -116,7 +116,7 @@ static __inline void set_backlight(uint8_t percent) {
*
* @notapi
*/
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
/* Nothing to do here */
}
@ -125,7 +125,7 @@ static __inline void acquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
/* Nothing to do here */
}
@ -136,7 +136,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline void write_index(uint16_t index) { GDISP_REG = index; }
static inline void write_index(uint16_t index) { GDISP_REG = index; }
/**
* @brief Send data to the lcd.
@ -145,7 +145,7 @@ static __inline void write_index(uint16_t index) { GDISP_REG = index; }
*
* @notapi
*/
static __inline void write_data(uint16_t data) { GDISP_RAM = data; }
static inline void write_data(uint16_t data) { GDISP_RAM = data; }
#if GDISP_HARDWARE_READPIXEL || GDISP_HARDWARE_SCROLL || defined(__DOXYGEN__)
/**
@ -157,7 +157,7 @@ static __inline void write_data(uint16_t data) { GDISP_RAM = data; }
*
* @notapi
*/
static __inline uint16_t read_data(void) { return GDISP_RAM; }
static inline uint16_t read_data(void) { return GDISP_RAM; }
#endif
#endif /* _GDISP_LLD_BOARD_H */

View File

@ -44,7 +44,7 @@
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
palSetGroupMode(GPIOE, PAL_WHOLE_PORT, 0, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, 12, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, 13, PAL_MODE_OUTPUT_PUSHPULL);
@ -66,7 +66,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
(void) state;
/* Nothing to do here - reset pin tied to Vcc */
}
@ -78,7 +78,7 @@ static __inline void setpin_reset(bool_t state) {
*
* @notapi
*/
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
(void) percent;
/* Nothing to do here - Backlight always on */
}
@ -88,7 +88,7 @@ static __inline void set_backlight(uint8_t percent) {
*
* @notapi
*/
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
/* Nothing to do here since LCD is the only device on that bus */
}
@ -97,7 +97,7 @@ static __inline void acquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
/* Nothing to do here since LCD is the only device on that bus */
}
@ -108,7 +108,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline void write_index(uint16_t index) {
static inline void write_index(uint16_t index) {
palWritePort(GPIOE, index);
CLR_RS; CLR_WR; SET_WR; SET_RS;
}
@ -120,7 +120,7 @@ static __inline void write_index(uint16_t index) {
*
* @notapi
*/
static __inline void write_data(uint16_t data) {
static inline void write_data(uint16_t data) {
palWritePort(GPIOE, data);
CLR_WR; SET_WR;
}
@ -135,7 +135,7 @@ static __inline void write_data(uint16_t data) {
*
* @notapi
*/
static __inline uint16_t read_data(void) {
static inline uint16_t read_data(void) {
uint16_t value;
// change pin mode to digital input

View File

@ -64,43 +64,43 @@
#if defined(GDISP_USE_FSMC)
__inline void GDISP_LLD(writeindex)(uint8_t cmd) {
inline void GDISP_LLD(writeindex)(uint8_t cmd) {
GDISP_REG = cmd;
}
__inline void GDISP_LLD(writereg)(uint16_t lcdReg,uint16_t lcdRegValue) {
inline void GDISP_LLD(writereg)(uint16_t lcdReg,uint16_t lcdRegValue) {
GDISP_REG = lcdReg;
GDISP_RAM = lcdRegValue;
}
__inline void GDISP_LLD(writedata)(uint16_t data) {
inline void GDISP_LLD(writedata)(uint16_t data) {
GDISP_RAM = data;
}
__inline uint16_t GDISP_LLD(readdata)(void) {
inline uint16_t GDISP_LLD(readdata)(void) {
return (GDISP_RAM);
}
__inline uint8_t GDISP_LLD(readreg)(uint8_t lcdReg) {
inline uint8_t GDISP_LLD(readreg)(uint8_t lcdReg) {
GDISP_REG = lcdReg;
return (GDISP_RAM);
}
__inline void GDISP_LLD(writestreamstart)(void) {
inline void GDISP_LLD(writestreamstart)(void) {
GDISP_LLD(writeindex)(SSD1963_WRITE_MEMORY_START);
}
__inline void GDISP_LLD(readstreamstart)(void) {
inline void GDISP_LLD(readstreamstart)(void) {
GDISP_LLD(writeindex)(SSD1963_READ_MEMORY_START);
}
__inline void GDISP_LLD(writestream)(uint16_t *buffer, uint16_t size) {
inline void GDISP_LLD(writestream)(uint16_t *buffer, uint16_t size) {
uint16_t i;
for(i = 0; i < size; i++)
GDISP_RAM = buffer[i];
}
__inline void GDISP_LLD(readstream)(uint16_t *buffer, size_t size) {
inline void GDISP_LLD(readstream)(uint16_t *buffer, size_t size) {
uint16_t i;
for(i = 0; i < size; i++) {
@ -110,33 +110,33 @@ __inline void GDISP_LLD(readstream)(uint16_t *buffer, size_t size) {
#elif defined(GDISP_USE_GPIO)
__inline void GDISP_LLD(writeindex)(uint8_t cmd) {
inline void GDISP_LLD(writeindex)(uint8_t cmd) {
Set_CS; Set_RS; Set_WR; Clr_RD;
palWritePort(GDISP_DATA_PORT, cmd);
Clr_CS;
}
__inline void GDISP_LLD(writereg)(uint16_t lcdReg,uint16_t lcdRegValue) {
inline void GDISP_LLD(writereg)(uint16_t lcdReg,uint16_t lcdRegValue) {
Set_CS; Set_RS; Set_WR; Clr_RD;
palWritePort(GDISP_DATA_PORT, lcdReg);
Clr_RS;
palWritePort(GDISP_DATA_PORT, lcdRegValue);
Clr_CS;
}
__inline void GDISP_LLD(writedata)(uint16_t data) {
inline void GDISP_LLD(writedata)(uint16_t data) {
Set_CS; Clr_RS; Set_WR; Clr_RD;
palWritePort(GDISP_DATA_PORT, data);
Clr_CS;
}
__inline uint16_t GDISP_LLD(readdata)(void) {
inline uint16_t GDISP_LLD(readdata)(void) {
Set_CS; Clr_RS; Clr_WR; Set_RD;
uint16_t data = palReadPort(GDISP_DATA_PORT);
Clr_CS;
return data;
}
__inline uint8_t GDISP_LLD(readreg)(uint8_t lcdReg) {
inline uint8_t GDISP_LLD(readreg)(uint8_t lcdReg) {
Set_CS; Set_RS; Clr_WR; Set_RD;
palWritePort(GDISP_DATA_PORT, lcdReg);
Clr_RS;
@ -145,15 +145,15 @@ __inline uint8_t GDISP_LLD(readreg)(uint8_t lcdReg) {
return data;
}
__inline void GDISP_LLD(writestreamstart)(void) {
inline void GDISP_LLD(writestreamstart)(void) {
GDISP_LLD(writeindex)(SSD1963_WRITE_MEMORY_START);
}
__inline void GDISP_LLD(readstreamstart)(void) {
inline void GDISP_LLD(readstreamstart)(void) {
GDISP_LLD(writeindex)(SSD1963_READ_MEMORY_START);
}
__inline void GDISP_LLD(writestream)(uint16_t *buffer, uint16_t size) {
inline void GDISP_LLD(writestream)(uint16_t *buffer, uint16_t size) {
uint16_t i;
Set_CS; Clr_RS; Set_WR; Clr_RD;
for(i = 0; i < size; i++) {
@ -164,7 +164,7 @@ __inline void GDISP_LLD(writestream)(uint16_t *buffer, uint16_t size) {
Clr_CS;
}
__inline void GDISP_LLD(readstream)(uint16_t *buffer, size_t size) {
inline void GDISP_LLD(readstream)(uint16_t *buffer, size_t size) {
uint16_t i;
Set_CS; Clr_RS; Clr_WR; Set_RD;
for(i = 0; i < size; i++) {

View File

@ -72,7 +72,7 @@
#define delay(us) chThdSleepMicroseconds(us)
#define delayms(ms) chThdSleepMilliseconds(ms)
static __inline void set_cursor(coord_t x, coord_t y) {
static inline void set_cursor(coord_t x, coord_t y) {
/* Reg SSD2119_REG_X_RAM_ADDR is 9 bit value
* Reg SSD2119_REG_Y_RAM_ADDR is an 8 bit
* Use a bit mask to make sure they are not set too high
@ -136,7 +136,7 @@ static void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
set_cursor(x, y);
}
static __inline void reset_viewport(void) {
static inline void reset_viewport(void) {
set_viewport(0, 0, GDISP.Width, GDISP.Height);
}

View File

@ -56,7 +56,7 @@ static const PWMConfig pwmcfg = {
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
unsigned char FSMC_Bank;
/* STM32F4 FSMC init */
@ -98,7 +98,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline void setpin_reset(bool_t state) {
static inline void setpin_reset(bool_t state) {
if (state) {
CLR_RST;
} else {
@ -113,7 +113,7 @@ static __inline void setpin_reset(bool_t state) {
*
* @notapi
*/
static __inline void set_backlight(uint8_t percent) {
static inline void set_backlight(uint8_t percent) {
pwmEnableChannel(&PWMD4, 1, percent);
}
@ -123,7 +123,7 @@ static __inline void set_backlight(uint8_t percent) {
*
* @notapi
*/
static __inline void acquire_bus(void) {
static inline void acquire_bus(void) {
/* Nothing to do here since LCD is the only device on that bus */
}
@ -133,7 +133,7 @@ static __inline void acquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
/* Nothing to do here since LCD is the only device on that bus */
}
@ -144,7 +144,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline void write_index(uint16_t index) {
static inline void write_index(uint16_t index) {
GDISP_REG = index;
}
@ -155,7 +155,7 @@ static __inline void write_index(uint16_t index) {
*
* @notapi
*/
static __inline void write_data(uint16_t data) {
static inline void write_data(uint16_t data) {
GDISP_RAM = data;
}
@ -169,7 +169,7 @@ static __inline void write_data(uint16_t data) {
*
* @notapi
*/
static __inline uint16_t read_data(void) {
static inline uint16_t read_data(void) {
return GDISP_RAM;
}
#endif

View File

@ -35,7 +35,7 @@
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
/* Code here */
#error "ginputADS7843: You must supply a definition for init_board for your board"
}
@ -46,7 +46,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline bool_t getpin_pressed(void) {
static inline bool_t getpin_pressed(void) {
/* Code here */
#error "ginputADS7843: You must supply a definition for getpin_pressed for your board"
}
@ -56,7 +56,7 @@ static __inline bool_t getpin_pressed(void) {
*
* @notapi
*/
static __inline void aquire_bus(void) {
static inline void aquire_bus(void) {
/* Code here */
#error "ginputADS7843: You must supply a definition for aquire_bus for your board"
}
@ -66,7 +66,7 @@ static __inline void aquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
/* Code here */
#error "ginputADS7843: You must supply a definition for release_bus for your board"
}
@ -79,7 +79,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline uint16_t read_value(uint16_t port) {
static inline uint16_t read_value(uint16_t port) {
/* Code here */
#error "ginputADS7843: You must supply a definition for read_value for your board"
}

View File

@ -42,7 +42,7 @@ static const SPIConfig spicfg = {
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
spiStart(&SPID1, &spicfg);
}
@ -52,7 +52,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline bool_t getpin_pressed(void) {
static inline bool_t getpin_pressed(void) {
return (!palReadPad(GPIOC, 4));
}
/**
@ -60,7 +60,7 @@ static __inline bool_t getpin_pressed(void) {
*
* @notapi
*/
static __inline void aquire_bus(void) {
static inline void aquire_bus(void) {
spiAcquireBus(&SPID1);
//TOUCHSCREEN_SPI_PROLOGUE();
palClearPad(GPIOC, 6);
@ -71,7 +71,7 @@ static __inline void aquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
palSetPad(GPIOC, 6);
spiReleaseBus(&SPID1);
//TOUCHSCREEN_SPI_EPILOGUE();
@ -85,7 +85,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline uint16_t read_value(uint16_t port) {
static inline uint16_t read_value(uint16_t port) {
static uint8_t txbuf[3] = {0};
static uint8_t rxbuf[3] = {0};
uint16_t ret;

View File

@ -42,7 +42,7 @@ static const SPIConfig spicfg = {
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
spiStart(&SPID2, &spicfg);
}
@ -52,7 +52,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline bool_t getpin_pressed(void) {
static inline bool_t getpin_pressed(void) {
return (!palReadPad(GPIOG, 0));
}
/**
@ -60,7 +60,7 @@ static __inline bool_t getpin_pressed(void) {
*
* @notapi
*/
static __inline void aquire_bus(void) {
static inline void aquire_bus(void) {
spiAcquireBus(&SPID2);
//TOUCHSCREEN_SPI_PROLOGUE();
palClearPad(GPIOG, 10);
@ -71,7 +71,7 @@ static __inline void aquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
palSetPad(GPIOG, 10);
spiReleaseBus(&SPID2);
//TOUCHSCREEN_SPI_EPILOGUE();
@ -85,7 +85,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline uint16_t read_value(uint16_t port) {
static inline uint16_t read_value(uint16_t port) {
static uint8_t txbuf[3] = {0};
static uint8_t rxbuf[3] = {0};
uint16_t ret;

View File

@ -36,7 +36,7 @@
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
/* Code here */
#error "ginputMCU: You must supply a definition for init_board for your board"
}
@ -47,7 +47,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline bool_t getpin_pressed(void) {
static inline bool_t getpin_pressed(void) {
/* Code here */
#error "ginputMCU: You must supply a definition for getpin_pressed for your board"
}
@ -57,7 +57,7 @@ static __inline bool_t getpin_pressed(void) {
*
* @notapi
*/
static __inline void aquire_bus(void) {
static inline void aquire_bus(void) {
/* Code here */
#error "ginputMCU: You must supply a definition for aquire_bus for your board"
}
@ -67,7 +67,7 @@ static __inline void aquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
/* Code here */
#error "ginputMCU: You must supply a definition for release_bus for your board"
}
@ -78,7 +78,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline uint16_t read_x_value(void) {
static inline uint16_t read_x_value(void) {
/* Code here */
#error "ginputMCU: You must supply a definition for read_x_value for your board"
}
@ -89,7 +89,7 @@ static __inline uint16_t read_x_value(void) {
*
* @notapi
*/
static __inline uint16_t read_y_value(void) {
static inline uint16_t read_y_value(void) {
/* Code here */
#error "ginputMCU: You must supply a definition for read_y_value for your board"
}

View File

@ -63,7 +63,7 @@ static const ADCConversionGroup adc_x_config = {
*
* @notapi
*/
static __inline void init_board(void) {
static inline void init_board(void) {
adcStart(&ADCD1, NULL);
}
@ -73,7 +73,7 @@ static __inline void init_board(void) {
*
* @notapi
*/
static __inline bool_t getpin_pressed(void) {
static inline bool_t getpin_pressed(void) {
palSetPadMode(GPIOC, 0, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOC, 1, PAL_MODE_INPUT);
palSetPadMode(GPIOC, 2, PAL_MODE_INPUT);
@ -88,7 +88,7 @@ static __inline bool_t getpin_pressed(void) {
*
* @notapi
*/
static __inline void aquire_bus(void) {
static inline void aquire_bus(void) {
}
@ -97,7 +97,7 @@ static __inline void aquire_bus(void) {
*
* @notapi
*/
static __inline void release_bus(void) {
static inline void release_bus(void) {
}
@ -107,7 +107,7 @@ static __inline void release_bus(void) {
*
* @notapi
*/
static __inline uint16_t read_x_value(void) {
static inline uint16_t read_x_value(void) {
uint16_t val1, val2;
adcsample_t samples[ADC_NUM_CHANNELS * ADC_BUF_DEPTH];
@ -137,7 +137,7 @@ static __inline uint16_t read_x_value(void) {
*
* @notapi
*/
static __inline uint16_t read_y_value(void) {
static inline uint16_t read_y_value(void) {
uint16_t val1, val2;
adcsample_t samples[ADC_NUM_CHANNELS * ADC_BUF_DEPTH];

View File

@ -99,7 +99,7 @@ static struct lsdev {
static struct lsdev *curlsdev;
/* Find the next conversion to activate */
static __inline void FindNextConversionI(void) {
static inline void FindNextConversionI(void) {
if (curlsdev) {
/**
* Now we have done a low speed conversion - start looking for the next conversion
@ -251,14 +251,14 @@ void GADC_ISR_ErrorI(ADCDriver *adcp, adcerror_t err) {
FindNextConversionI();
}
static __inline void DoInit(void) {
static inline void DoInit(void) {
if (!(gflags & GADC_GFLG_INITDONE)) {
gflags |= GADC_GFLG_INITDONE;
gadc_lld_init();
}
}
static __inline void StartADC(bool_t onNoHS) {
static inline void StartADC(bool_t onNoHS) {
chSysLock();
if (!(gflags & GADC_GFLG_ISACTIVE) || (onNoHS && !curlsdev))
FindNextConversionI();

View File

@ -88,7 +88,7 @@ static struct MouseConfig_t {
} MouseConfig;
#if GINPUT_MOUSE_NEED_CALIBRATION
static __inline void _tsDrawCross(const MousePoint *pp) {
static inline void _tsDrawCross(const MousePoint *pp) {
gdispDrawLine(pp->x-15, pp->y, pp->x-2, pp->y, White);
gdispDrawLine(pp->x+2, pp->y, pp->x+15, pp->y, White);
gdispDrawLine(pp->x, pp->y-15, pp->x, pp->y-2, White);
@ -107,16 +107,16 @@ static struct MouseConfig_t {
gdispDrawLine(pp->x+15, pp->y-15, pp->x+15, pp->y-7, RGB2COLOR(184,158,131));
}
static __inline void _tsClearCross(const MousePoint *pp) {
static inline void _tsClearCross(const MousePoint *pp) {
gdispFillArea(pp->x - 15, pp->y - 15, 42, 42, Blue);
}
static __inline void _tsTransform(MouseReading *pt, const Calibration *c) {
static inline void _tsTransform(MouseReading *pt, const Calibration *c) {
pt->x = (coord_t) (c->ax * pt->x + c->bx * pt->y + c->cx);
pt->y = (coord_t) (c->ay * pt->x + c->by * pt->y + c->cy);
}
static __inline void _tsDo3PointCalibration(const MousePoint *cross, const MousePoint *points, Calibration *c) {
static inline void _tsDo3PointCalibration(const MousePoint *cross, const MousePoint *points, Calibration *c) {
float dx, dx0, dx1, dx2, dy0, dy1, dy2;
/* Compute all the required determinants */