diff options
Diffstat (limited to 'examples/nrf52840/src/bin/wifi_esp_hosted.rs')
| -rw-r--r-- | examples/nrf52840/src/bin/wifi_esp_hosted.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/nrf52840/src/bin/wifi_esp_hosted.rs b/examples/nrf52840/src/bin/wifi_esp_hosted.rs index 4eb31b105..f7496703c 100644 --- a/examples/nrf52840/src/bin/wifi_esp_hosted.rs +++ b/examples/nrf52840/src/bin/wifi_esp_hosted.rs | |||
| @@ -10,6 +10,7 @@ use embassy_nrf::gpio::{AnyPin, Input, Level, Output, OutputDrive, Pin, Pull}; | |||
| 10 | use embassy_nrf::rng::Rng; | 10 | use embassy_nrf::rng::Rng; |
| 11 | use embassy_nrf::spim::{self, Spim}; | 11 | use embassy_nrf::spim::{self, Spim}; |
| 12 | use embassy_nrf::{bind_interrupts, peripherals}; | 12 | use embassy_nrf::{bind_interrupts, peripherals}; |
| 13 | use embassy_time::Delay; | ||
| 13 | use embedded_hal_async::spi::ExclusiveDevice; | 14 | use embedded_hal_async::spi::ExclusiveDevice; |
| 14 | use embedded_io::asynch::Write; | 15 | use embedded_io::asynch::Write; |
| 15 | use static_cell::make_static; | 16 | use static_cell::make_static; |
| @@ -24,7 +25,7 @@ bind_interrupts!(struct Irqs { | |||
| 24 | async fn wifi_task( | 25 | async fn wifi_task( |
| 25 | runner: hosted::Runner< | 26 | runner: hosted::Runner< |
| 26 | 'static, | 27 | 'static, |
| 27 | ExclusiveDevice<Spim<'static, peripherals::SPI3>, Output<'static, peripherals::P0_31>>, | 28 | ExclusiveDevice<Spim<'static, peripherals::SPI3>, Output<'static, peripherals::P0_31>, Delay>, |
| 28 | Input<'static, AnyPin>, | 29 | Input<'static, AnyPin>, |
| 29 | Output<'static, peripherals::P1_05>, | 30 | Output<'static, peripherals::P1_05>, |
| 30 | >, | 31 | >, |
| @@ -55,7 +56,7 @@ async fn main(spawner: Spawner) { | |||
| 55 | config.frequency = spim::Frequency::M32; | 56 | config.frequency = spim::Frequency::M32; |
| 56 | config.mode = spim::MODE_2; // !!! | 57 | config.mode = spim::MODE_2; // !!! |
| 57 | let spi = spim::Spim::new(p.SPI3, Irqs, sck, miso, mosi, config); | 58 | let spi = spim::Spim::new(p.SPI3, Irqs, sck, miso, mosi, config); |
| 58 | let spi = ExclusiveDevice::new(spi, cs); | 59 | let spi = ExclusiveDevice::new(spi, cs, Delay); |
| 59 | 60 | ||
| 60 | let (device, mut control, runner) = embassy_net_esp_hosted::new( | 61 | let (device, mut control, runner) = embassy_net_esp_hosted::new( |
| 61 | make_static!(embassy_net_esp_hosted::State::new()), | 62 | make_static!(embassy_net_esp_hosted::State::new()), |
