/async-hal

Primary LanguageRustApache License 2.0Apache-2.0

async-hal

Async hardware abstraction layer for embedded devices

crate Rust Documentation CI

use async_hal::delay::DelayMs;

let mut led = _;
let mut timer = _;

loop {
    led.toggle();
    timer.delay_ms(1_000).await?;
}
use async_hal::io;

let mut serial_tx = _;
let mut serial_rx = _;

loop {
    io::copy_buf(&mut serial_tx, &mut serial_rx).await?
}