aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPeter Johanson <[email protected]>2023-11-09 00:10:38 -0800
committerPete Johanson <[email protected]>2024-02-09 14:32:46 -0800
commitba1a6c08adfaf579292efd24b932033ddd66ce22 (patch)
treec11849e41ced1304e6c70c7e4b628b8c738bce54
parentd06e90e713fd113493bad513513d2f8d88d3a548 (diff)
downloadzmk-ba1a6c08adfaf579292efd24b932033ddd66ce22.tar.gz
zmk-ba1a6c08adfaf579292efd24b932033ddd66ce22.zip
refactor: Return int from main function.
-rw-r--r--app/src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main.c b/app/src/main.c
index 3fd6b11660..9bd7af3272 100644
--- a/app/src/main.c
+++ b/app/src/main.c
@@ -17,14 +17,16 @@ LOG_MODULE_REGISTER(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <drivers/ext_power.h>
-void main(void) {
+int main(void) {
LOG_INF("Welcome to ZMK!\n");
if (zmk_kscan_init(DEVICE_DT_GET(ZMK_MATRIX_NODE_ID)) != 0) {
- return;
+ return -ENOTSUP;
}
#ifdef CONFIG_ZMK_DISPLAY
zmk_display_init();
#endif /* CONFIG_ZMK_DISPLAY */
+
+ return 0;
}