aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-10-29 17:49:55 +0100
committerDario Nieuwenhuis <[email protected]>2025-10-29 19:33:41 +0100
commit98de11e5e3ae437676198a105ffab8c0f4977513 (patch)
tree227599f3b7ee23d892491ccdbfe428babfaa16f2 /tests
parent1bbf35bdf47fa031181a8e8539f0641585672c81 (diff)
net-esp-hosted: add Interface trait.
Diffstat (limited to 'tests')
-rw-r--r--tests/nrf/src/bin/wifi_esp_hosted_perf.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/nrf/src/bin/wifi_esp_hosted_perf.rs b/tests/nrf/src/bin/wifi_esp_hosted_perf.rs
index 091a70ce9..ac082dbb8 100644
--- a/tests/nrf/src/bin/wifi_esp_hosted_perf.rs
+++ b/tests/nrf/src/bin/wifi_esp_hosted_perf.rs
@@ -29,8 +29,7 @@ const WIFI_PASSWORD: &str = "V8YxhKt5CdIAJFud";
29async fn wifi_task( 29async fn wifi_task(
30 runner: hosted::Runner< 30 runner: hosted::Runner<
31 'static, 31 'static,
32 ExclusiveDevice<Spim<'static>, Output<'static>, Delay>, 32 hosted::SpiInterface<ExclusiveDevice<Spim<'static>, Output<'static>, Delay>, Input<'static>>,
33 Input<'static>,
34 Output<'static>, 33 Output<'static>,
35 >, 34 >,
36) -> ! { 35) -> ! {
@@ -64,15 +63,11 @@ async fn main(spawner: Spawner) {
64 let spi = spim::Spim::new(p.SPI3, Irqs, sck, miso, mosi, config); 63 let spi = spim::Spim::new(p.SPI3, Irqs, sck, miso, mosi, config);
65 let spi = ExclusiveDevice::new(spi, cs, Delay); 64 let spi = ExclusiveDevice::new(spi, cs, Delay);
66 65
66 let iface = hosted::SpiInterface::new(spi, handshake, ready);
67
67 static STATE: StaticCell<embassy_net_esp_hosted::State> = StaticCell::new(); 68 static STATE: StaticCell<embassy_net_esp_hosted::State> = StaticCell::new();
68 let (device, mut control, runner) = embassy_net_esp_hosted::new( 69 let (device, mut control, runner) =
69 STATE.init(embassy_net_esp_hosted::State::new()), 70 embassy_net_esp_hosted::new(STATE.init(embassy_net_esp_hosted::State::new()), iface, reset).await;
70 spi,
71 handshake,
72 ready,
73 reset,
74 )
75 .await;
76 71
77 spawner.spawn(unwrap!(wifi_task(runner))); 72 spawner.spawn(unwrap!(wifi_task(runner)));
78 73