diff options
author | Tectu <joel@unormal.org> | 2012-08-13 08:08:38 +0200 |
---|---|---|
committer | Tectu <joel@unormal.org> | 2012-08-13 08:08:38 +0200 |
commit | 46e67f657d1ac142853f3d933eb6b63239e564f8 (patch) | |
tree | 16f3a4cb7cdb7a4fd80c912ad04ec3902c641d70 /drivers/touchpad | |
parent | e78626a8bb1743e1b7c826984b07c117f5898076 (diff) | |
download | uGFX-46e67f657d1ac142853f3d933eb6b63239e564f8.tar.gz uGFX-46e67f657d1ac142853f3d933eb6b63239e564f8.tar.bz2 uGFX-46e67f657d1ac142853f3d933eb6b63239e564f8.zip |
touchpad driver fixes
Diffstat (limited to 'drivers/touchpad')
-rw-r--r-- | drivers/touchpad/touchpadADS7843/touchpad_lld.c | 10 | ||||
-rw-r--r-- | drivers/touchpad/touchpadXPT2046/touchpad_lld.c | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/touchpad/touchpadADS7843/touchpad_lld.c b/drivers/touchpad/touchpadADS7843/touchpad_lld.c index a5265995..8fc334b2 100644 --- a/drivers/touchpad/touchpadADS7843/touchpad_lld.c +++ b/drivers/touchpad/touchpadADS7843/touchpad_lld.c @@ -91,7 +91,7 @@ void tp_lld_init(TOUCHPADDriver *tp) { uint16_t tp_lld_read_x(void) {
uint8_t txbuf[1];
uint8_t rxbuf[2];
- uint16_t y;
+ uint16_t x;
txbuf[0] = 0xd0;
TP_CS_LOW;
@@ -99,14 +99,14 @@ uint16_t tp_lld_read_x(void) { spiReceive(&SPID1, 2, rxbuf);
TP_CS_HIGH;
- y = rxbuf[0] << 4;
- y |= rxbuf[1] >> 4;
+ x = rxbuf[0] << 4;
+ x |= rxbuf[1] >> 4;
- return y;
+ return x;
}
/*
- * @brief Reads out the X direction.
+ * @brief Reads out the Y direction.
*
* @notapi
*/
diff --git a/drivers/touchpad/touchpadXPT2046/touchpad_lld.c b/drivers/touchpad/touchpadXPT2046/touchpad_lld.c index 195c8aa6..24afcab4 100644 --- a/drivers/touchpad/touchpadXPT2046/touchpad_lld.c +++ b/drivers/touchpad/touchpadXPT2046/touchpad_lld.c @@ -91,7 +91,7 @@ void tp_lld_init(TOUCHPADDriver *tp) { uint16_t tp_lld_read_x(void) {
uint8_t txbuf[1];
uint8_t rxbuf[2];
- uint16_t y;
+ uint16_t x;
txbuf[0] = 0xd0;
TP_CS_LOW;
@@ -99,10 +99,10 @@ uint16_t tp_lld_read_x(void) { spiReceive(&SPID1, 2, rxbuf);
TP_CS_HIGH;
- y = rxbuf[0] << 4;
- y |= rxbuf[1] >> 4;
+ x = rxbuf[0] << 4;
+ x |= rxbuf[1] >> 4;
- return y;
+ return x;
}
/*
|