debounce.h 553 B

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