From b1a603f150c746c523f6461881fd616f6f7cfe45 Mon Sep 17 00:00:00 2001 From: Lucas Vas Date: Mon, 13 Oct 2025 23:58:38 -0400 Subject: [PATCH] build: update dependencies --- Cargo.toml | 26 +++++++++----------------- src/main.rs | 6 ++---- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 23569ee..67ad8e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,28 +1,20 @@ [package] authors = ["Lucas Vas "] edition = "2018" -readme = "README.md" name = "test-cargo" version = "0.1.0" [dependencies] -cortex-m = "0.7.7" cortex-m-rt = "0.7.3" -panic-halt = "0.2.0" -defmt = "0.3.8" -defmt-rtt = "0.4.1" -embedded-hal = "1.0.0" -embedded-hal-async = "1.0.0" -embedded-io = "0.6.1" -embedded-io-async = "0.6.1" -embedded-storage = "0.3.1" -embassy-rp = { version = "0.2.0", features = [ "defmt", "time-driver", "unstable-pac", "critical-section-impl" ] } -embassy-time = { version = "0.3.0", features = [ "defmt", "defmt-timestamp-uptime" ] } -embassy-executor = { version = "0.5.0", features = [ "task-arena-size-1024", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers", "executor-interrupt" ] } -cyw43 = { version = "=0.1.0", features = [ "defmt", "firmware-logs" ] } -cyw43-pio = "0.2.0" -static_cell = "2.1.0" -portable-atomic = { version = "1.7.0", features = ["critical-section"] } +panic-halt = "1.0.0" +defmt = "1.0.1" +defmt-rtt = "1.1.0" +embassy-rp = { version = "0.8.0", features = [ "defmt", "time-driver", "unstable-pac", "critical-section-impl", "rp2040" ] } +embassy-time = { version = "0.5.0", features = [ "defmt", "defmt-timestamp-uptime" ] } +embassy-executor = { version = "0.9.1", features = [ "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt" ] } +cyw43 = { version = "0.5.0", features = [ "defmt", "firmware-logs" ] } +cyw43-pio = { version = "0.8.0", features = [ "defmt" ] } +static_cell = "2.1.1" [[bin]] name = "test-cargo" diff --git a/src/main.rs b/src/main.rs index 4590396..7a8e364 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ #![no_std] #![no_main] -use cyw43_pio::PioSpi; +use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER}; use embassy_executor::Spawner; use embassy_time::{Duration, Timer}; use embassy_rp::{ @@ -38,11 +38,9 @@ async fn main(spawner: Spawner) { let power = Output::new(p.PIN_23, Level::Low); let cs = Output::new(p.PIN_25, Level::High); let mut pio = Pio::new(p.PIO0, Irqs); - let spi = PioSpi::new(&mut pio.common, pio.sm0, pio.irq0, cs, p.PIN_24, p.PIN_29, p.DMA_CH0); + let spi = PioSpi::new(&mut pio.common, pio.sm0, DEFAULT_CLOCK_DIVIDER, pio.irq0, cs, p.PIN_24, p.PIN_29, p.DMA_CH0); let state = singleton!(cyw43::State::new()); - static THING: StaticCell = StaticCell::new(); - let state = THING.init_with(cyw43::State::new()); let (_net_device, mut control, runner) = cyw43::new(state, power, spi, fw).await; unwrap!(spawner.spawn(cyw43_task(runner)));