diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rp/src/bin/spi.rs | 3 | ||||
| -rw-r--r-- | examples/rp/src/bin/spi_display.rs | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/examples/rp/src/bin/spi.rs b/examples/rp/src/bin/spi.rs index c4748f2ec..71dec94f3 100644 --- a/examples/rp/src/bin/spi.rs +++ b/examples/rp/src/bin/spi.rs | |||
| @@ -7,7 +7,6 @@ mod example_common; | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy::executor::Spawner; | 9 | use embassy::executor::Spawner; |
| 10 | use embassy_rp::gpio::NoPin; | ||
| 11 | use embassy_rp::spi; | 10 | use embassy_rp::spi; |
| 12 | use embassy_rp::spi::Spi; | 11 | use embassy_rp::spi::Spi; |
| 13 | use embassy_rp::{gpio, Peripherals}; | 12 | use embassy_rp::{gpio, Peripherals}; |
| @@ -27,7 +26,7 @@ async fn main(_spawner: Spawner, p: Peripherals) { | |||
| 27 | // create SPI | 26 | // create SPI |
| 28 | let mut config = spi::Config::default(); | 27 | let mut config = spi::Config::default(); |
| 29 | config.frequency = 2_000_000; | 28 | config.frequency = 2_000_000; |
| 30 | let mut spi = Spi::new(p.SPI1, clk, mosi, miso, NoPin, config); | 29 | let mut spi = Spi::new(p.SPI1, clk, mosi, miso, config); |
| 31 | 30 | ||
| 32 | // Configure CS | 31 | // Configure CS |
| 33 | let mut cs = Output::new(touch_cs, Level::Low); | 32 | let mut cs = Output::new(touch_cs, Level::Low); |
diff --git a/examples/rp/src/bin/spi_display.rs b/examples/rp/src/bin/spi_display.rs index 1ae3ae66e..96f0cf378 100644 --- a/examples/rp/src/bin/spi_display.rs +++ b/examples/rp/src/bin/spi_display.rs | |||
| @@ -12,7 +12,6 @@ use defmt::*; | |||
| 12 | use display_interface_spi::SPIInterfaceNoCS; | 12 | use display_interface_spi::SPIInterfaceNoCS; |
| 13 | use embassy::executor::Spawner; | 13 | use embassy::executor::Spawner; |
| 14 | use embassy::time::Delay; | 14 | use embassy::time::Delay; |
| 15 | use embassy_rp::gpio::NoPin; | ||
| 16 | use embassy_rp::peripherals; | 15 | use embassy_rp::peripherals; |
| 17 | use embassy_rp::spi; | 16 | use embassy_rp::spi; |
| 18 | use embassy_rp::spi::Spi; | 17 | use embassy_rp::spi::Spi; |
| @@ -49,7 +48,7 @@ async fn main(_spawner: Spawner, p: Peripherals) { | |||
| 49 | 48 | ||
| 50 | let spi = RefCell::new(SpiState { | 49 | let spi = RefCell::new(SpiState { |
| 51 | last_mode: SpiMode::Display, | 50 | last_mode: SpiMode::Display, |
| 52 | spi: Spi::new(p.SPI1, clk, mosi, miso, NoPin, config), | 51 | spi: Spi::new(p.SPI1, clk, mosi, miso, config), |
| 53 | display_cs: Output::new(display_cs, Level::Low), | 52 | display_cs: Output::new(display_cs, Level::Low), |
| 54 | }); | 53 | }); |
| 55 | 54 | ||
