From cd40adb227d71a2ce17827e9be8db2b9b4d783dd Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 7 Jan 2025 23:32:16 +0100 Subject: [PATCH] tests/spi: Fix for samr21-xpro and other non-atomic boards --- tests/spi/Cargo.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/spi/Cargo.toml b/tests/spi/Cargo.toml index d771c6a..61b990a 100644 --- a/tests/spi/Cargo.toml +++ b/tests/spi/Cargo.toml @@ -11,6 +11,13 @@ crate-type = ["staticlib"] panic = "abort" [dependencies] -riot-wrappers = { path = "../..", features = [ "set_panic_handler", "panic_handler_format" ] } +# critical-section: We don't *use* this, but the embedded-hal-bus crate also contains variants that rely on critical sections, so we have to enable it. +riot-wrappers = { path = "../..", features = [ "set_panic_handler", "panic_handler_format", "provide_critical_section_1_0" ] } embedded-hal = "1" embedded-hal-bus = "0.2.0" + +# Actually this is only required on samr21 and other non-atomic platforms to +# make the static_cell work, but for sake of setup simplicity we'll keep this +# enabled everywhere. (A better solution would be to have the RIOT build system +# managed crates provide this dependency on platforms where it is needed). +portable-atomic = { version = "1.6", default-features = false, features = [ "critical-section" ] }