From a6d5c34590bca13166776dc8e6d552bb1557fff9 Mon Sep 17 00:00:00 2001 From: Andelf Date: Thu, 3 Oct 2024 13:31:01 +0800 Subject: [PATCH] fix(build): feature flags --- qingke-rt/Cargo.toml | 2 +- src/pfic.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qingke-rt/Cargo.toml b/qingke-rt/Cargo.toml index aabd0e6..d058a5e 100644 --- a/qingke-rt/Cargo.toml +++ b/qingke-rt/Cargo.toml @@ -24,7 +24,7 @@ highcode = [] [dependencies] qingke-rt-macros = { path = "./macros", version = "0.3" } -qingke = { path = "../", version = "0.3" } +qingke = { path = "../", version = "0.3", features = ["critical-section-impl"] } [package.metadata.docs.rs] targets = ["riscv32imac-unknown-none-elf"] diff --git a/src/pfic.rs b/src/pfic.rs index b0dff45..9b94932 100644 --- a/src/pfic.rs +++ b/src/pfic.rs @@ -168,6 +168,7 @@ pub unsafe fn disable_vtf(channel: u8) { ptr::write_volatile(PFIC_VTFADDRR0.offset(channel as isize), val & 0xFFFF_FFFE); } +#[cfg(feature = "critical-section-impl")] pub unsafe fn wfi_to_wfe(v: bool) { critical_section::with(|_| { let mut val = ptr::read_volatile(PFIC_SCTLR);