forked from mirrors/qmk_userspace
Make debounce() signal changes in the cooked matrix as return value (#17554)
This commit is contained in:
parent
cca5d35321
commit
8224f62806
13 changed files with 83 additions and 39 deletions
|
@ -1,10 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
// raw is the current key state
|
||||
// on entry cooked is the previous debounced state
|
||||
// on exit cooked is the current debounced state
|
||||
// changed is true if raw has changed since the last call
|
||||
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed);
|
||||
/**
|
||||
* @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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue