debounce.h 535 B

123456789101112131415161718192021
  1. #ifndef DEBOUNCE_H
  2. #define DEBOUNCE_H
  3. #include <stdbool.h>
  4. #include <stdint.h>
  5. #include "matrix.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. /* called to initialize any data stores your implementation has*/
  10. void matrix_debounce_init(void);
  11. /* call this every keyboard_task to debounce the matrix*/
  12. void matrix_debounce(void);
  13. /* matrix state on row */
  14. matrix_row_t matrix_debounce_get_row(uint8_t row);
  15. /* whether a switch is on */
  16. bool matrix_debounce_is_on(uint8_t row, uint8_t col);
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. #endif