aboutsummaryrefslogtreecommitdiffstats
path: root/boards/addons/ginput/touch/ADS7843
diff options
context:
space:
mode:
Diffstat (limited to 'boards/addons/ginput/touch/ADS7843')
-rw-r--r--boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h8
-rw-r--r--boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h8
-rw-r--r--boards/addons/ginput/touch/ADS7843/stm32f4cube_hal.h8
3 files changed, 12 insertions, 12 deletions
diff --git a/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h b/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h
index d641f56c..0013c9c6 100644
--- a/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h
+++ b/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_olimex_stm32_e407.h
@@ -66,14 +66,14 @@ static GFXINLINE void release_bus(GMouse* m) {
//TOUCHSCREEN_SPI_EPILOGUE();
}
-static GFXINLINE uint16_t read_value(GMouse* m, uint16_t port) {
- static uint8_t txbuf[3] = {0};
- static uint8_t rxbuf[3] = {0};
+static GFXINLINE gU16 read_value(GMouse* m, gU16 port) {
+ static gU8 txbuf[3] = {0};
+ static gU8 rxbuf[3] = {0};
(void) m;
txbuf[0] = port;
spiExchange(&SPID2, 3, txbuf, rxbuf);
- return ((uint16_t)rxbuf[1] << 5) | (rxbuf[2] >> 3);
+ return ((gU16)rxbuf[1] << 5) | (rxbuf[2] >> 3);
}
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */
diff --git a/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h b/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h
index a11bc979..7b561c2b 100644
--- a/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h
+++ b/boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h
@@ -80,15 +80,15 @@ static GFXINLINE void release_bus(GMouse* m) {
spiReleaseBus(&SPID2);
}
-static GFXINLINE uint16_t read_value(GMouse* m, uint16_t port) {
- static uint8_t txbuf[3] = {0};
- static uint8_t rxbuf[3] = {0};
+static GFXINLINE gU16 read_value(GMouse* m, gU16 port) {
+ static gU8 txbuf[3] = {0};
+ static gU8 rxbuf[3] = {0};
(void) m;
txbuf[0] = port;
spiExchange(&SPID2, 3, txbuf, rxbuf);
- return ((uint16_t)rxbuf[1] << 5) | (rxbuf[2] >> 3);
+ return ((gU16)rxbuf[1] << 5) | (rxbuf[2] >> 3);
}
#endif /* _GINPUT_LLD_MOUSE_BOARD_H */
diff --git a/boards/addons/ginput/touch/ADS7843/stm32f4cube_hal.h b/boards/addons/ginput/touch/ADS7843/stm32f4cube_hal.h
index e34dee84..c855c7d8 100644
--- a/boards/addons/ginput/touch/ADS7843/stm32f4cube_hal.h
+++ b/boards/addons/ginput/touch/ADS7843/stm32f4cube_hal.h
@@ -123,11 +123,11 @@ static GFXINLINE void release_bus(GMouse* m)
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_SET);
}
-static GFXINLINE uint16_t read_value(GMouse* m, uint16_t reg)
+static GFXINLINE gU16 read_value(GMouse* m, gU16 reg)
{
- uint8_t txbuf[3] = {0, 0, 0};
- uint8_t rxbuf[3] = {0, 0, 0};
- uint16_t ret;
+ gU8 txbuf[3] = {0, 0, 0};
+ gU8 rxbuf[3] = {0, 0, 0};
+ gU16 ret;
(void)m;