diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-08-16 17:51:47 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-08-16 17:51:47 +0200 |
| commit | 8a9f49c163f2e559c87e54b7abf819ea026f04f6 (patch) | |
| tree | 1acaa8e0dea77072969ab6ed9312b79976744232 | |
| parent | f26dd54f6378be87a71f0c9f351b56851df96014 (diff) | |
net-wiznet: add HIL test using w5100s.
| -rw-r--r-- | tests/rp/Cargo.toml | 5 | ||||
| -rw-r--r-- | tests/rp/src/bin/adc.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/cyw43-perf.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/dma_copy_async.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/ethernet_w5100s_perf.rs | 249 | ||||
| -rw-r--r-- | tests/rp/src/bin/flash.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/float.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/gpio.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/gpio_async.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/gpio_multicore.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/multicore.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/pio_irq.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/pio_multi_load.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/pwm.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/spi.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/spi_async.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/uart.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/uart_buffered.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/uart_dma.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/bin/uart_upgrade.rs | 3 | ||||
| -rw-r--r-- | tests/rp/src/common.rs | 1 |
21 files changed, 271 insertions, 38 deletions
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index c69bf7a88..6a3df4b9c 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml | |||
| @@ -9,10 +9,11 @@ teleprobe-meta = "1.1" | |||
| 9 | 9 | ||
| 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt"] } | 12 | embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits"] } |
| 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "time-driver", "critical-section-impl", "intrinsics", "rom-v2-intrinsics", "run-from-ram"] } | 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "time-driver", "critical-section-impl", "intrinsics", "rom-v2-intrinsics", "run-from-ram"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"] } | 15 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"] } |
| 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } | ||
| 16 | cyw43 = { path = "../../cyw43", features = ["defmt", "firmware-logs"] } | 17 | cyw43 = { path = "../../cyw43", features = ["defmt", "firmware-logs"] } |
| 17 | cyw43-pio = { path = "../../cyw43-pio", features = ["defmt", "overclock"] } | 18 | cyw43-pio = { path = "../../cyw43-pio", features = ["defmt", "overclock"] } |
| 18 | 19 | ||
| @@ -24,6 +25,7 @@ cortex-m-rt = "0.7.0" | |||
| 24 | embedded-hal = "0.2.6" | 25 | embedded-hal = "0.2.6" |
| 25 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } | 26 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" } |
| 26 | embedded-hal-async = { version = "=1.0.0-rc.1" } | 27 | embedded-hal-async = { version = "=1.0.0-rc.1" } |
| 28 | embedded-hal-bus = { version = "=0.1.0-rc.1", features = ["async"] } | ||
| 27 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } | 29 | panic-probe = { version = "0.3.0", features = ["print-defmt"] } |
| 28 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 30 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 29 | embedded-io-async = { version = "0.5.0" } | 31 | embedded-io-async = { version = "0.5.0" } |
| @@ -31,6 +33,7 @@ embedded-storage = { version = "0.3" } | |||
| 31 | static_cell = { version = "1.1", features = ["nightly"]} | 33 | static_cell = { version = "1.1", features = ["nightly"]} |
| 32 | pio = "0.2" | 34 | pio = "0.2" |
| 33 | pio-proc = "0.2" | 35 | pio-proc = "0.2" |
| 36 | rand = { version = "0.8.5", default-features = false } | ||
| 34 | 37 | ||
| 35 | [profile.dev] | 38 | [profile.dev] |
| 36 | debug = 2 | 39 | debug = 2 |
diff --git a/tests/rp/src/bin/adc.rs b/tests/rp/src/bin/adc.rs index b29a3a7cb..0250fd5f4 100644 --- a/tests/rp/src/bin/adc.rs +++ b/tests/rp/src/bin/adc.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::*; | 6 | use defmt::*; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/cyw43-perf.rs b/tests/rp/src/bin/cyw43-perf.rs index fffdabc9b..1c665f95d 100644 --- a/tests/rp/src/bin/cyw43-perf.rs +++ b/tests/rp/src/bin/cyw43-perf.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use cyw43_pio::PioSpi; | 6 | use cyw43_pio::PioSpi; |
| 8 | use defmt::{assert, panic, *}; | 7 | use defmt::{assert, panic, *}; |
diff --git a/tests/rp/src/bin/dma_copy_async.rs b/tests/rp/src/bin/dma_copy_async.rs index 2c0b559a9..b071ed9df 100644 --- a/tests/rp/src/bin/dma_copy_async.rs +++ b/tests/rp/src/bin/dma_copy_async.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{assert_eq, *}; | 6 | use defmt::{assert_eq, *}; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/ethernet_w5100s_perf.rs b/tests/rp/src/bin/ethernet_w5100s_perf.rs new file mode 100644 index 000000000..faa8638c0 --- /dev/null +++ b/tests/rp/src/bin/ethernet_w5100s_perf.rs | |||
| @@ -0,0 +1,249 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![feature(type_alias_impl_trait)] | ||
| 4 | teleprobe_meta::target!(b"w5100s-evb-pico"); | ||
| 5 | teleprobe_meta::timeout!(120); | ||
| 6 | |||
| 7 | use defmt::{assert, *}; | ||
| 8 | use embassy_executor::Spawner; | ||
| 9 | use embassy_futures::join::join; | ||
| 10 | use embassy_net::tcp::TcpSocket; | ||
| 11 | use embassy_net::{Ipv4Address, Stack, StackResources}; | ||
| 12 | use embassy_net_wiznet::chip::W5100S; | ||
| 13 | use embassy_net_wiznet::*; | ||
| 14 | use embassy_rp::clocks::RoscRng; | ||
| 15 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | ||
| 16 | use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; | ||
| 17 | use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; | ||
| 18 | use embassy_time::{with_timeout, Delay, Duration, Timer}; | ||
| 19 | use embedded_hal_bus::spi::ExclusiveDevice; | ||
| 20 | use rand::RngCore; | ||
| 21 | use static_cell::make_static; | ||
| 22 | use {defmt_rtt as _, panic_probe as _}; | ||
| 23 | |||
| 24 | #[embassy_executor::task] | ||
| 25 | async fn ethernet_task( | ||
| 26 | runner: Runner< | ||
| 27 | 'static, | ||
| 28 | W5100S, | ||
| 29 | ExclusiveDevice<Spi<'static, SPI0, Async>, Output<'static, PIN_17>, Delay>, | ||
| 30 | Input<'static, PIN_21>, | ||
| 31 | Output<'static, PIN_20>, | ||
| 32 | >, | ||
| 33 | ) -> ! { | ||
| 34 | runner.run().await | ||
| 35 | } | ||
| 36 | |||
| 37 | #[embassy_executor::task] | ||
| 38 | async fn net_task(stack: &'static Stack<Device<'static>>) -> ! { | ||
| 39 | stack.run().await | ||
| 40 | } | ||
| 41 | |||
| 42 | #[embassy_executor::main] | ||
| 43 | async fn main(spawner: Spawner) { | ||
| 44 | let p = embassy_rp::init(Default::default()); | ||
| 45 | let mut rng = RoscRng; | ||
| 46 | |||
| 47 | let mut spi_cfg = SpiConfig::default(); | ||
| 48 | spi_cfg.frequency = 50_000_000; | ||
| 49 | let (miso, mosi, clk) = (p.PIN_16, p.PIN_19, p.PIN_18); | ||
| 50 | let spi = Spi::new(p.SPI0, clk, mosi, miso, p.DMA_CH0, p.DMA_CH1, spi_cfg); | ||
| 51 | let cs = Output::new(p.PIN_17, Level::High); | ||
| 52 | let w5500_int = Input::new(p.PIN_21, Pull::Up); | ||
| 53 | let w5500_reset = Output::new(p.PIN_20, Level::High); | ||
| 54 | |||
| 55 | let mac_addr = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00]; | ||
| 56 | let state = make_static!(State::<8, 8>::new()); | ||
| 57 | let (device, runner) = embassy_net_wiznet::new( | ||
| 58 | mac_addr, | ||
| 59 | state, | ||
| 60 | ExclusiveDevice::new(spi, cs, Delay), | ||
| 61 | w5500_int, | ||
| 62 | w5500_reset, | ||
| 63 | ) | ||
| 64 | .await; | ||
| 65 | unwrap!(spawner.spawn(ethernet_task(runner))); | ||
| 66 | |||
| 67 | // Generate random seed | ||
| 68 | let seed = rng.next_u64(); | ||
| 69 | |||
| 70 | // Init network stack | ||
| 71 | let stack = &*make_static!(Stack::new( | ||
| 72 | device, | ||
| 73 | embassy_net::Config::dhcpv4(Default::default()), | ||
| 74 | make_static!(StackResources::<2>::new()), | ||
| 75 | seed | ||
| 76 | )); | ||
| 77 | |||
| 78 | // Launch network task | ||
| 79 | unwrap!(spawner.spawn(net_task(&stack))); | ||
| 80 | |||
| 81 | info!("Waiting for DHCP up..."); | ||
| 82 | while stack.config_v4().is_none() { | ||
| 83 | Timer::after(Duration::from_millis(100)).await; | ||
| 84 | } | ||
| 85 | info!("IP addressing up!"); | ||
| 86 | |||
| 87 | let down = test_download(stack).await; | ||
| 88 | let up = test_upload(stack).await; | ||
| 89 | let updown = test_upload_download(stack).await; | ||
| 90 | |||
| 91 | assert!(down > TEST_EXPECTED_DOWNLOAD_KBPS); | ||
| 92 | assert!(up > TEST_EXPECTED_UPLOAD_KBPS); | ||
| 93 | assert!(updown > TEST_EXPECTED_UPLOAD_DOWNLOAD_KBPS); | ||
| 94 | |||
| 95 | info!("Test OK"); | ||
| 96 | cortex_m::asm::bkpt(); | ||
| 97 | } | ||
| 98 | |||
| 99 | const TEST_DURATION: usize = 10; | ||
| 100 | const TEST_EXPECTED_DOWNLOAD_KBPS: usize = 500; | ||
| 101 | const TEST_EXPECTED_UPLOAD_KBPS: usize = 500; | ||
| 102 | const TEST_EXPECTED_UPLOAD_DOWNLOAD_KBPS: usize = 300; | ||
| 103 | const RX_BUFFER_SIZE: usize = 4096; | ||
| 104 | const TX_BUFFER_SIZE: usize = 4096; | ||
| 105 | const SERVER_ADDRESS: Ipv4Address = Ipv4Address::new(192, 168, 2, 2); | ||
| 106 | const DOWNLOAD_PORT: u16 = 4321; | ||
| 107 | const UPLOAD_PORT: u16 = 4322; | ||
| 108 | const UPLOAD_DOWNLOAD_PORT: u16 = 4323; | ||
| 109 | |||
| 110 | async fn test_download(stack: &'static Stack<cyw43::NetDriver<'static>>) -> usize { | ||
| 111 | info!("Testing download..."); | ||
| 112 | |||
| 113 | let mut rx_buffer = [0; RX_BUFFER_SIZE]; | ||
| 114 | let mut tx_buffer = [0; TX_BUFFER_SIZE]; | ||
| 115 | let mut socket = TcpSocket::new(stack, &mut rx_buffer, &mut tx_buffer); | ||
| 116 | socket.set_timeout(Some(Duration::from_secs(10))); | ||
| 117 | |||
| 118 | info!("connecting to {:?}:{}...", SERVER_ADDRESS, DOWNLOAD_PORT); | ||
| 119 | if let Err(e) = socket.connect((SERVER_ADDRESS, DOWNLOAD_PORT)).await { | ||
| 120 | error!("connect error: {:?}", e); | ||
| 121 | return 0; | ||
| 122 | } | ||
| 123 | info!("connected, testing..."); | ||
| 124 | |||
| 125 | let mut rx_buf = [0; 4096]; | ||
| 126 | let mut total: usize = 0; | ||
| 127 | with_timeout(Duration::from_secs(TEST_DURATION as _), async { | ||
| 128 | loop { | ||
| 129 | match socket.read(&mut rx_buf).await { | ||
| 130 | Ok(0) => { | ||
| 131 | error!("read EOF"); | ||
| 132 | return 0; | ||
| 133 | } | ||
| 134 | Ok(n) => total += n, | ||
| 135 | Err(e) => { | ||
| 136 | error!("read error: {:?}", e); | ||
| 137 | return 0; | ||
| 138 | } | ||
| 139 | } | ||
| 140 | } | ||
| 141 | }) | ||
| 142 | .await | ||
| 143 | .ok(); | ||
| 144 | |||
| 145 | let kbps = (total + 512) / 1024 / TEST_DURATION; | ||
| 146 | info!("download: {} kB/s", kbps); | ||
| 147 | kbps | ||
| 148 | } | ||
| 149 | |||
| 150 | async fn test_upload(stack: &'static Stack<cyw43::NetDriver<'static>>) -> usize { | ||
| 151 | info!("Testing upload..."); | ||
| 152 | |||
| 153 | let mut rx_buffer = [0; RX_BUFFER_SIZE]; | ||
| 154 | let mut tx_buffer = [0; TX_BUFFER_SIZE]; | ||
| 155 | let mut socket = TcpSocket::new(stack, &mut rx_buffer, &mut tx_buffer); | ||
| 156 | socket.set_timeout(Some(Duration::from_secs(10))); | ||
| 157 | |||
| 158 | info!("connecting to {:?}:{}...", SERVER_ADDRESS, UPLOAD_PORT); | ||
| 159 | if let Err(e) = socket.connect((SERVER_ADDRESS, UPLOAD_PORT)).await { | ||
| 160 | error!("connect error: {:?}", e); | ||
| 161 | return 0; | ||
| 162 | } | ||
| 163 | info!("connected, testing..."); | ||
| 164 | |||
| 165 | let buf = [0; 4096]; | ||
| 166 | let mut total: usize = 0; | ||
| 167 | with_timeout(Duration::from_secs(TEST_DURATION as _), async { | ||
| 168 | loop { | ||
| 169 | match socket.write(&buf).await { | ||
| 170 | Ok(0) => { | ||
| 171 | error!("write zero?!??!?!"); | ||
| 172 | return 0; | ||
| 173 | } | ||
| 174 | Ok(n) => total += n, | ||
| 175 | Err(e) => { | ||
| 176 | error!("write error: {:?}", e); | ||
| 177 | return 0; | ||
| 178 | } | ||
| 179 | } | ||
| 180 | } | ||
| 181 | }) | ||
| 182 | .await | ||
| 183 | .ok(); | ||
| 184 | |||
| 185 | let kbps = (total + 512) / 1024 / TEST_DURATION; | ||
| 186 | info!("upload: {} kB/s", kbps); | ||
| 187 | kbps | ||
| 188 | } | ||
| 189 | |||
| 190 | async fn test_upload_download(stack: &'static Stack<cyw43::NetDriver<'static>>) -> usize { | ||
| 191 | info!("Testing upload+download..."); | ||
| 192 | |||
| 193 | let mut rx_buffer = [0; RX_BUFFER_SIZE]; | ||
| 194 | let mut tx_buffer = [0; TX_BUFFER_SIZE]; | ||
| 195 | let mut socket = TcpSocket::new(stack, &mut rx_buffer, &mut tx_buffer); | ||
| 196 | socket.set_timeout(Some(Duration::from_secs(10))); | ||
| 197 | |||
| 198 | info!("connecting to {:?}:{}...", SERVER_ADDRESS, UPLOAD_DOWNLOAD_PORT); | ||
| 199 | if let Err(e) = socket.connect((SERVER_ADDRESS, UPLOAD_DOWNLOAD_PORT)).await { | ||
| 200 | error!("connect error: {:?}", e); | ||
| 201 | return 0; | ||
| 202 | } | ||
| 203 | info!("connected, testing..."); | ||
| 204 | |||
| 205 | let (mut reader, mut writer) = socket.split(); | ||
| 206 | |||
| 207 | let tx_buf = [0; 4096]; | ||
| 208 | let mut rx_buf = [0; 4096]; | ||
| 209 | let mut total: usize = 0; | ||
| 210 | let tx_fut = async { | ||
| 211 | loop { | ||
| 212 | match writer.write(&tx_buf).await { | ||
| 213 | Ok(0) => { | ||
| 214 | error!("write zero?!??!?!"); | ||
| 215 | return 0; | ||
| 216 | } | ||
| 217 | Ok(_) => {} | ||
| 218 | Err(e) => { | ||
| 219 | error!("write error: {:?}", e); | ||
| 220 | return 0; | ||
| 221 | } | ||
| 222 | } | ||
| 223 | } | ||
| 224 | }; | ||
| 225 | |||
| 226 | let rx_fut = async { | ||
| 227 | loop { | ||
| 228 | match reader.read(&mut rx_buf).await { | ||
| 229 | Ok(0) => { | ||
| 230 | error!("read EOF"); | ||
| 231 | return 0; | ||
| 232 | } | ||
| 233 | Ok(n) => total += n, | ||
| 234 | Err(e) => { | ||
| 235 | error!("read error: {:?}", e); | ||
| 236 | return 0; | ||
| 237 | } | ||
| 238 | } | ||
| 239 | } | ||
| 240 | }; | ||
| 241 | |||
| 242 | with_timeout(Duration::from_secs(TEST_DURATION as _), join(tx_fut, rx_fut)) | ||
| 243 | .await | ||
| 244 | .ok(); | ||
| 245 | |||
| 246 | let kbps = (total + 512) / 1024 / TEST_DURATION; | ||
| 247 | info!("upload+download: {} kB/s", kbps); | ||
| 248 | kbps | ||
| 249 | } | ||
diff --git a/tests/rp/src/bin/flash.rs b/tests/rp/src/bin/flash.rs index c31d6decf..6e65fbdc0 100644 --- a/tests/rp/src/bin/flash.rs +++ b/tests/rp/src/bin/flash.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::*; | 6 | use defmt::*; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/float.rs b/tests/rp/src/bin/float.rs index 0e0de85fa..2874aa910 100644 --- a/tests/rp/src/bin/float.rs +++ b/tests/rp/src/bin/float.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::*; | 6 | use defmt::*; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/gpio.rs b/tests/rp/src/bin/gpio.rs index 946b7dc88..1a43a9283 100644 --- a/tests/rp/src/bin/gpio.rs +++ b/tests/rp/src/bin/gpio.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{assert, *}; | 6 | use defmt::{assert, *}; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/gpio_async.rs b/tests/rp/src/bin/gpio_async.rs index 532494de5..60c65b7a0 100644 --- a/tests/rp/src/bin/gpio_async.rs +++ b/tests/rp/src/bin/gpio_async.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{assert, *}; | 6 | use defmt::{assert, *}; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/gpio_multicore.rs b/tests/rp/src/bin/gpio_multicore.rs index 780112bc1..22be78248 100644 --- a/tests/rp/src/bin/gpio_multicore.rs +++ b/tests/rp/src/bin/gpio_multicore.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{info, unwrap}; | 6 | use defmt::{info, unwrap}; |
| 8 | use embassy_executor::Executor; | 7 | use embassy_executor::Executor; |
diff --git a/tests/rp/src/bin/multicore.rs b/tests/rp/src/bin/multicore.rs index 114889dec..ec794c48a 100644 --- a/tests/rp/src/bin/multicore.rs +++ b/tests/rp/src/bin/multicore.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{info, unwrap}; | 6 | use defmt::{info, unwrap}; |
| 8 | use embassy_executor::Executor; | 7 | use embassy_executor::Executor; |
diff --git a/tests/rp/src/bin/pio_irq.rs b/tests/rp/src/bin/pio_irq.rs index bdea63eaa..c71e55d91 100644 --- a/tests/rp/src/bin/pio_irq.rs +++ b/tests/rp/src/bin/pio_irq.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::info; | 6 | use defmt::info; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/pio_multi_load.rs b/tests/rp/src/bin/pio_multi_load.rs index 356f16795..6343ff3a9 100644 --- a/tests/rp/src/bin/pio_multi_load.rs +++ b/tests/rp/src/bin/pio_multi_load.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::info; | 6 | use defmt::info; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/pwm.rs b/tests/rp/src/bin/pwm.rs index c71d21ef9..8c02b8441 100644 --- a/tests/rp/src/bin/pwm.rs +++ b/tests/rp/src/bin/pwm.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{assert, assert_eq, assert_ne, *}; | 6 | use defmt::{assert, assert_eq, assert_ne, *}; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/spi.rs b/tests/rp/src/bin/spi.rs index 84dfa5a2c..f347b80ca 100644 --- a/tests/rp/src/bin/spi.rs +++ b/tests/rp/src/bin/spi.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{assert_eq, *}; | 6 | use defmt::{assert_eq, *}; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/spi_async.rs b/tests/rp/src/bin/spi_async.rs index a4080b03d..80d5a7147 100644 --- a/tests/rp/src/bin/spi_async.rs +++ b/tests/rp/src/bin/spi_async.rs | |||
| @@ -4,8 +4,7 @@ | |||
| 4 | #![no_std] | 4 | #![no_std] |
| 5 | #![no_main] | 5 | #![no_main] |
| 6 | #![feature(type_alias_impl_trait)] | 6 | #![feature(type_alias_impl_trait)] |
| 7 | #[path = "../common.rs"] | 7 | teleprobe_meta::target!(b"rpi-pico"); |
| 8 | mod common; | ||
| 9 | 8 | ||
| 10 | use defmt::{assert_eq, *}; | 9 | use defmt::{assert_eq, *}; |
| 11 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/uart.rs b/tests/rp/src/bin/uart.rs index 2331c7d36..00f3e1949 100644 --- a/tests/rp/src/bin/uart.rs +++ b/tests/rp/src/bin/uart.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{assert_eq, *}; | 6 | use defmt::{assert_eq, *}; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/uart_buffered.rs b/tests/rp/src/bin/uart_buffered.rs index edabf55b7..6ab7de29e 100644 --- a/tests/rp/src/bin/uart_buffered.rs +++ b/tests/rp/src/bin/uart_buffered.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{assert_eq, panic, *}; | 6 | use defmt::{assert_eq, panic, *}; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/uart_dma.rs b/tests/rp/src/bin/uart_dma.rs index fee6c825d..cd4af1ef2 100644 --- a/tests/rp/src/bin/uart_dma.rs +++ b/tests/rp/src/bin/uart_dma.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{assert_eq, *}; | 6 | use defmt::{assert_eq, *}; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/bin/uart_upgrade.rs b/tests/rp/src/bin/uart_upgrade.rs index effd0bc49..c07fc08cd 100644 --- a/tests/rp/src/bin/uart_upgrade.rs +++ b/tests/rp/src/bin/uart_upgrade.rs | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | #[path = "../common.rs"] | 4 | teleprobe_meta::target!(b"rpi-pico"); |
| 5 | mod common; | ||
| 6 | 5 | ||
| 7 | use defmt::{assert_eq, *}; | 6 | use defmt::{assert_eq, *}; |
| 8 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
diff --git a/tests/rp/src/common.rs b/tests/rp/src/common.rs deleted file mode 100644 index 955674f27..000000000 --- a/tests/rp/src/common.rs +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | teleprobe_meta::target!(b"rpi-pico"); | ||
