From ee0ebe3121e5d51240e671d8c5cc19ad878b9db9 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 22 Jan 2024 21:30:29 +0100 Subject: rp/gpio: remove generics. --- examples/rp/src/bin/blinky_two_tasks.rs | 2 +- examples/rp/src/bin/ethernet_w5500_multisocket.rs | 8 ++++---- examples/rp/src/bin/ethernet_w5500_tcp_client.rs | 8 ++++---- examples/rp/src/bin/ethernet_w5500_tcp_server.rs | 8 ++++---- examples/rp/src/bin/ethernet_w5500_udp.rs | 8 ++++---- examples/rp/src/bin/multicore.rs | 3 +-- examples/rp/src/bin/wifi_ap_tcp_server.rs | 6 ++---- examples/rp/src/bin/wifi_blinky.rs | 6 ++---- examples/rp/src/bin/wifi_scan.rs | 6 ++---- examples/rp/src/bin/wifi_tcp_server.rs | 6 ++---- 10 files changed, 26 insertions(+), 35 deletions(-) (limited to 'examples') diff --git a/examples/rp/src/bin/blinky_two_tasks.rs b/examples/rp/src/bin/blinky_two_tasks.rs index a03f3a592..a57b513d6 100644 --- a/examples/rp/src/bin/blinky_two_tasks.rs +++ b/examples/rp/src/bin/blinky_two_tasks.rs @@ -14,7 +14,7 @@ use embassy_time::{Duration, Ticker}; use gpio::{AnyPin, Level, Output}; use {defmt_rtt as _, panic_probe as _}; -type LedType = Mutex>>; +type LedType = Mutex>>; static LED: LedType = Mutex::new(None); #[embassy_executor::main] diff --git a/examples/rp/src/bin/ethernet_w5500_multisocket.rs b/examples/rp/src/bin/ethernet_w5500_multisocket.rs index a16ea0007..bd52cadca 100644 --- a/examples/rp/src/bin/ethernet_w5500_multisocket.rs +++ b/examples/rp/src/bin/ethernet_w5500_multisocket.rs @@ -13,7 +13,7 @@ use embassy_net_wiznet::chip::W5500; use embassy_net_wiznet::*; use embassy_rp::clocks::RoscRng; use embassy_rp::gpio::{Input, Level, Output, Pull}; -use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; +use embassy_rp::peripherals::SPI0; use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; use embassy_time::{Delay, Duration}; use embedded_hal_bus::spi::ExclusiveDevice; @@ -27,9 +27,9 @@ async fn ethernet_task( runner: Runner< 'static, W5500, - ExclusiveDevice, Output<'static, PIN_17>, Delay>, - Input<'static, PIN_21>, - Output<'static, PIN_20>, + ExclusiveDevice, Output<'static>, Delay>, + Input<'static>, + Output<'static>, >, ) -> ! { runner.run().await diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs index 975b3d385..3e4fbd2e6 100644 --- a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs +++ b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs @@ -15,7 +15,7 @@ use embassy_net_wiznet::chip::W5500; use embassy_net_wiznet::*; use embassy_rp::clocks::RoscRng; use embassy_rp::gpio::{Input, Level, Output, Pull}; -use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; +use embassy_rp::peripherals::SPI0; use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; use embassy_time::{Delay, Duration, Timer}; use embedded_hal_bus::spi::ExclusiveDevice; @@ -29,9 +29,9 @@ async fn ethernet_task( runner: Runner< 'static, W5500, - ExclusiveDevice, Output<'static, PIN_17>, Delay>, - Input<'static, PIN_21>, - Output<'static, PIN_20>, + ExclusiveDevice, Output<'static>, Delay>, + Input<'static>, + Output<'static>, >, ) -> ! { runner.run().await diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs index 489af2c76..5532851f3 100644 --- a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs +++ b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs @@ -14,7 +14,7 @@ use embassy_net_wiznet::chip::W5500; use embassy_net_wiznet::*; use embassy_rp::clocks::RoscRng; use embassy_rp::gpio::{Input, Level, Output, Pull}; -use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; +use embassy_rp::peripherals::SPI0; use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; use embassy_time::{Delay, Duration}; use embedded_hal_bus::spi::ExclusiveDevice; @@ -28,9 +28,9 @@ async fn ethernet_task( runner: Runner< 'static, W5500, - ExclusiveDevice, Output<'static, PIN_17>, Delay>, - Input<'static, PIN_21>, - Output<'static, PIN_20>, + ExclusiveDevice, Output<'static>, Delay>, + Input<'static>, + Output<'static>, >, ) -> ! { runner.run().await diff --git a/examples/rp/src/bin/ethernet_w5500_udp.rs b/examples/rp/src/bin/ethernet_w5500_udp.rs index 41bd7d077..adb1d8941 100644 --- a/examples/rp/src/bin/ethernet_w5500_udp.rs +++ b/examples/rp/src/bin/ethernet_w5500_udp.rs @@ -14,7 +14,7 @@ use embassy_net_wiznet::chip::W5500; use embassy_net_wiznet::*; use embassy_rp::clocks::RoscRng; use embassy_rp::gpio::{Input, Level, Output, Pull}; -use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; +use embassy_rp::peripherals::SPI0; use embassy_rp::spi::{Async, Config as SpiConfig, Spi}; use embassy_time::Delay; use embedded_hal_bus::spi::ExclusiveDevice; @@ -27,9 +27,9 @@ async fn ethernet_task( runner: Runner< 'static, W5500, - ExclusiveDevice, Output<'static, PIN_17>, Delay>, - Input<'static, PIN_21>, - Output<'static, PIN_20>, + ExclusiveDevice, Output<'static>, Delay>, + Input<'static>, + Output<'static>, >, ) -> ! { runner.run().await diff --git a/examples/rp/src/bin/multicore.rs b/examples/rp/src/bin/multicore.rs index a1678d99a..c7b087476 100644 --- a/examples/rp/src/bin/multicore.rs +++ b/examples/rp/src/bin/multicore.rs @@ -9,7 +9,6 @@ use defmt::*; use embassy_executor::Executor; use embassy_rp::gpio::{Level, Output}; use embassy_rp::multicore::{spawn_core1, Stack}; -use embassy_rp::peripherals::PIN_25; use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; use embassy_sync::channel::Channel; use embassy_time::Timer; @@ -52,7 +51,7 @@ async fn core0_task() { } #[embassy_executor::task] -async fn core1_task(mut led: Output<'static, PIN_25>) { +async fn core1_task(mut led: Output<'static>) { info!("Hello from core 1"); loop { match CHANNEL.receive().await { diff --git a/examples/rp/src/bin/wifi_ap_tcp_server.rs b/examples/rp/src/bin/wifi_ap_tcp_server.rs index 1bd75607e..b60852359 100644 --- a/examples/rp/src/bin/wifi_ap_tcp_server.rs +++ b/examples/rp/src/bin/wifi_ap_tcp_server.rs @@ -14,7 +14,7 @@ use embassy_net::tcp::TcpSocket; use embassy_net::{Config, Stack, StackResources}; use embassy_rp::bind_interrupts; use embassy_rp::gpio::{Level, Output}; -use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; +use embassy_rp::peripherals::{DMA_CH0, PIO0}; use embassy_rp::pio::{InterruptHandler, Pio}; use embassy_time::Duration; use embedded_io_async::Write; @@ -26,9 +26,7 @@ bind_interrupts!(struct Irqs { }); #[embassy_executor::task] -async fn wifi_task( - runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>, -) -> ! { +async fn wifi_task(runner: cyw43::Runner<'static, Output<'static>, PioSpi<'static, PIO0, 0, DMA_CH0>>) -> ! { runner.run().await } diff --git a/examples/rp/src/bin/wifi_blinky.rs b/examples/rp/src/bin/wifi_blinky.rs index 1ed74993c..18eefe41f 100644 --- a/examples/rp/src/bin/wifi_blinky.rs +++ b/examples/rp/src/bin/wifi_blinky.rs @@ -10,7 +10,7 @@ use defmt::*; use embassy_executor::Spawner; use embassy_rp::bind_interrupts; use embassy_rp::gpio::{Level, Output}; -use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; +use embassy_rp::peripherals::{DMA_CH0, PIO0}; use embassy_rp::pio::{InterruptHandler, Pio}; use embassy_time::{Duration, Timer}; use static_cell::StaticCell; @@ -21,9 +21,7 @@ bind_interrupts!(struct Irqs { }); #[embassy_executor::task] -async fn wifi_task( - runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>, -) -> ! { +async fn wifi_task(runner: cyw43::Runner<'static, Output<'static>, PioSpi<'static, PIO0, 0, DMA_CH0>>) -> ! { runner.run().await } diff --git a/examples/rp/src/bin/wifi_scan.rs b/examples/rp/src/bin/wifi_scan.rs index e678209dd..e0f85a6b0 100644 --- a/examples/rp/src/bin/wifi_scan.rs +++ b/examples/rp/src/bin/wifi_scan.rs @@ -13,7 +13,7 @@ use embassy_executor::Spawner; use embassy_net::Stack; use embassy_rp::bind_interrupts; use embassy_rp::gpio::{Level, Output}; -use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; +use embassy_rp::peripherals::{DMA_CH0, PIO0}; use embassy_rp::pio::{InterruptHandler, Pio}; use static_cell::StaticCell; use {defmt_rtt as _, panic_probe as _}; @@ -23,9 +23,7 @@ bind_interrupts!(struct Irqs { }); #[embassy_executor::task] -async fn wifi_task( - runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>, -) -> ! { +async fn wifi_task(runner: cyw43::Runner<'static, Output<'static>, PioSpi<'static, PIO0, 0, DMA_CH0>>) -> ! { runner.run().await } diff --git a/examples/rp/src/bin/wifi_tcp_server.rs b/examples/rp/src/bin/wifi_tcp_server.rs index c346f1ded..f1afc4a00 100644 --- a/examples/rp/src/bin/wifi_tcp_server.rs +++ b/examples/rp/src/bin/wifi_tcp_server.rs @@ -14,7 +14,7 @@ use embassy_net::tcp::TcpSocket; use embassy_net::{Config, Stack, StackResources}; use embassy_rp::bind_interrupts; use embassy_rp::gpio::{Level, Output}; -use embassy_rp::peripherals::{DMA_CH0, PIN_23, PIN_25, PIO0}; +use embassy_rp::peripherals::{DMA_CH0, PIO0}; use embassy_rp::pio::{InterruptHandler, Pio}; use embassy_time::{Duration, Timer}; use embedded_io_async::Write; @@ -29,9 +29,7 @@ const WIFI_NETWORK: &str = "EmbassyTest"; const WIFI_PASSWORD: &str = "V8YxhKt5CdIAJFud"; #[embassy_executor::task] -async fn wifi_task( - runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>, -) -> ! { +async fn wifi_task(runner: cyw43::Runner<'static, Output<'static>, PioSpi<'static, PIO0, 0, DMA_CH0>>) -> ! { runner.run().await } -- cgit