zmk_mf68/app/src/main.c

35 lines
535 B
C
Raw Normal View History

2020-04-22 06:20:34 +10:00
/*
2020-05-02 09:14:18 +10:00
* Copyright (c) 2020 Peter Johanson
2020-04-22 06:20:34 +10:00
*
2020-05-02 09:14:18 +10:00
* SPDX-License-Identifier: MIT
2020-04-22 06:20:34 +10:00
*/
#include <zephyr.h>
#include <device.h>
#include <devicetree.h>
#include <settings/settings.h>
#include <logging/log.h>
LOG_MODULE_REGISTER(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/matrix.h>
#include <zmk/kscan.h>
#include <zmk/endpoints.h>
2020-04-22 06:20:34 +10:00
#define ZMK_KSCAN_DEV DT_LABEL(ZMK_MATRIX_NODE_ID)
2020-05-15 23:41:06 +10:00
2020-04-22 06:20:34 +10:00
void main(void)
{
printk("Welcome to ZMK!\n");
2020-04-22 06:20:34 +10:00
2020-05-15 23:41:06 +10:00
if (zmk_kscan_init(ZMK_KSCAN_DEV) != 0)
{
return;
}
#ifdef CONFIG_SETTINGS
settings_load();
#endif
2020-04-22 06:20:34 +10:00
}