Skip to content

Commit 655991c

Browse files
committed
Simplify Spi peripheral feature gates
1 parent 26738de commit 655991c

File tree

1 file changed

+4
-28
lines changed

1 file changed

+4
-28
lines changed

src/spi.rs

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -449,38 +449,14 @@ mod interrupts {
449449
}
450450
}
451451

452-
#[cfg(any(
453-
feature = "stm32f303x6",
454-
feature = "stm32f303x8",
455-
feature = "stm32f328",
456-
feature = "stm32f334",
457-
))]
452+
#[cfg(feature = "gpio-f333")]
458453
spi!([(1, 2)]);
459454

460-
#[cfg(any(
461-
feature = "stm32f301",
462-
feature = "stm32f302x6",
463-
feature = "stm32f302x8",
464-
feature = "stm32f318",
465-
))]
455+
#[cfg(feature = "gpio-f302")]
466456
spi!([(2, 1), (3, 1)]);
467457

468-
#[cfg(any(
469-
feature = "stm32f302xb",
470-
feature = "stm32f302xc",
471-
feature = "stm32f303xb",
472-
feature = "stm32f303xc",
473-
feature = "stm32f358",
474-
feature = "stm32f373",
475-
feature = "stm32f378",
476-
))]
458+
#[cfg(any(feature = "gpio-f303", feature = "gpio-f373",))]
477459
spi!([(1, 2), (2, 1), (3, 1)]);
478460

479-
#[cfg(any(
480-
feature = "stm32f302xd",
481-
feature = "stm32f302xe",
482-
feature = "stm32f303xd",
483-
feature = "stm32f303xe",
484-
feature = "stm32f398",
485-
))]
461+
#[cfg(feature = "gpio-f303e")]
486462
spi!([(1, 2), (2, 1), (3, 1), (4, 2)]);

0 commit comments

Comments
 (0)