aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/multiple/Win32/ginput_lld_toggle_config.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-10-12 13:24:40 +1000
committerinmarket <andrewh@inmarket.com.au>2013-10-12 13:24:40 +1000
commitd22bc07e7adf459b2b83fcd0e5bd6475c18e1e9a (patch)
tree0907d29a9695d1b93b02de1582345aea6446e991 /drivers/multiple/Win32/ginput_lld_toggle_config.h
parentb3ee216bd2565e8ab9298f1f54b8e6df762b7d58 (diff)
downloaduGFX-d22bc07e7adf459b2b83fcd0e5bd6475c18e1e9a.tar.gz
uGFX-d22bc07e7adf459b2b83fcd0e5bd6475c18e1e9a.tar.bz2
uGFX-d22bc07e7adf459b2b83fcd0e5bd6475c18e1e9a.zip
Multiple displays across one or more controllers is now fully supported.
Only the Win32 driver supports this so far. Other drivers are currently broken due to API changes and will be fixed.
Diffstat (limited to 'drivers/multiple/Win32/ginput_lld_toggle_config.h')
-rw-r--r--drivers/multiple/Win32/ginput_lld_toggle_config.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/multiple/Win32/ginput_lld_toggle_config.h b/drivers/multiple/Win32/ginput_lld_toggle_config.h
index 2e61d073..dd0c9b5c 100644
--- a/drivers/multiple/Win32/ginput_lld_toggle_config.h
+++ b/drivers/multiple/Win32/ginput_lld_toggle_config.h
@@ -20,9 +20,16 @@
#if GFX_USE_GINPUT && GINPUT_NEED_TOGGLE
-#define GINPUT_TOGGLE_POLL_PERIOD TIME_INFINITE // We are interrupt driven (or polled - ether works here)
-#define GINPUT_TOGGLE_NUM_PORTS 8 // The total number of toggle inputs
-#define GINPUT_TOGGLE_CONFIG_ENTRIES 1 // The total number of GToggleConfig entries
+#define GINPUT_TOGGLE_POLL_PERIOD TIME_INFINITE // We are interrupt driven (or polled - either works here)
+
+// This driver is unique in that it can support 8 buttons per window across multiple windows.
+// GINPUT_TOGGLE_CONFIG_ENTRIES just must be less than the number of GDISP windows (GDISP_DRIVER_COUNT_WIN32).
+#ifndef GINPUT_TOGGLE_CONFIG_ENTRIES
+ #define GINPUT_TOGGLE_CONFIG_ENTRIES 1 // The total number of GToggleConfig entries
+#endif
+
+// The total number of toggle inputs
+#define GINPUT_TOGGLE_NUM_PORTS (8 * GINPUT_TOGGLE_CONFIG_ENTRIES)
#define GINPUT_TOGGLE_SW1 0 // Switch 1 - Toggle
#define GINPUT_TOGGLE_SW2 1 // Switch 2 - Toggle
@@ -33,6 +40,8 @@
#define GINPUT_TOGGLE_MOMENTARY2 5 // Switch 6 - Momentary
#define GINPUT_TOGGLE_MOMENTARY3 6 // Switch 7 - Momentary
#define GINPUT_TOGGLE_MOMENTARY4 7 // Switch 8 - Momentary
+
+// This pattern of switch and momentary action is repeated across all windows.
#endif /* GFX_USE_GDISP && GINPUT_NEED_TOGGLE */