Crates.io | cntrlr |
lib.rs | cntrlr |
version | 0.1.0 |
source | src |
created_at | 2021-01-03 18:56:13.670049 |
updated_at | 2021-01-03 18:56:13.670049 |
description | Simple, async embedded framework |
homepage | https://github.com/branan/cntrlr |
repository | https://github.com/branan/cntrlr |
max_upload_size | |
id | 331151 |
size | 298,770 |
Cntrlr is an all-in-one embedded platform for writing simple asynchronous applications on top of common hobbyist development boards.
#![no_std]
#![no_main]
use cntrlr::prelude::*;
use core::future::pending;
#[entry]
async fn main() -> ! {
serial_1().enable(9600).unwrap();
writeln!(serial_1(), \"Hello, World\").await.unwrap();
// Hang forever once we've sent our message
pending().await
}
#![no_std]
#![no_main]
use cntrlr::prelude::*;
#[entry]
async fn main() -> ! {
pin_mode(13, PinMode::Output);
loop {
digital_write(13, true);
sleep(500).await;
digital_wrrite(13, false);
sleep(500).await;
}
}