Init xiao project

This commit is contained in:
Invariantspace 2025-06-22 14:16:49 -05:00 committed by macronova
parent 574d4d08bc
commit 4ae4b466fa
Signed by: macronova
GPG key ID: CE969670FB4B4A56
11 changed files with 2125 additions and 0 deletions

View file

@ -0,0 +1,26 @@
//! Demo test suite using embedded-test
//!
//! You can run this using `cargo test` as usual.
#![no_std]
#![no_main]
#[cfg(test)]
#[embedded_test::tests(executor = esp_hal_embassy::Executor::new())]
mod tests {
use esp_hal::timer::systimer::SystemTimer;
#[init]
fn init() {
let peripherals = esp_hal::init(esp_hal::Config::default());
let timer0 = SystemTimer::new(peripherals.SYSTIMER);
esp_hal_embassy::init(timer0.alarm0);
}
#[test]
async fn hello_test() {
embassy_time::Timer::after(embassy_time::Duration::from_millis(100)).await;
assert_eq!(1 + 1, 2);
}
}