From dbb1b95d5c04e951058cb5b70c828475f8cd4c36 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sun, 12 Nov 2017 16:22:24 -0800 Subject: [PATCH] Add a public API for a device-specific feature (configurable debounce time) --- src/Kaleidoscope-Hardware-Model01.cpp | 6 ++++++ src/Kaleidoscope-Hardware-Model01.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/Kaleidoscope-Hardware-Model01.cpp b/src/Kaleidoscope-Hardware-Model01.cpp index d23e63bc..cbf6d0c8 100644 --- a/src/Kaleidoscope-Hardware-Model01.cpp +++ b/src/Kaleidoscope-Hardware-Model01.cpp @@ -242,4 +242,10 @@ void Model01::maskHeldKeys(void) { memcpy(rightHandMask.rows, rightHandState.rows, sizeof(rightHandMask)); } + +void Model01::setKeyscanInterval(uint8_t interval) { + leftHand.setKeyscanInterval(interval); + rightHand.setKeyscanInterval(interval); +} + HARDWARE_IMPLEMENTATION KeyboardHardware; diff --git a/src/Kaleidoscope-Hardware-Model01.h b/src/Kaleidoscope-Hardware-Model01.h index c7d6373e..c0a68b5c 100644 --- a/src/Kaleidoscope-Hardware-Model01.h +++ b/src/Kaleidoscope-Hardware-Model01.h @@ -31,6 +31,7 @@ class Model01 { */ void enableHighPowerLeds(void); void enableScannerPower(void); + void setKeyscanInterval(uint8_t interval); boolean ledPowerFault(void); /* Key masking