aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ginput
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-10-13 23:01:01 +0200
committerJoel Bodenmann <joel@unormal.org>2014-10-13 23:01:01 +0200
commitd6b4af4ff6685dfef62ec93042c85286ad29d81f (patch)
tree876427413bf9784bad868a03555dbe87b0068453 /drivers/ginput
parent7c9e3e5a4206a9bfee1928dbdeb3a1db92b9514b (diff)
downloaduGFX-d6b4af4ff6685dfef62ec93042c85286ad29d81f.tar.gz
uGFX-d6b4af4ff6685dfef62ec93042c85286ad29d81f.tar.bz2
uGFX-d6b4af4ff6685dfef62ec93042c85286ad29d81f.zip
Fixing STMPE811 driver
Diffstat (limited to 'drivers/ginput')
-rw-r--r--drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c b/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c
index 396e9eb0..6951f3ab 100644
--- a/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c
+++ b/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c
@@ -14,12 +14,12 @@
#define GMOUSE_STMPE811_FLG_TOUCHED (GMOUSE_FLG_DRIVER_FIRST<<0)
-// Get the hardware interface
-#include "gmouse_lld_STMPE811_board.h"
-
// Hardware definitions
#include "drivers/ginput/touch/STMPE811/stmpe811.h"
+// Get the hardware interface
+#include "gmouse_lld_STMPE811_board.h"
+
static bool_t MouseInit(GMouse* m, unsigned driverinstance) {
if (!init_board(m, driverinstance))
return FALSE;
@@ -61,7 +61,7 @@ static bool_t MouseInit(GMouse* m, unsigned driverinstance) {
return TRUE;
}
-static void MouseXYZ(GMouse* m, GMouseReading* pdr)
+static void read_xyz(GMouse* m, GMouseReading* pdr)
{
bool_t clearfifo; // Do we need to clear the FIFO
@@ -76,7 +76,7 @@ static void MouseXYZ(GMouse* m, GMouseReading* pdr)
clearfifo = false;
if(getpin_irq(m)) {
write_reg(m, STMPE811_REG_INT_STA, 0xFF); // clear all interrupts
- if (read_byte(STMPE811_REG_TSC_CTRL) & 0x80) // set the new touched status
+ if (read_byte(m, STMPE811_REG_TSC_CTRL) & 0x80) // set the new touched status
m->flags |= GMOUSE_STMPE811_FLG_TOUCHED;
else
m->flags &= ~GMOUSE_STMPE811_FLG_TOUCHED;