Skip to content

Commit def1cf5

Browse files
committed
remove redundant cfg
1 parent 1b4f788 commit def1cf5

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

embassy-nrf/src/chips/nrf5340_app.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ embassy_hal_internal::peripherals! {
262262
PPI_GROUP5,
263263

264264
// GPIO port 0
265-
#[cfg(any(not(feature = "_nrf5340"), feature = "lfxo-pins-as-gpio"))]
265+
#[cfg(feature = "lfxo-pins-as-gpio")]
266266
P0_00,
267-
#[cfg(any(not(feature = "_nrf5340"), feature = "lfxo-pins-as-gpio"))]
267+
#[cfg(feature = "lfxo-pins-as-gpio")]
268268
P0_01,
269269
#[cfg(feature = "nfc-pins-as-gpio")]
270270
P0_02,
@@ -370,9 +370,9 @@ impl_pdm!(PDM0, PDM0, PDM0);
370370
impl_qdec!(QDEC0, QDEC0, QDEC0);
371371
impl_qdec!(QDEC1, QDEC1, QDEC1);
372372

373-
#[cfg(any(not(feature = "_nrf5340"), feature = "lfxo-pins-as-gpio"))]
373+
#[cfg(feature = "lfxo-pins-as-gpio")]
374374
impl_pin!(P0_00, 0, 0);
375-
#[cfg(any(not(feature = "_nrf5340"), feature = "lfxo-pins-as-gpio"))]
375+
#[cfg(feature = "lfxo-pins-as-gpio")]
376376
impl_pin!(P0_01, 0, 1);
377377
#[cfg(feature = "nfc-pins-as-gpio")]
378378
impl_pin!(P0_02, 0, 2);

embassy-nrf/src/lib.rs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ compile_error!("feature `reset-pin-as-gpio` is only valid for nRF52 series chips
6565
#[cfg(all(feature = "nfc-pins-as-gpio", not(any(feature = "_nrf52", feature = "_nrf5340-app"))))]
6666
compile_error!("feature `nfc-pins-as-gpio` is only valid for nRF52, or nRF53's application core.");
6767

68-
#[cfg(all(feature = "lfxo-pins-as-gpio", not(any(feature = "_nrf5340"))))]
68+
#[cfg(all(feature = "lfxo-pins-as-gpio", not(feature = "_nrf5340")))]
6969
compile_error!("feature `lfxo-pins-as-gpio` is only valid for nRF53 series chips.");
7070

7171
// This mod MUST go first, so that the others see its macros.
@@ -285,24 +285,16 @@ pub mod config {
285285
/// Internal RC oscillator
286286
InternalRC,
287287
/// Synthesized from the high frequency clock source.
288-
#[cfg(not(any(feature = "_nrf91")))]
288+
#[cfg(not(feature = "_nrf91"))]
289289
Synthesized,
290290
/// External source from xtal.
291-
#[cfg(not(all(feature = "_nrf5340", feature = "lfxo-pins-as-gpio")))]
291+
#[cfg(not(feature = "lfxo-pins-as-gpio"))]
292292
ExternalXtal,
293293
/// External source from xtal with low swing applied.
294-
#[cfg(not(any(
295-
all(feature = "_nrf5340", feature = "lfxo-pins-as-gpio"),
296-
feature = "_nrf91",
297-
feature = "_nrf54l"
298-
)))]
294+
#[cfg(not(any(feature = "lfxo-pins-as-gpio", feature = "_nrf91", feature = "_nrf54l")))]
299295
ExternalLowSwing,
300296
/// External source from xtal with full swing applied.
301-
#[cfg(not(any(
302-
all(feature = "_nrf5340", feature = "lfxo-pins-as-gpio"),
303-
feature = "_nrf91",
304-
feature = "_nrf54l"
305-
)))]
297+
#[cfg(not(any(feature = "lfxo-pins-as-gpio", feature = "_nrf91", feature = "_nrf54l")))]
306298
ExternalFullSwing,
307299
}
308300

0 commit comments

Comments
 (0)