This commit is contained in:
Jeremy Soller
2020-07-23 10:57:18 -06:00
committed by Jeremy Soller
parent 69d3b9d8bf
commit f1809926f6
9 changed files with 610 additions and 0 deletions

View File

@ -9,6 +9,11 @@
#include <board/power.h>
#include <common/debug.h>
// Default to not n-key rollover
#ifndef KM_NKEY
#define KM_NKEY 0
#endif // KM_NKEY
bool kbscan_enabled = false;
uint16_t kbscan_repeat_period = 91;
uint16_t kbscan_repeat_delay = 500;
@ -89,6 +94,14 @@ static uint8_t kbscan_get_row(int i) {
return ~KSI;
}
#if KM_NKEY
static bool kbscan_has_ghost_in_row(int row, uint8_t rowdata) {
// Use arguments
row = row;
rowdata = rowdata;
return false;
}
#else // KM_NKEY
static inline bool popcount_more_than_one(uint8_t rowdata) {
return rowdata & (rowdata - 1);
}
@ -123,6 +136,7 @@ static bool kbscan_has_ghost_in_row(int row, uint8_t rowdata) {
return false;
}
#endif // KM_NKEY
bool kbscan_press(uint16_t key, bool pressed, uint8_t * layer) {
if (pressed &&