aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput/toggle.c
diff options
context:
space:
mode:
authorAndrew Hannam <andrewh@inmarket.com.au>2012-12-02 16:43:28 +1000
committerAndrew Hannam <andrewh@inmarket.com.au>2012-12-02 16:43:28 +1000
commit99a9bf45e747f612ce2c2317a913f7d1fdf696f0 (patch)
tree3309edc9156ac7748036b85ffaaba855fcb08b4d /src/ginput/toggle.c
parente23485273e9ba9cfa51ba5e73e69f8c61b9a629d (diff)
downloaduGFX-99a9bf45e747f612ce2c2317a913f7d1fdf696f0.tar.gz
uGFX-99a9bf45e747f612ce2c2317a913f7d1fdf696f0.tar.bz2
uGFX-99a9bf45e747f612ce2c2317a913f7d1fdf696f0.zip
Add support for interrupt driven Toggle Inputs
Diffstat (limited to 'src/ginput/toggle.c')
-rw-r--r--src/ginput/toggle.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ginput/toggle.c b/src/ginput/toggle.c
index a49ebfd3..890ac1dc 100644
--- a/src/ginput/toggle.c
+++ b/src/ginput/toggle.c
@@ -34,10 +34,6 @@
#include "lld/ginput/toggle.h"
-#ifndef GINPUT_TOGGLE_POLL_PERIOD
- #define GINPUT_TOGGLE_POLL_PERIOD 250
-#endif
-
#define GINPUT_TOGGLE_ISON 0x01
#define GINPUT_TOGGLE_INVERT 0x02
@@ -157,5 +153,15 @@ bool_t ginputGetToggleStatus(uint16_t instance, GEventToggle *ptoggle) {
return TRUE;
}
+/* Wake up the mouse driver from an interrupt service routine (there may be new readings available) */
+void ginputToggleWakeup(void) {
+ gtimerJab(&ToggleTimer);
+}
+
+/* Wake up the mouse driver from an interrupt service routine (there may be new readings available) */
+void ginputToggleWakeupI(void) {
+ gtimerJabI(&ToggleTimer);
+}
+
#endif /* GINPUT_NEED_TOGGLE */
/** @} */