6 #ifndef DEBOUNCING_DELAY
7 # define DEBOUNCING_DELAY 5
10 void debounce_init(uint8_t num_rows) {
13 #if DEBOUNCING_DELAY > 0
15 static bool debouncing = false;
17 void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
18 static uint16_t debouncing_time;
22 debouncing_time = timer_read();
25 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
26 for (uint8_t i = 0; i < num_rows; i++) {
33 bool debounce_active(void) {
40 void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
43 for (uint8_t i = 0; i < num_rows; i++) {
49 bool debounce_active(void) {