stm32: generate singletons only for pins that actually exist.
Before we'd generate all pins Px0..Px15 for each GPIOx port. This changes codegen to only generate singletons for actually-existing pins. (AFs were already previously filtered, so these non-existing pins were already mostly useless)
This commit is contained in:
@@ -18,7 +18,7 @@ fn main() -> ! {
|
||||
|
||||
let mut spi = Spi::new_blocking(p.SPI3, p.PC10, p.PC12, p.PC11, spi_config);
|
||||
|
||||
let mut cs = Output::new(p.PE0, Level::High, Speed::VeryHigh);
|
||||
let mut cs = Output::new(p.PC13, Level::High, Speed::VeryHigh);
|
||||
|
||||
loop {
|
||||
let mut buf = [0x0Au8; 4];
|
||||
|
||||
@@ -12,7 +12,8 @@ async fn main(_spawner: Spawner) -> ! {
|
||||
let p = embassy_stm32::init(Default::default());
|
||||
info!("Hello World!");
|
||||
|
||||
let mut led = Output::new(p.PH7, Level::Low, Speed::Medium);
|
||||
// replace PC13 with the right pin for your board.
|
||||
let mut led = Output::new(p.PC13, Level::Low, Speed::Medium);
|
||||
|
||||
loop {
|
||||
defmt::info!("on!");
|
||||
|
||||
Reference in New Issue
Block a user