aboutsummaryrefslogtreecommitdiff
path: root/tests/nrf/src/bin
diff options
context:
space:
mode:
authorRaul Alimbekov <[email protected]>2025-12-16 09:05:22 +0300
committerGitHub <[email protected]>2025-12-16 09:05:22 +0300
commitc9a04b4b732b7a3b696eb8223664c1a7942b1875 (patch)
tree6dbe5c02e66eed8d8762f13f95afd24f8db2b38c /tests/nrf/src/bin
parentcde24a3ef1117653ba5ed4184102b33f745782fb (diff)
parent5ae6e060ec1c90561719aabdc29d5b6e7b8b0a82 (diff)
Merge branch 'main' into main
Diffstat (limited to 'tests/nrf/src/bin')
-rw-r--r--tests/nrf/src/bin/buffered_uart_spam.rs10
-rw-r--r--tests/nrf/src/bin/wifi_esp_hosted_perf.rs15
2 files changed, 10 insertions, 15 deletions
diff --git a/tests/nrf/src/bin/buffered_uart_spam.rs b/tests/nrf/src/bin/buffered_uart_spam.rs
index 24ddd06f3..6d862e19d 100644
--- a/tests/nrf/src/bin/buffered_uart_spam.rs
+++ b/tests/nrf/src/bin/buffered_uart_spam.rs
@@ -55,14 +55,14 @@ async fn main(_spawner: Spawner) {
55 static mut TX_BUF: [u8; NSPAM] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; 55 static mut TX_BUF: [u8; NSPAM] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
56 let _spam = UarteTx::new(peri!(p, UART1), irqs!(UART1), peri!(p, PIN_A), config.clone()); 56 let _spam = UarteTx::new(peri!(p, UART1), irqs!(UART1), peri!(p, PIN_A), config.clone());
57 let spam_peri = pac::UARTE1; 57 let spam_peri = pac::UARTE1;
58 let event = unsafe { Event::new_unchecked(NonNull::new_unchecked(spam_peri.events_endtx().as_ptr())) }; 58 let event = unsafe { Event::new_unchecked(NonNull::new_unchecked(spam_peri.events_dma().tx().end().as_ptr())) };
59 let task = unsafe { Task::new_unchecked(NonNull::new_unchecked(spam_peri.tasks_starttx().as_ptr())) }; 59 let task = unsafe { Task::new_unchecked(NonNull::new_unchecked(spam_peri.tasks_dma().tx().start().as_ptr())) };
60 let mut spam_ppi = Ppi::new_one_to_one(p.PPI_CH2, event, task); 60 let mut spam_ppi = Ppi::new_one_to_one(p.PPI_CH2, event, task);
61 spam_ppi.enable(); 61 spam_ppi.enable();
62 let p = (&raw mut TX_BUF) as *mut u8; 62 let p = (&raw mut TX_BUF) as *mut u8;
63 spam_peri.txd().ptr().write_value(p as u32); 63 spam_peri.dma().tx().ptr().write_value(p as u32);
64 spam_peri.txd().maxcnt().write(|w| w.set_maxcnt(NSPAM as _)); 64 spam_peri.dma().tx().maxcnt().write(|w| w.set_maxcnt(NSPAM as _));
65 spam_peri.tasks_starttx().write_value(1); 65 spam_peri.tasks_dma().tx().start().write_value(1);
66 66
67 let mut i = 0; 67 let mut i = 0;
68 let mut total = 0; 68 let mut total = 0;
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