diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-02-12 00:46:40 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-12 00:46:40 +0000 |
| commit | f2eb4389055ae6cf135168c1e5cb6ccd27800d63 (patch) | |
| tree | 36b2595c7fbb88ce4a4996be1cf62d6e64d76894 /examples | |
| parent | e728a32672d9cb108d73ba017a6a153dbc6c2d15 (diff) | |
| parent | 0c9b1abb67f34474c83e7b41f65615ebc1b9f54f (diff) | |
Merge #615
615: rp: remove OptionalPin r=Dirbaio a=Dirbaio
Mirror of https://github.com/embassy-rs/embassy/pull/605 for rp2040
Co-authored-by: Dario Nieuwenhuis <[email protected]>
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 | ||
