2020-04-21 13:20:34 -07:00
|
|
|
/*
|
2020-05-01 16:14:18 -07:00
|
|
|
* Copyright (c) 2020 Peter Johanson
|
2020-04-21 13:20:34 -07:00
|
|
|
*
|
2020-05-01 16:14:18 -07:00
|
|
|
* SPDX-License-Identifier: MIT
|
2020-04-21 13:20:34 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <zephyr.h>
|
|
|
|
#include <device.h>
|
|
|
|
#include <devicetree.h>
|
2020-04-25 19:41:20 -07:00
|
|
|
|
2020-05-06 07:04:19 -07:00
|
|
|
#include "zmk.h"
|
2020-05-01 16:14:18 -07:00
|
|
|
#include "kscan.h"
|
2020-05-15 06:41:06 -07:00
|
|
|
#include "endpoints.h"
|
2020-04-21 13:20:34 -07:00
|
|
|
|
2020-05-06 07:04:19 -07:00
|
|
|
#define ZMK_KSCAN_DEV DT_LABEL(ZMK_MATRIX_NODE_ID)
|
2020-05-15 06:41:06 -07:00
|
|
|
|
2020-04-21 13:20:34 -07:00
|
|
|
void main(void)
|
|
|
|
{
|
2020-05-01 11:58:00 -07:00
|
|
|
printk("Welcome to ZMK!\n");
|
2020-04-21 13:20:34 -07:00
|
|
|
|
2020-05-15 06:41:06 -07:00
|
|
|
if (zmk_kscan_init(ZMK_KSCAN_DEV) != 0)
|
|
|
|
{
|
2020-05-03 12:49:33 -07:00
|
|
|
return;
|
|
|
|
}
|
2020-05-05 13:09:05 -07:00
|
|
|
|
2020-05-15 06:41:06 -07:00
|
|
|
if (zmk_endpoints_init())
|
|
|
|
{
|
2020-05-05 13:09:05 -07:00
|
|
|
return;
|
|
|
|
}
|
2020-04-21 13:20:34 -07:00
|
|
|
}
|