aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-12-29 10:06:04 +0000
committerGitHub <[email protected]>2024-12-29 10:06:04 +0000
commita4f8fddd696ca2e3705827ba4b3806cbadcb3134 (patch)
tree925e892810046ee6fe690df851a3dd06a6369bf8 /tests
parent509c60b41fe7a04de72cf63ebe6ed4e7bcde8033 (diff)
parent147fd60255a94292a2e0e685c0cad068cc7760e7 (diff)
Merge pull request #3691 from fatfingers23/feature/rm2_feature_flag
cyw43-Pio: Add pio clock divider as a param for new
Diffstat (limited to 'tests')
-rw-r--r--tests/rp/Cargo.toml2
-rw-r--r--tests/rp/src/bin/cyw43-perf.rs13
2 files changed, 12 insertions, 3 deletions
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml
index d5aabc6ac..842cdf51d 100644
--- a/tests/rp/Cargo.toml
+++ b/tests/rp/Cargo.toml
@@ -16,7 +16,7 @@ embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defm
16embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } 16embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] }
17embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal/"} 17embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal/"}
18cyw43 = { path = "../../cyw43", features = ["defmt", "firmware-logs"] } 18cyw43 = { path = "../../cyw43", features = ["defmt", "firmware-logs"] }
19cyw43-pio = { path = "../../cyw43-pio", features = ["defmt", "overclock"] } 19cyw43-pio = { path = "../../cyw43-pio", features = ["defmt"] }
20perf-client = { path = "../perf-client" } 20perf-client = { path = "../perf-client" }
21 21
22defmt = "0.3.0" 22defmt = "0.3.0"
diff --git a/tests/rp/src/bin/cyw43-perf.rs b/tests/rp/src/bin/cyw43-perf.rs
index 30e4afb07..34119722b 100644
--- a/tests/rp/src/bin/cyw43-perf.rs
+++ b/tests/rp/src/bin/cyw43-perf.rs
@@ -3,7 +3,7 @@
3teleprobe_meta::target!(b"rpi-pico"); 3teleprobe_meta::target!(b"rpi-pico");
4 4
5use cyw43::JoinOptions; 5use cyw43::JoinOptions;
6use cyw43_pio::PioSpi; 6use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER};
7use defmt::{panic, *}; 7use defmt::{panic, *};
8use embassy_executor::Spawner; 8use embassy_executor::Spawner;
9use embassy_net::{Config, StackResources}; 9use embassy_net::{Config, StackResources};
@@ -54,7 +54,16 @@ async fn main(spawner: Spawner) {
54 let pwr = Output::new(p.PIN_23, Level::Low); 54 let pwr = Output::new(p.PIN_23, Level::Low);
55 let cs = Output::new(p.PIN_25, Level::High); 55 let cs = Output::new(p.PIN_25, Level::High);
56 let mut pio = Pio::new(p.PIO0, Irqs); 56 let mut pio = Pio::new(p.PIO0, Irqs);
57 let spi = PioSpi::new(&mut pio.common, pio.sm0, pio.irq0, cs, p.PIN_24, p.PIN_29, p.DMA_CH0); 57 let spi = PioSpi::new(
58 &mut pio.common,
59 pio.sm0,
60 DEFAULT_CLOCK_DIVIDER,
61 pio.irq0,
62 cs,
63 p.PIN_24,
64 p.PIN_29,
65 p.DMA_CH0,
66 );
58 67
59 static STATE: StaticCell<cyw43::State> = StaticCell::new(); 68 static STATE: StaticCell<cyw43::State> = StaticCell::new();
60 let state = STATE.init(cyw43::State::new()); 69 let state = STATE.init(cyw43::State::new());