cntrlr

Crates.iocntrlr
lib.rscntrlr
version0.1.0
sourcesrc
created_at2021-01-03 18:56:13.670049
updated_at2021-01-03 18:56:13.670049
descriptionSimple, async embedded framework
homepagehttps://github.com/branan/cntrlr
repositoryhttps://github.com/branan/cntrlr
max_upload_size
id331151
size298,770
Branan Riley (branan)

documentation

https://docs.rs/cntrlr

README

Cntrlr - Simple, asynchronous embedded

Cntrlr is an all-in-one embedded platform for writing simple asynchronous applications on top of common hobbyist development boards.

Examples

Hello World to a serial port

#![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
}

Blinking LED

#![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;
    }
}
Commit count: 53

cargo fmt