From 5408f21e993c0f94f04ed0c891b050d9a762289a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20B=C3=A5nvik?= Date: Tue, 5 Mar 2024 11:47:06 +0100 Subject: [PATCH] Fixed nrf51 radio build --- embassy-nrf/src/lib.rs | 2 +- embassy-nrf/src/radio/mod.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index 06a25a36d..e59a7bd5d 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs @@ -47,7 +47,7 @@ pub mod gpio; pub mod gpiote; // TODO: tested on other chips -#[cfg(not(any(feature = "nrf51", feature = "_nrf9160")))] +#[cfg(not(any(feature = "_nrf9160")))] pub mod radio; #[cfg(any(feature = "nrf52832", feature = "nrf52833", feature = "nrf52840"))] diff --git a/embassy-nrf/src/radio/mod.rs b/embassy-nrf/src/radio/mod.rs index adb8e1206..5a2982d89 100644 --- a/embassy-nrf/src/radio/mod.rs +++ b/embassy-nrf/src/radio/mod.rs @@ -6,6 +6,7 @@ #![macro_use] /// Bluetooth Low Energy Radio driver. +#[cfg(not(feature = "nrf51"))] pub mod ble; #[cfg(any( feature = "nrf52820", @@ -19,6 +20,7 @@ pub mod ieee802154; use core::marker::PhantomData; use pac::radio::state::STATE_A as RadioState; +#[cfg(not(feature = "nrf51"))] use pac::radio::txpower::TXPOWER_A as TxPower; use crate::{interrupt, pac, Peripheral};