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};