diff options
| author | Adrian Wowk <[email protected]> | 2025-07-02 21:18:44 -0500 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-05 20:35:48 +0200 |
| commit | 83b42e0db620b7fc2364763b452b346b711e8d9f (patch) | |
| tree | 16c7f4097eb7aa3ea9a16d164c5d251aab1c0d0a /examples/rp/src | |
| parent | 236662c748eab43a701bf4f43570b191ec2c1158 (diff) | |
style: cleanup with rustfmt
Diffstat (limited to 'examples/rp/src')
| -rw-r--r-- | examples/rp/src/bin/pio_spi.rs | 11 | ||||
| -rw-r--r-- | examples/rp/src/bin/pio_spi_async.rs | 13 |
2 files changed, 9 insertions, 15 deletions
diff --git a/examples/rp/src/bin/pio_spi.rs b/examples/rp/src/bin/pio_spi.rs index 1fbe235e5..0164e4c81 100644 --- a/examples/rp/src/bin/pio_spi.rs +++ b/examples/rp/src/bin/pio_spi.rs | |||
| @@ -9,13 +9,10 @@ | |||
| 9 | 9 | ||
| 10 | use defmt::*; | 10 | use defmt::*; |
| 11 | use embassy_executor::Spawner; | 11 | use embassy_executor::Spawner; |
| 12 | use embassy_rp::{ | 12 | use embassy_rp::peripherals::PIO0; |
| 13 | bind_interrupts, | 13 | use embassy_rp::pio_programs::spi::{Config, PioSpiProgram, Spi}; |
| 14 | peripherals::PIO0, | 14 | use embassy_rp::spi::Phase; |
| 15 | pio, | 15 | use embassy_rp::{bind_interrupts, pio}; |
| 16 | pio_programs::spi::{Config, PioSpiProgram, Spi}, | ||
| 17 | spi::Phase, | ||
| 18 | }; | ||
| 19 | use embassy_time::Timer; | 16 | use embassy_time::Timer; |
| 20 | use {defmt_rtt as _, panic_probe as _}; | 17 | use {defmt_rtt as _, panic_probe as _}; |
| 21 | 18 | ||
diff --git a/examples/rp/src/bin/pio_spi_async.rs b/examples/rp/src/bin/pio_spi_async.rs index 5abf6fc71..1dbdff609 100644 --- a/examples/rp/src/bin/pio_spi_async.rs +++ b/examples/rp/src/bin/pio_spi_async.rs | |||
| @@ -9,13 +9,10 @@ | |||
| 9 | 9 | ||
| 10 | use defmt::*; | 10 | use defmt::*; |
| 11 | use embassy_executor::Spawner; | 11 | use embassy_executor::Spawner; |
| 12 | use embassy_rp::{ | 12 | use embassy_rp::peripherals::PIO0; |
| 13 | bind_interrupts, | 13 | use embassy_rp::pio_programs::spi::{Config, PioSpiProgram, Spi}; |
| 14 | peripherals::PIO0, | 14 | use embassy_rp::spi::Phase; |
| 15 | pio, | 15 | use embassy_rp::{bind_interrupts, pio}; |
| 16 | pio_programs::spi::{Config, PioSpiProgram, Spi}, | ||
| 17 | spi::Phase, | ||
| 18 | }; | ||
| 19 | use embassy_time::Timer; | 16 | use embassy_time::Timer; |
| 20 | use {defmt_rtt as _, panic_probe as _}; | 17 | use {defmt_rtt as _, panic_probe as _}; |
| 21 | 18 | ||
| @@ -32,7 +29,7 @@ async fn main(_spawner: Spawner) { | |||
| 32 | // use them together regardless | 29 | // use them together regardless |
| 33 | let mosi = p.PIN_6; // SPI0 SCLK | 30 | let mosi = p.PIN_6; // SPI0 SCLK |
| 34 | let miso = p.PIN_7; // SPI0 MOSI | 31 | let miso = p.PIN_7; // SPI0 MOSI |
| 35 | let clk = p.PIN_8; // SPI1 MISO | 32 | let clk = p.PIN_8; // SPI1 MISO |
| 36 | 33 | ||
| 37 | let pio::Pio { mut common, sm0, .. } = pio::Pio::new(p.PIO0, Irqs); | 34 | let pio::Pio { mut common, sm0, .. } = pio::Pio::new(p.PIO0, Irqs); |
| 38 | 35 | ||
