aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymat.h
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2024-08-10 02:32:33 +0200
committerLouis Burda <quent.burda@gmail.com>2024-08-10 02:32:33 +0200
commit4c462d0af136c244e2c2edf6f464c5f495f5b870 (patch)
tree64c318c976e5bf3665a9d99a553b23fe4ae61d3a /src/keymat.h
parent8e0fad10878f0e81b8ed4d00187309c5ba96287d (diff)
downloadsxkbd-4c462d0af136c244e2c2edf6f464c5f495f5b870.tar.gz
sxkbd-4c462d0af136c244e2c2edf6f464c5f495f5b870.zip
Switch to event-triggered messaging
Diffstat (limited to 'src/keymat.h')
-rw-r--r--src/keymat.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/keymat.h b/src/keymat.h
index 2d0ad4a..9def47b 100644
--- a/src/keymat.h
+++ b/src/keymat.h
@@ -9,13 +9,12 @@
#define KEY_COLS 6
#define KEY_COUNT (KEY_ROWS * KEY_COLS)
-#define KEYMAT_HALF(side) ((side) == LEFT ? &keymat[0] : &keymat[KEY_ROWS_HALF])
+#define KEYMAT_HALF(keymat, side) ((side) == LEFT ? &(keymat)[0] : &(keymat)[KEY_ROWS_HALF])
void keymat_init(void);
-void keymat_next(void);
-void keymat_scan(void);
+bool keymat_scan(void);
uint32_t keymat_encode_half(int side);
-void keymat_decode_half(int side, uint32_t);
+void keymat_decode_half(int side, uint32_t mask);
void keymat_debug(void);