forked from kofal.net/zmk
Random progress on board + kscan ideas.
This commit is contained in:
11
src/lib.rs
Normal file
11
src/lib.rs
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user