aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2022-11-28 19:58:09 +0100
committerLouis Burda <quent.burda@gmail.com>2022-11-28 19:58:09 +0100
commita7bfb47f666c8fadffb80b1beeee1905ad3fe029 (patch)
tree1b2f068f9492b011f6087b3b4938a80e5f0ab0c2 /src/util.h
parent7f1cf3407ab3ba4827053133a7a47901ce763c61 (diff)
downloadsxkbd-a7bfb47f666c8fadffb80b1beeee1905ad3fe029.tar.gz
sxkbd-a7bfb47f666c8fadffb80b1beeee1905ad3fe029.zip
Basic key matrix scan and keycode setup
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index e413883..376d132 100644
--- a/src/util.h
+++ b/src/util.h
@@ -3,6 +3,8 @@
#include <stdbool.h>
#include <stdarg.h>
+#define ARRLEN(x) (sizeof(x) / sizeof((x)[0]))
+
#define ERR(...) stdio_log(LOG_ERR, __VA_ARGS__)
#define WARN(...) stdio_log(LOG_WARN, __VA_ARGS__)
#define INFO(...) stdio_log(LOG_INFO, __VA_ARGS__)