~ruther/qmk_firmware

ref: 5ab3b27e5f9049d2e4036a71cc4fc7f2922629d1 qmk_firmware/quantum/debounce.h -rw-r--r-- 615 bytes
5ab3b27e — James Young Data-Driven Keyboard Conversions: K, Part 1 (#23556) 1 year, 10 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"

/**
 * @brief Debounce raw matrix events according to the choosen debounce algorithm.
 *
 * @param raw The current key state
 * @param cooked The debounced key state
 * @param num_rows Number of rows to debounce
 * @param changed True if raw has changed since the last call
 * @return true Cooked has new keychanges after debouncing
 * @return false Cooked is the same as before
 */
bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed);

void debounce_init(uint8_t num_rows);

void debounce_free(void);
Do not follow this link