Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

matrix_skel.h 610B

123456789101112131415161718192021222324
  1. #ifndef MATRIX_SKEL_H
  2. #define MATRIX_SKEL_H 1
  3. #include <stdbool.h>
  4. /* number of matrix rows */
  5. int matrix_rows(void);
  6. /* number of matrix columns */
  7. int matrix_cols(void);
  8. /* intialize matrix for scaning. should be called once. */
  9. void matrix_init(void);
  10. /* scan all key states on matrix */
  11. int matrix_scan(void);
  12. /* whether modified from previous scan. used after matrix_scan. */
  13. bool matrix_is_modified(void);
  14. /* whether ghosting occur on matrix. */
  15. bool matrix_has_ghost(void);
  16. /* matrix state on row */
  17. uint16_t matrix_get_row(int row);
  18. /* print matrix for debug */
  19. void matrix_print(void);
  20. #endif