Add Embassy iMXRT RTC Time Driver

This commit is contained in:
Felipe Balbi
2025-04-09 13:15:02 -07:00
parent 6919732666
commit a78707b779
6 changed files with 291 additions and 7 deletions

View File

@@ -12,7 +12,8 @@ defmt-rtt = "1.0"
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
embassy-futures = { version = "0.1.1", path = "../../embassy-futures" }
embassy-imxrt = { version = "0.1.0", path = "../../embassy-imxrt", features = ["defmt", "mimxrt685s", "unstable-pac"] }
embassy-imxrt = { version = "0.1.0", path = "../../embassy-imxrt", features = ["defmt", "mimxrt685s", "unstable-pac", "time", "time-driver-rtc"] }
embassy-time = { version = "0.4", path = "../../embassy-time" }
embassy-sync = { version = "0.6.2", path = "../../embassy-sync", features = ["defmt"] }
embedded-hal-1 = { package = "embedded-hal", version = "1.0" }
embedded-hal-async = "1.0.0"

View File

@@ -6,6 +6,7 @@ extern crate embassy_imxrt_examples;
use defmt::info;
use embassy_executor::Spawner;
use embassy_imxrt::gpio;
use embassy_time::Timer;
#[embassy_executor::main]
async fn main(_spawner: Spawner) {
@@ -24,6 +25,6 @@ async fn main(_spawner: Spawner) {
loop {
info!("Toggling LED");
led.toggle();
cortex_m::asm::delay(5_000_000);
Timer::after_secs(1).await;
}
}