Parent directory

debounce.h

615 bytes
 1#pragma once
 2
 3#include <stdint.h>
 4#include <stdbool.h>
 5#include "matrix.h"
 6
 7/**
 8 * @brief Debounce raw matrix events according to the choosen debounce algorithm.
 9 *
10 * @param raw The current key state
11 * @param cooked The debounced key state
12 * @param num_rows Number of rows to debounce
13 * @param changed True if raw has changed since the last call
14 * @return true Cooked has new keychanges after debouncing
15 * @return false Cooked is the same as before
16 */
17bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed);
18
19void debounce_init(uint8_t num_rows);
20
21void debounce_free(void);