aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ginput
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-11-07 12:02:41 +1000
committerinmarket <andrewh@inmarket.com.au>2014-11-07 12:02:41 +1000
commitbd041926b43676e2bf597c98149f9a6df8f8004b (patch)
tree22a9db91876fbac50f874539e42a0dad8b5de3fc /drivers/ginput
parentf552ba62afc6cdb72fbb1b4dcdcc96000895a1cd (diff)
downloaduGFX-bd041926b43676e2bf597c98149f9a6df8f8004b.tar.gz
uGFX-bd041926b43676e2bf597c98149f9a6df8f8004b.tar.bz2
uGFX-bd041926b43676e2bf597c98149f9a6df8f8004b.zip
Allow a mouse driver to not return any results when it is polled.
Diffstat (limited to 'drivers/ginput')
-rw-r--r--drivers/ginput/touch/ADS7843/gmouse_lld_ADS7843.c3
-rw-r--r--drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ginput/touch/ADS7843/gmouse_lld_ADS7843.c b/drivers/ginput/touch/ADS7843/gmouse_lld_ADS7843.c
index ac315262..5f1eb226 100644
--- a/drivers/ginput/touch/ADS7843/gmouse_lld_ADS7843.c
+++ b/drivers/ginput/touch/ADS7843/gmouse_lld_ADS7843.c
@@ -19,7 +19,7 @@
#define CMD_Y 0x91
#define CMD_ENABLE_IRQ 0x80
-static void MouseXYZ(GMouse* m, GMouseReading* pdr)
+static bool_t MouseXYZ(GMouse* m, GMouseReading* pdr)
{
(void)m;
@@ -42,6 +42,7 @@ static void MouseXYZ(GMouse* m, GMouseReading* pdr)
release_bus(m);
}
+ return TRUE;
}
const GMouseVMT const GMOUSE_DRIVER_VMT[1] = {{
diff --git a/drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c b/drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c
index ed2e68fa..6b0bcdb2 100644
--- a/drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c
+++ b/drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c
@@ -56,7 +56,7 @@ static bool_t MouseInit(GMouse* m, unsigned driverinstance) {
return TRUE;
}
-static void MouseXYZ(GMouse* m, GMouseReading* pdr)
+static bool_t MouseXYZ(GMouse* m, GMouseReading* pdr)
{
// Assume not touched.
pdr->buttons = 0;
@@ -80,6 +80,7 @@ static void MouseXYZ(GMouse* m, GMouseReading* pdr)
}
release_bus(m);
+ return TRUE;
}
const GMouseVMT const GMOUSE_DRIVER_VMT[1] = {{