diff options
Diffstat (limited to 'examples/rp/src')
25 files changed, 32 insertions, 36 deletions
diff --git a/examples/rp/src/bin/assign_resources.rs b/examples/rp/src/bin/assign_resources.rs index 4ee4278b5..aaa134768 100644 --- a/examples/rp/src/bin/assign_resources.rs +++ b/examples/rp/src/bin/assign_resources.rs | |||
| @@ -14,9 +14,9 @@ | |||
| 14 | use assign_resources::assign_resources; | 14 | use assign_resources::assign_resources; |
| 15 | use defmt::*; | 15 | use defmt::*; |
| 16 | use embassy_executor::Spawner; | 16 | use embassy_executor::Spawner; |
| 17 | use embassy_rp::Peri; | ||
| 17 | use embassy_rp::gpio::{Level, Output}; | 18 | use embassy_rp::gpio::{Level, Output}; |
| 18 | use embassy_rp::peripherals::{self, PIN_20, PIN_21}; | 19 | use embassy_rp::peripherals::{self, PIN_20, PIN_21}; |
| 19 | use embassy_rp::Peri; | ||
| 20 | use embassy_time::Timer; | 20 | use embassy_time::Timer; |
| 21 | use {defmt_rtt as _, panic_probe as _}; | 21 | use {defmt_rtt as _, panic_probe as _}; |
| 22 | 22 | ||
diff --git a/examples/rp/src/bin/debounce.rs b/examples/rp/src/bin/debounce.rs index 0077f19fc..6eeb01d0a 100644 --- a/examples/rp/src/bin/debounce.rs +++ b/examples/rp/src/bin/debounce.rs | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | use defmt::info; | 7 | use defmt::info; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::gpio::{Input, Level, Pull}; | 9 | use embassy_rp::gpio::{Input, Level, Pull}; |
| 10 | use embassy_time::{with_deadline, Duration, Instant, Timer}; | 10 | use embassy_time::{Duration, Instant, Timer, with_deadline}; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 12 | ||
| 13 | pub struct Debouncer<'a> { | 13 | pub struct Debouncer<'a> { |
diff --git a/examples/rp/src/bin/ethernet_w5500_icmp_ping.rs b/examples/rp/src/bin/ethernet_w5500_icmp_ping.rs index 49d28071a..cb667f24f 100644 --- a/examples/rp/src/bin/ethernet_w5500_icmp_ping.rs +++ b/examples/rp/src/bin/ethernet_w5500_icmp_ping.rs | |||
| @@ -12,8 +12,8 @@ use core::str::FromStr; | |||
| 12 | use defmt::*; | 12 | use defmt::*; |
| 13 | use embassy_executor::Spawner; | 13 | use embassy_executor::Spawner; |
| 14 | use embassy_futures::yield_now; | 14 | use embassy_futures::yield_now; |
| 15 | use embassy_net::icmp::ping::{PingManager, PingParams}; | ||
| 16 | use embassy_net::icmp::PacketMetadata; | 15 | use embassy_net::icmp::PacketMetadata; |
| 16 | use embassy_net::icmp::ping::{PingManager, PingParams}; | ||
| 17 | use embassy_net::{Ipv4Cidr, Stack, StackResources}; | 17 | use embassy_net::{Ipv4Cidr, Stack, StackResources}; |
| 18 | use embassy_net_wiznet::chip::W5500; | 18 | use embassy_net_wiznet::chip::W5500; |
| 19 | use embassy_net_wiznet::*; | 19 | use embassy_net_wiznet::*; |
| @@ -99,7 +99,7 @@ async fn main(spawner: Spawner) { | |||
| 99 | // Create the ping manager instance | 99 | // Create the ping manager instance |
| 100 | let mut ping_manager = PingManager::new(stack, &mut rx_meta, &mut rx_buffer, &mut tx_meta, &mut tx_buffer); | 100 | let mut ping_manager = PingManager::new(stack, &mut rx_meta, &mut rx_buffer, &mut tx_meta, &mut tx_buffer); |
| 101 | let addr = "192.168.8.1"; // Address to ping to | 101 | let addr = "192.168.8.1"; // Address to ping to |
| 102 | // Create the PingParams with the target address | 102 | // Create the PingParams with the target address |
| 103 | let mut ping_params = PingParams::new(Ipv4Addr::from_str(addr).unwrap()); | 103 | let mut ping_params = PingParams::new(Ipv4Addr::from_str(addr).unwrap()); |
| 104 | // (optional) Set custom properties of the ping | 104 | // (optional) Set custom properties of the ping |
| 105 | ping_params.set_payload(b"Hello, Ping!"); // custom payload | 105 | ping_params.set_payload(b"Hello, Ping!"); // custom payload |
diff --git a/examples/rp/src/bin/ethernet_w55rp20_tcp_server.rs b/examples/rp/src/bin/ethernet_w55rp20_tcp_server.rs index f51df2df9..b402029b5 100644 --- a/examples/rp/src/bin/ethernet_w55rp20_tcp_server.rs +++ b/examples/rp/src/bin/ethernet_w55rp20_tcp_server.rs | |||
| @@ -65,7 +65,7 @@ async fn main(spawner: Spawner) { | |||
| 65 | // Construct an SPI driver backed by a PIO state machine | 65 | // Construct an SPI driver backed by a PIO state machine |
| 66 | let mut spi_cfg = SpiConfig::default(); | 66 | let mut spi_cfg = SpiConfig::default(); |
| 67 | spi_cfg.frequency = 12_500_000; // The PIO SPI program is much less stable than the actual SPI | 67 | spi_cfg.frequency = 12_500_000; // The PIO SPI program is much less stable than the actual SPI |
| 68 | // peripheral, use higher speeds at your peril | 68 | // peripheral, use higher speeds at your peril |
| 69 | let spi = Spi::new(&mut common, sm0, clk, mosi, miso, p.DMA_CH0, p.DMA_CH1, spi_cfg); | 69 | let spi = Spi::new(&mut common, sm0, clk, mosi, miso, p.DMA_CH0, p.DMA_CH1, spi_cfg); |
| 70 | 70 | ||
| 71 | // Further control pins | 71 | // Further control pins |
diff --git a/examples/rp/src/bin/interrupt.rs b/examples/rp/src/bin/interrupt.rs index 2748f778a..2605622ab 100644 --- a/examples/rp/src/bin/interrupt.rs +++ b/examples/rp/src/bin/interrupt.rs | |||
| @@ -16,8 +16,8 @@ use embassy_rp::adc::{self, Adc, Blocking}; | |||
| 16 | use embassy_rp::gpio::Pull; | 16 | use embassy_rp::gpio::Pull; |
| 17 | use embassy_rp::interrupt; | 17 | use embassy_rp::interrupt; |
| 18 | use embassy_rp::pwm::{Config, Pwm}; | 18 | use embassy_rp::pwm::{Config, Pwm}; |
| 19 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | ||
| 20 | use embassy_sync::blocking_mutex::Mutex; | 19 | use embassy_sync::blocking_mutex::Mutex; |
| 20 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | ||
| 21 | use embassy_sync::channel::Channel; | 21 | use embassy_sync::channel::Channel; |
| 22 | use embassy_time::{Duration, Ticker}; | 22 | use embassy_time::{Duration, Ticker}; |
| 23 | use portable_atomic::{AtomicU32, Ordering}; | 23 | use portable_atomic::{AtomicU32, Ordering}; |
diff --git a/examples/rp/src/bin/multicore.rs b/examples/rp/src/bin/multicore.rs index 3a6367420..d289f8020 100644 --- a/examples/rp/src/bin/multicore.rs +++ b/examples/rp/src/bin/multicore.rs | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Executor; | 9 | use embassy_executor::Executor; |
| 10 | use embassy_rp::gpio::{Level, Output}; | 10 | use embassy_rp::gpio::{Level, Output}; |
| 11 | use embassy_rp::multicore::{spawn_core1, Stack}; | 11 | use embassy_rp::multicore::{Stack, spawn_core1}; |
| 12 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 12 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 13 | use embassy_sync::channel::Channel; | 13 | use embassy_sync::channel::Channel; |
| 14 | use embassy_time::Timer; | 14 | use embassy_time::Timer; |
diff --git a/examples/rp/src/bin/multiprio.rs b/examples/rp/src/bin/multiprio.rs index 0750d9bb7..310047505 100644 --- a/examples/rp/src/bin/multiprio.rs +++ b/examples/rp/src/bin/multiprio.rs | |||
| @@ -61,7 +61,7 @@ use defmt::{info, unwrap}; | |||
| 61 | use embassy_executor::{Executor, InterruptExecutor}; | 61 | use embassy_executor::{Executor, InterruptExecutor}; |
| 62 | use embassy_rp::interrupt; | 62 | use embassy_rp::interrupt; |
| 63 | use embassy_rp::interrupt::{InterruptExt, Priority}; | 63 | use embassy_rp::interrupt::{InterruptExt, Priority}; |
| 64 | use embassy_time::{Instant, Timer, TICK_HZ}; | 64 | use embassy_time::{Instant, TICK_HZ, Timer}; |
| 65 | use static_cell::StaticCell; | 65 | use static_cell::StaticCell; |
| 66 | use {defmt_rtt as _, panic_probe as _}; | 66 | use {defmt_rtt as _, panic_probe as _}; |
| 67 | 67 | ||
diff --git a/examples/rp/src/bin/orchestrate_tasks.rs b/examples/rp/src/bin/orchestrate_tasks.rs index 9f25e1087..cd26a5371 100644 --- a/examples/rp/src/bin/orchestrate_tasks.rs +++ b/examples/rp/src/bin/orchestrate_tasks.rs | |||
| @@ -20,11 +20,11 @@ | |||
| 20 | use assign_resources::assign_resources; | 20 | use assign_resources::assign_resources; |
| 21 | use defmt::*; | 21 | use defmt::*; |
| 22 | use embassy_executor::Spawner; | 22 | use embassy_executor::Spawner; |
| 23 | use embassy_futures::select::{select, Either}; | 23 | use embassy_futures::select::{Either, select}; |
| 24 | use embassy_rp::adc::{Adc, Channel, Config, InterruptHandler}; | 24 | use embassy_rp::adc::{Adc, Channel, Config, InterruptHandler}; |
| 25 | use embassy_rp::clocks::RoscRng; | 25 | use embassy_rp::clocks::RoscRng; |
| 26 | use embassy_rp::gpio::{Input, Pull}; | 26 | use embassy_rp::gpio::{Input, Pull}; |
| 27 | use embassy_rp::{bind_interrupts, peripherals, Peri}; | 27 | use embassy_rp::{Peri, bind_interrupts, peripherals}; |
| 28 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 28 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 29 | use embassy_sync::mutex::Mutex; | 29 | use embassy_sync::mutex::Mutex; |
| 30 | use embassy_sync::{channel, signal}; | 30 | use embassy_sync::{channel, signal}; |
diff --git a/examples/rp/src/bin/overclock.rs b/examples/rp/src/bin/overclock.rs index 83b17308b..a98185a8e 100644 --- a/examples/rp/src/bin/overclock.rs +++ b/examples/rp/src/bin/overclock.rs | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::clocks::{clk_sys_freq, core_voltage, ClockConfig}; | 10 | use embassy_rp::clocks::{ClockConfig, clk_sys_freq, core_voltage}; |
| 11 | use embassy_rp::config::Config; | 11 | use embassy_rp::config::Config; |
| 12 | use embassy_rp::gpio::{Level, Output}; | 12 | use embassy_rp::gpio::{Level, Output}; |
| 13 | use embassy_time::{Duration, Instant, Timer}; | 13 | use embassy_time::{Duration, Instant, Timer}; |
diff --git a/examples/rp/src/bin/overclock_manual.rs b/examples/rp/src/bin/overclock_manual.rs index dea5cfb3c..18397f9a8 100644 --- a/examples/rp/src/bin/overclock_manual.rs +++ b/examples/rp/src/bin/overclock_manual.rs | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::clocks::{clk_sys_freq, core_voltage, ClockConfig, CoreVoltage, PllConfig}; | 10 | use embassy_rp::clocks::{ClockConfig, CoreVoltage, PllConfig, clk_sys_freq, core_voltage}; |
| 11 | use embassy_rp::config::Config; | 11 | use embassy_rp::config::Config; |
| 12 | use embassy_rp::gpio::{Level, Output}; | 12 | use embassy_rp::gpio::{Level, Output}; |
| 13 | use embassy_time::{Duration, Instant, Timer}; | 13 | use embassy_time::{Duration, Instant, Timer}; |
diff --git a/examples/rp/src/bin/pio_async.rs b/examples/rp/src/bin/pio_async.rs index 1743a417e..55e983c36 100644 --- a/examples/rp/src/bin/pio_async.rs +++ b/examples/rp/src/bin/pio_async.rs | |||
| @@ -7,7 +7,7 @@ use embassy_executor::Spawner; | |||
| 7 | use embassy_rp::peripherals::PIO0; | 7 | use embassy_rp::peripherals::PIO0; |
| 8 | use embassy_rp::pio::program::pio_asm; | 8 | use embassy_rp::pio::program::pio_asm; |
| 9 | use embassy_rp::pio::{Common, Config, InterruptHandler, Irq, Pio, PioPin, ShiftDirection, StateMachine}; | 9 | use embassy_rp::pio::{Common, Config, InterruptHandler, Irq, Pio, PioPin, ShiftDirection, StateMachine}; |
| 10 | use embassy_rp::{bind_interrupts, Peri}; | 10 | use embassy_rp::{Peri, bind_interrupts}; |
| 11 | use fixed::traits::ToFixed; | 11 | use fixed::traits::ToFixed; |
| 12 | use fixed_macro::types::U56F8; | 12 | use fixed_macro::types::U56F8; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
diff --git a/examples/rp/src/bin/pio_stepper.rs b/examples/rp/src/bin/pio_stepper.rs index 3862c248b..e8f203990 100644 --- a/examples/rp/src/bin/pio_stepper.rs +++ b/examples/rp/src/bin/pio_stepper.rs | |||
| @@ -10,7 +10,7 @@ use embassy_rp::bind_interrupts; | |||
| 10 | use embassy_rp::peripherals::PIO0; | 10 | use embassy_rp::peripherals::PIO0; |
| 11 | use embassy_rp::pio::{InterruptHandler, Pio}; | 11 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 12 | use embassy_rp::pio_programs::stepper::{PioStepper, PioStepperProgram}; | 12 | use embassy_rp::pio_programs::stepper::{PioStepper, PioStepperProgram}; |
| 13 | use embassy_time::{with_timeout, Duration, Timer}; | 13 | use embassy_time::{Duration, Timer, with_timeout}; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 14 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 15 | ||
| 16 | bind_interrupts!(struct Irqs { | 16 | bind_interrupts!(struct Irqs { |
diff --git a/examples/rp/src/bin/pwm.rs b/examples/rp/src/bin/pwm.rs index 9dd07ab6e..f985bf7cf 100644 --- a/examples/rp/src/bin/pwm.rs +++ b/examples/rp/src/bin/pwm.rs | |||
| @@ -9,9 +9,9 @@ | |||
| 9 | 9 | ||
| 10 | use defmt::*; | 10 | use defmt::*; |
| 11 | use embassy_executor::Spawner; | 11 | use embassy_executor::Spawner; |
| 12 | use embassy_rp::peripherals::{PIN_25, PIN_4, PWM_SLICE2, PWM_SLICE4}; | ||
| 13 | use embassy_rp::pwm::{Config, Pwm, SetDutyCycle}; | ||
| 14 | use embassy_rp::Peri; | 12 | use embassy_rp::Peri; |
| 13 | use embassy_rp::peripherals::{PIN_4, PIN_25, PWM_SLICE2, PWM_SLICE4}; | ||
| 14 | use embassy_rp::pwm::{Config, Pwm, SetDutyCycle}; | ||
| 15 | use embassy_time::Timer; | 15 | use embassy_time::Timer; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 17 | ||
diff --git a/examples/rp/src/bin/rtc_alarm.rs b/examples/rp/src/bin/rtc_alarm.rs index 94b5fbd27..bde49ccd5 100644 --- a/examples/rp/src/bin/rtc_alarm.rs +++ b/examples/rp/src/bin/rtc_alarm.rs | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_futures::select::{select, Either}; | 8 | use embassy_futures::select::{Either, select}; |
| 9 | use embassy_rp::bind_interrupts; | 9 | use embassy_rp::bind_interrupts; |
| 10 | use embassy_rp::rtc::{DateTime, DateTimeFilter, DayOfWeek, Rtc}; | 10 | use embassy_rp::rtc::{DateTime, DateTimeFilter, DayOfWeek, Rtc}; |
| 11 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
diff --git a/examples/rp/src/bin/spi_display.rs b/examples/rp/src/bin/spi_display.rs index dd114a4ae..4bf924e56 100644 --- a/examples/rp/src/bin/spi_display.rs +++ b/examples/rp/src/bin/spi_display.rs | |||
| @@ -15,19 +15,19 @@ use embassy_executor::Spawner; | |||
| 15 | use embassy_rp::gpio::{Level, Output}; | 15 | use embassy_rp::gpio::{Level, Output}; |
| 16 | use embassy_rp::spi; | 16 | use embassy_rp::spi; |
| 17 | use embassy_rp::spi::Spi; | 17 | use embassy_rp::spi::Spi; |
| 18 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | ||
| 19 | use embassy_sync::blocking_mutex::Mutex; | 18 | use embassy_sync::blocking_mutex::Mutex; |
| 19 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | ||
| 20 | use embassy_time::Delay; | 20 | use embassy_time::Delay; |
| 21 | use embedded_graphics::image::{Image, ImageRawLE}; | 21 | use embedded_graphics::image::{Image, ImageRawLE}; |
| 22 | use embedded_graphics::mono_font::ascii::FONT_10X20; | ||
| 23 | use embedded_graphics::mono_font::MonoTextStyle; | 22 | use embedded_graphics::mono_font::MonoTextStyle; |
| 23 | use embedded_graphics::mono_font::ascii::FONT_10X20; | ||
| 24 | use embedded_graphics::pixelcolor::Rgb565; | 24 | use embedded_graphics::pixelcolor::Rgb565; |
| 25 | use embedded_graphics::prelude::*; | 25 | use embedded_graphics::prelude::*; |
| 26 | use embedded_graphics::primitives::{PrimitiveStyleBuilder, Rectangle}; | 26 | use embedded_graphics::primitives::{PrimitiveStyleBuilder, Rectangle}; |
| 27 | use embedded_graphics::text::Text; | 27 | use embedded_graphics::text::Text; |
| 28 | use mipidsi::Builder; | ||
| 28 | use mipidsi::models::ST7789; | 29 | use mipidsi::models::ST7789; |
| 29 | use mipidsi::options::{Orientation, Rotation}; | 30 | use mipidsi::options::{Orientation, Rotation}; |
| 30 | use mipidsi::Builder; | ||
| 31 | use {defmt_rtt as _, panic_probe as _}; | 31 | use {defmt_rtt as _, panic_probe as _}; |
| 32 | 32 | ||
| 33 | use crate::touch::Touch; | 33 | use crate::touch::Touch; |
| @@ -167,11 +167,7 @@ mod touch { | |||
| 167 | 167 | ||
| 168 | let x = ((x - cal.x1) * cal.sx / (cal.x2 - cal.x1)).clamp(0, cal.sx); | 168 | let x = ((x - cal.x1) * cal.sx / (cal.x2 - cal.x1)).clamp(0, cal.sx); |
| 169 | let y = ((y - cal.y1) * cal.sy / (cal.y2 - cal.y1)).clamp(0, cal.sy); | 169 | let y = ((y - cal.y1) * cal.sy / (cal.y2 - cal.y1)).clamp(0, cal.sy); |
| 170 | if x == 0 && y == 0 { | 170 | if x == 0 && y == 0 { None } else { Some((x, y)) } |
| 171 | None | ||
| 172 | } else { | ||
| 173 | Some((x, y)) | ||
| 174 | } | ||
| 175 | } | 171 | } |
| 176 | } | 172 | } |
| 177 | } | 173 | } |
diff --git a/examples/rp/src/bin/spi_gc9a01.rs b/examples/rp/src/bin/spi_gc9a01.rs index fdef09d4b..fd007b9bd 100644 --- a/examples/rp/src/bin/spi_gc9a01.rs +++ b/examples/rp/src/bin/spi_gc9a01.rs | |||
| @@ -16,16 +16,16 @@ use embassy_rp::clocks::RoscRng; | |||
| 16 | use embassy_rp::gpio::{Level, Output}; | 16 | use embassy_rp::gpio::{Level, Output}; |
| 17 | use embassy_rp::spi; | 17 | use embassy_rp::spi; |
| 18 | use embassy_rp::spi::{Blocking, Spi}; | 18 | use embassy_rp::spi::{Blocking, Spi}; |
| 19 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | ||
| 20 | use embassy_sync::blocking_mutex::Mutex; | 19 | use embassy_sync::blocking_mutex::Mutex; |
| 20 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | ||
| 21 | use embassy_time::{Delay, Duration, Timer}; | 21 | use embassy_time::{Delay, Duration, Timer}; |
| 22 | use embedded_graphics::image::{Image, ImageRawLE}; | 22 | use embedded_graphics::image::{Image, ImageRawLE}; |
| 23 | use embedded_graphics::pixelcolor::Rgb565; | 23 | use embedded_graphics::pixelcolor::Rgb565; |
| 24 | use embedded_graphics::prelude::*; | 24 | use embedded_graphics::prelude::*; |
| 25 | use embedded_graphics::primitives::{PrimitiveStyleBuilder, Rectangle}; | 25 | use embedded_graphics::primitives::{PrimitiveStyleBuilder, Rectangle}; |
| 26 | use mipidsi::Builder; | ||
| 26 | use mipidsi::models::GC9A01; | 27 | use mipidsi::models::GC9A01; |
| 27 | use mipidsi::options::{ColorInversion, ColorOrder}; | 28 | use mipidsi::options::{ColorInversion, ColorOrder}; |
| 28 | use mipidsi::Builder; | ||
| 29 | use {defmt_rtt as _, panic_probe as _}; | 29 | use {defmt_rtt as _, panic_probe as _}; |
| 30 | 30 | ||
| 31 | const DISPLAY_FREQ: u32 = 64_000_000; | 31 | const DISPLAY_FREQ: u32 = 64_000_000; |
diff --git a/examples/rp/src/bin/uart_r503.rs b/examples/rp/src/bin/uart_r503.rs index 085be280b..a25d45b18 100644 --- a/examples/rp/src/bin/uart_r503.rs +++ b/examples/rp/src/bin/uart_r503.rs | |||
| @@ -6,7 +6,7 @@ use embassy_executor::Spawner; | |||
| 6 | use embassy_rp::bind_interrupts; | 6 | use embassy_rp::bind_interrupts; |
| 7 | use embassy_rp::peripherals::UART0; | 7 | use embassy_rp::peripherals::UART0; |
| 8 | use embassy_rp::uart::{Config, DataBits, InterruptHandler as UARTInterruptHandler, Parity, StopBits, Uart}; | 8 | use embassy_rp::uart::{Config, DataBits, InterruptHandler as UARTInterruptHandler, Parity, StopBits, Uart}; |
| 9 | use embassy_time::{with_timeout, Duration, Timer}; | 9 | use embassy_time::{Duration, Timer, with_timeout}; |
| 10 | use heapless::Vec; | 10 | use heapless::Vec; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 12 | ||
diff --git a/examples/rp/src/bin/usb_ethernet.rs b/examples/rp/src/bin/usb_ethernet.rs index 912e52e96..b62a602b1 100644 --- a/examples/rp/src/bin/usb_ethernet.rs +++ b/examples/rp/src/bin/usb_ethernet.rs | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_net::tcp::TcpSocket; | ||
| 11 | use embassy_net::StackResources; | 10 | use embassy_net::StackResources; |
| 11 | use embassy_net::tcp::TcpSocket; | ||
| 12 | use embassy_rp::clocks::RoscRng; | 12 | use embassy_rp::clocks::RoscRng; |
| 13 | use embassy_rp::peripherals::USB; | 13 | use embassy_rp::peripherals::USB; |
| 14 | use embassy_rp::usb::{Driver, InterruptHandler}; | 14 | use embassy_rp::usb::{Driver, InterruptHandler}; |
diff --git a/examples/rp/src/bin/usb_serial.rs b/examples/rp/src/bin/usb_serial.rs index b79012acb..23d0c9e8b 100644 --- a/examples/rp/src/bin/usb_serial.rs +++ b/examples/rp/src/bin/usb_serial.rs | |||
| @@ -10,9 +10,9 @@ use embassy_executor::Spawner; | |||
| 10 | use embassy_rp::bind_interrupts; | 10 | use embassy_rp::bind_interrupts; |
| 11 | use embassy_rp::peripherals::USB; | 11 | use embassy_rp::peripherals::USB; |
| 12 | use embassy_rp::usb::{Driver, Instance, InterruptHandler}; | 12 | use embassy_rp::usb::{Driver, Instance, InterruptHandler}; |
| 13 | use embassy_usb::UsbDevice; | ||
| 13 | use embassy_usb::class::cdc_acm::{CdcAcmClass, State}; | 14 | use embassy_usb::class::cdc_acm::{CdcAcmClass, State}; |
| 14 | use embassy_usb::driver::EndpointError; | 15 | use embassy_usb::driver::EndpointError; |
| 15 | use embassy_usb::UsbDevice; | ||
| 16 | use static_cell::StaticCell; | 16 | use static_cell::StaticCell; |
| 17 | use {defmt_rtt as _, panic_probe as _}; | 17 | use {defmt_rtt as _, panic_probe as _}; |
| 18 | 18 | ||
diff --git a/examples/rp/src/bin/wifi_ap_tcp_server.rs b/examples/rp/src/bin/wifi_ap_tcp_server.rs index 128599e0d..0828dbbb9 100644 --- a/examples/rp/src/bin/wifi_ap_tcp_server.rs +++ b/examples/rp/src/bin/wifi_ap_tcp_server.rs | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | use core::str::from_utf8; | 8 | use core::str::from_utf8; |
| 9 | 9 | ||
| 10 | use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER}; | 10 | use cyw43_pio::{DEFAULT_CLOCK_DIVIDER, PioSpi}; |
| 11 | use defmt::*; | 11 | use defmt::*; |
| 12 | use embassy_executor::Spawner; | 12 | use embassy_executor::Spawner; |
| 13 | use embassy_net::tcp::TcpSocket; | 13 | use embassy_net::tcp::TcpSocket; |
diff --git a/examples/rp/src/bin/wifi_blinky.rs b/examples/rp/src/bin/wifi_blinky.rs index b2e08c517..aa6ee4df0 100644 --- a/examples/rp/src/bin/wifi_blinky.rs +++ b/examples/rp/src/bin/wifi_blinky.rs | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #![no_std] | 5 | #![no_std] |
| 6 | #![no_main] | 6 | #![no_main] |
| 7 | 7 | ||
| 8 | use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER}; | 8 | use cyw43_pio::{DEFAULT_CLOCK_DIVIDER, PioSpi}; |
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_rp::bind_interrupts; | 11 | use embassy_rp::bind_interrupts; |
diff --git a/examples/rp/src/bin/wifi_scan.rs b/examples/rp/src/bin/wifi_scan.rs index c884aa2ba..7e3de1db9 100644 --- a/examples/rp/src/bin/wifi_scan.rs +++ b/examples/rp/src/bin/wifi_scan.rs | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | use core::str; | 8 | use core::str; |
| 9 | 9 | ||
| 10 | use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER}; | 10 | use cyw43_pio::{DEFAULT_CLOCK_DIVIDER, PioSpi}; |
| 11 | use defmt::*; | 11 | use defmt::*; |
| 12 | use embassy_executor::Spawner; | 12 | use embassy_executor::Spawner; |
| 13 | use embassy_rp::bind_interrupts; | 13 | use embassy_rp::bind_interrupts; |
diff --git a/examples/rp/src/bin/wifi_tcp_server.rs b/examples/rp/src/bin/wifi_tcp_server.rs index 126475779..e39de4902 100644 --- a/examples/rp/src/bin/wifi_tcp_server.rs +++ b/examples/rp/src/bin/wifi_tcp_server.rs | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | use core::str::from_utf8; | 8 | use core::str::from_utf8; |
| 9 | 9 | ||
| 10 | use cyw43::JoinOptions; | 10 | use cyw43::JoinOptions; |
| 11 | use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER}; | 11 | use cyw43_pio::{DEFAULT_CLOCK_DIVIDER, PioSpi}; |
| 12 | use defmt::*; | 12 | use defmt::*; |
| 13 | use embassy_executor::Spawner; | 13 | use embassy_executor::Spawner; |
| 14 | use embassy_net::tcp::TcpSocket; | 14 | use embassy_net::tcp::TcpSocket; |
diff --git a/examples/rp/src/bin/wifi_webrequest.rs b/examples/rp/src/bin/wifi_webrequest.rs index 079def370..b618d2b38 100644 --- a/examples/rp/src/bin/wifi_webrequest.rs +++ b/examples/rp/src/bin/wifi_webrequest.rs | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | use core::str::from_utf8; | 8 | use core::str::from_utf8; |
| 9 | 9 | ||
| 10 | use cyw43::JoinOptions; | 10 | use cyw43::JoinOptions; |
| 11 | use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER}; | 11 | use cyw43_pio::{DEFAULT_CLOCK_DIVIDER, PioSpi}; |
| 12 | use defmt::*; | 12 | use defmt::*; |
| 13 | use embassy_executor::Spawner; | 13 | use embassy_executor::Spawner; |
| 14 | use embassy_net::dns::DnsSocket; | 14 | use embassy_net::dns::DnsSocket; |
diff --git a/examples/rp/src/bin/zerocopy.rs b/examples/rp/src/bin/zerocopy.rs index d603e1ed3..fc5f95e6e 100644 --- a/examples/rp/src/bin/zerocopy.rs +++ b/examples/rp/src/bin/zerocopy.rs | |||
| @@ -11,7 +11,7 @@ use embassy_executor::Spawner; | |||
| 11 | use embassy_rp::adc::{self, Adc, Async, Config, InterruptHandler}; | 11 | use embassy_rp::adc::{self, Adc, Async, Config, InterruptHandler}; |
| 12 | use embassy_rp::gpio::Pull; | 12 | use embassy_rp::gpio::Pull; |
| 13 | use embassy_rp::peripherals::DMA_CH0; | 13 | use embassy_rp::peripherals::DMA_CH0; |
| 14 | use embassy_rp::{bind_interrupts, Peri}; | 14 | use embassy_rp::{Peri, bind_interrupts}; |
| 15 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | 15 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; |
| 16 | use embassy_sync::zerocopy_channel::{Channel, Receiver, Sender}; | 16 | use embassy_sync::zerocopy_channel::{Channel, Receiver, Sender}; |
| 17 | use embassy_time::{Duration, Ticker, Timer}; | 17 | use embassy_time::{Duration, Ticker, Timer}; |
