]> git.gir.st - tmk_keyboard.git/blob - matrix_skel.h
improve layer switching
[tmk_keyboard.git] / matrix_skel.h
1 #ifndef MATRIX_SKEL_H
2 #define MATRIX_SKEL_H 1
3
4 #include <stdbool.h>
5
6 /* number of matrix rows */
7 int matrix_rows(void);
8 /* number of matrix columns */
9 int matrix_cols(void);
10 /* intialize matrix for scaning. should be called once. */
11 void matrix_init(void);
12 /* scan all key states on matrix */
13 int matrix_scan(void);
14 /* whether modified from previous scan. used after matrix_scan. */
15 bool matrix_is_modified(void);
16 /* whether ghosting occur on matrix. */
17 bool matrix_has_ghost(void);
18 /* whether a swtich is on */
19 bool matrix_is_on(int row, int col);
20 /* matrix state on row */
21 uint16_t matrix_get_row(int row);
22 /* count keys pressed */
23 int matrix_key_count(void);
24 /* print matrix for debug */
25 void matrix_print(void);
26
27
28 #endif
Imprint / Impressum