Fix format in stm32 SPI examples

This commit is contained in:
bofh 2023-07-30 19:31:22 +02:00
parent 55fb1d5126
commit 04ed45941a
6 changed files with 6 additions and 54 deletions

View File

@ -46,15 +46,7 @@ fn main() -> ! {
let mut spi_config = spi::Config::default();
spi_config.frequency = mhz(1);
let spi = spi::Spi::new(
p.SPI3,
p.PB3,
p.PB5,
p.PB4,
NoDma,
NoDma,
spi_config,
);
let spi = spi::Spi::new(p.SPI3, p.PB3, p.PB5, p.PB4, NoDma, NoDma, spi_config);
let executor = EXECUTOR.init(Executor::new());

View File

@ -42,15 +42,7 @@ fn main() -> ! {
let mut spi_config = spi::Config::default();
spi_config.frequency = mhz(1);
let spi = spi::Spi::new(
p.SPI3,
p.PB3,
p.PB5,
p.PB4,
p.DMA1_CH3,
p.DMA1_CH4,
spi_config,
);
let spi = spi::Spi::new(p.SPI3, p.PB3, p.PB5, p.PB4, p.DMA1_CH3, p.DMA1_CH4, spi_config);
let executor = EXECUTOR.init(Executor::new());

View File

@ -31,15 +31,7 @@ async fn main(_spawner: Spawner) {
spi_config.frequency = khz(200);
// SPI for sx1276
let spi = spi::Spi::new(
p.SPI1,
p.PB3,
p.PA7,
p.PA6,
p.DMA1_CH3,
p.DMA1_CH2,
spi_config,
);
let spi = spi::Spi::new(p.SPI1, p.PB3, p.PA7, p.PA6, p.DMA1_CH3, p.DMA1_CH2, spi_config);
let nss = Output::new(p.PA15.degrade(), Level::High, Speed::Low);
let reset = Output::new(p.PC0.degrade(), Level::High, Speed::Low);

View File

@ -36,15 +36,7 @@ async fn main(_spawner: Spawner) {
spi_config.frequency = khz(200);
// SPI for sx1276
let spi = spi::Spi::new(
p.SPI1,
p.PB3,
p.PA7,
p.PA6,
p.DMA1_CH3,
p.DMA1_CH2,
spi_config,
);
let spi = spi::Spi::new(p.SPI1, p.PB3, p.PA7, p.PA6, p.DMA1_CH3, p.DMA1_CH2, spi_config);
let nss = Output::new(p.PA15.degrade(), Level::High, Speed::Low);
let reset = Output::new(p.PC0.degrade(), Level::High, Speed::Low);

View File

@ -31,15 +31,7 @@ async fn main(_spawner: Spawner) {
spi_config.frequency = khz(200);
// SPI for sx1276
let spi = spi::Spi::new(
p.SPI1,
p.PB3,
p.PA7,
p.PA6,
p.DMA1_CH3,
p.DMA1_CH2,
spi_config,
);
let spi = spi::Spi::new(p.SPI1, p.PB3, p.PA7, p.PA6, p.DMA1_CH3, p.DMA1_CH2, spi_config);
let nss = Output::new(p.PA15.degrade(), Level::High, Speed::Low);
let reset = Output::new(p.PC0.degrade(), Level::High, Speed::Low);

View File

@ -31,15 +31,7 @@ async fn main(_spawner: Spawner) {
spi_config.frequency = khz(200);
// SPI for sx1276
let spi = spi::Spi::new(
p.SPI1,
p.PB3,
p.PA7,
p.PA6,
p.DMA1_CH3,
p.DMA1_CH2,
spi_config,
);
let spi = spi::Spi::new(p.SPI1, p.PB3, p.PA7, p.PA6, p.DMA1_CH3, p.DMA1_CH2, spi_config);
let nss = Output::new(p.PA15.degrade(), Level::High, Speed::Low);
let reset = Output::new(p.PC0.degrade(), Level::High, Speed::Low);