summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs11
-rw-r--r--src/main.c8
2 files changed, 19 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..75ada98
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,11 @@
+#[no_mangle]
+pub extern "C" fn zmk_run() {
+}
+
+#[cfg(test)]
+mod tests {
+ #[test]
+ fn it_works() {
+ assert_eq!(2 + 2, 4);
+ }
+}
diff --git a/src/main.c b/src/main.c
index e487325..21f481a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -8,6 +8,7 @@
#include <device.h>
#include <devicetree.h>
#include <drivers/gpio.h>
+#include <drivers/kscan.h>
#include "zmk_lib.h"
@@ -15,6 +16,7 @@
#define SLEEP_TIME_MS 1000
/* The devicetree node identifier for the "led0" alias. */
+/*
#define LED0_NODE DT_ALIAS(led0)
#if DT_HAS_NODE(LED0_NODE)
@@ -24,7 +26,9 @@
#define FLAGS DT_GPIO_FLAGS(LED0_NODE, gpios)
#endif
#else
+*/
/* A build error here means your board isn't set up to blink an LED. */
+/*
#error "Unsupported board: led0 devicetree alias is not defined"
#define LED0 ""
#define PIN 0
@@ -34,9 +38,12 @@
#define FLAGS 0
#endif
+*/
+
void main(void)
{
+ /*
struct device *dev;
bool led_is_on = true;
int ret;
@@ -50,6 +57,7 @@ void main(void)
if (ret < 0) {
return;
}
+ */
zmk_run();
// while (1) {