]> git.donarmstrong.com Git - tmk_firmware.git/blobdiff - keyboard/ergodox/config.h
Optimizing I2C
[tmk_firmware.git] / keyboard / ergodox / config.h
index d2ca7ea69e7e6add1bc9b72a206efba2d5caaf02..de32be7ecfbe881c78d1d4008d747560e0a74ae3 100644 (file)
@@ -40,7 +40,17 @@ Project located at <https://github.com/benblazak/ergodox-firmware>
 //#define MATRIX_HAS_GHOST
 
 /* Set 0 if debouncing isn't needed */
-#define DEBOUNCE    5
+/*
+ * This constant define not debouncing time in msecs, but amount of matrix
+ * scan loops which should be made to get stable debounced results.
+ *
+ * On Ergodox matrix scan rate is relatively low, because of slow I2C.
+ * Now it's only 317 scans/second, or about 3.15 msec/scan.
+ * According to Cherry specs, debouncing time is 5 msec.
+ *
+ * And so, there is no sense to have DEBOUNCE higher than 2.
+ */
+#define DEBOUNCE    2
 
 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
 #define LOCKING_SUPPORT_ENABLE
@@ -71,5 +81,6 @@ Project located at <https://github.com/benblazak/ergodox-firmware>
 //#define NO_ACTION_ONESHOT
 //#define NO_ACTION_MACRO
 //#define NO_ACTION_FUNCTION
+//#define DEBUG_MATRIX_FREQ
 
 #endif