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
|
@ -17,13 +17,16 @@
|
|||
#include "matrix.h"
|
||||
#include "quantum.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void debounce_init(uint8_t num_rows) {}
|
||||
|
||||
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
|
||||
for (int i = 0; i < num_rows; i++) {
|
||||
cooked[i] = raw[i];
|
||||
}
|
||||
bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
|
||||
bool cooked_changed = memcmp(raw, cooked, sizeof(matrix_row_t) * num_rows) != 0;
|
||||
|
||||
memcpy(cooked, raw, sizeof(matrix_row_t) * num_rows);
|
||||
|
||||
return cooked_changed;
|
||||
}
|
||||
|
||||
void debounce_free(void) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue