aboutsummaryrefslogtreecommitdiffstats
path: root/boards/addons
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-12-05 21:30:34 +0100
committerJoel Bodenmann <joel@unormal.org>2013-12-05 21:30:34 +0100
commitfba19322a3351bc68171e3de80e214eb5f53c2c0 (patch)
tree338625bea95933714908bfaefdf5fde15ff17ba3 /boards/addons
parentae556531bd92abe4d70b39ab7c6d97cc610b921b (diff)
downloaduGFX-fba19322a3351bc68171e3de80e214eb5f53c2c0.tar.gz
uGFX-fba19322a3351bc68171e3de80e214eb5f53c2c0.tar.bz2
uGFX-fba19322a3351bc68171e3de80e214eb5f53c2c0.zip
whitespaces
Diffstat (limited to 'boards/addons')
-rw-r--r--boards/addons/ginput/touch/ADS7843/ginput_lld_mouse_board_st_stm32f4_discovery.h18
1 files changed, 9 insertions, 9 deletions
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 df1c02a7..919b767d 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
@@ -15,7 +15,7 @@
* MISO: GPIOB, 14
* MOSI: GPIOB, 15
* CS: GPIOC, 4
- * IRC: GPIOC, 5
+ * IRC: GPIOC, 5
*
* Note that you can tweak the SPI bus speed
*/
@@ -41,7 +41,7 @@ static inline bool_t getpin_pressed(void) {
static inline void aquire_bus(void) {
spiAcquireBus(&SPID2);
- palClearPad(GPIOC, 4);
+ palClearPad(GPIOC, 4);
}
static inline void release_bus(void) {
@@ -50,16 +50,16 @@ static inline void release_bus(void) {
}
static inline uint16_t read_value(uint16_t port) {
- static uint8_t txbuf[3] = {0};
- static uint8_t rxbuf[3] = {0};
- uint16_t ret;
+ static uint8_t txbuf[3] = {0};
+ static uint8_t rxbuf[3] = {0};
+ uint16_t ret;
- txbuf[0] = port;
+ txbuf[0] = port;
- spiExchange(&SPID2, 3, txbuf, rxbuf);
+ spiExchange(&SPID2, 3, txbuf, rxbuf);
+
+ ret = (rxbuf[1] << 5) | (rxbuf[2] >> 3);
- ret = (rxbuf[1] << 5) | (rxbuf[2] >> 3);
-
return ret;
}