/*
* 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.
*/
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix;
// Debouncing: store for each key the number of scans until it's eligible to
// change. When scanning the matrix, ignore any changes in keys that have
// already changed in the last DEBOUNCE scans.
static uint8_t debounce_matrix;
static matrix_row_t ;
static void ;
static void ;
static void ;
void
void
void
void
inline
uint8_t
inline
uint8_t
void
void
// Returns a matrix_row_t whose bits are set if the corresponding key should be
// eligible to change in this scan.
matrix_row_t
// Report changed keys in the given row. Resets the debounce countdowns
// corresponding to each set bit in 'change' to DEBOUNCE.
void
uint8_t
inline
bool
inline
matrix_row_t
void
uint8_t
/* Column pin configuration
*
* Pro Micro: 6 5 4 3 2 1 0
* PD3 PD2 PD4 PC6 PD7 PE6 PB4
*
* Expander: 13 12 11 10 9 8 7
*/
static void
static matrix_row_t
/* Row pin configuration
*
* Pro Micro: 0 1 2 3 4 5
* F4 F5 F6 F7 B1 B2
*
* Expander: 0 1 2 3 4 5
*/
static void
static void