Random progress on board + kscan ideas.

This commit is contained in:
Pete Johanson
2020-04-25 22:41:20 -04:00
parent 85c8be89de
commit 5b4e43cebd
14 changed files with 527 additions and 28 deletions

11
src/lib.rs Normal file
View File

@@ -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);
}
}

View File

@@ -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) {