debounce.h 512 B

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