cyw43: move crate to subdir.
This commit is contained in:
1707
examples/rpi-pico-w/Cargo.lock
generated
Normal file
1707
examples/rpi-pico-w/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@ edition = "2021"
|
||||
|
||||
|
||||
[dependencies]
|
||||
cyw43 = { path = "../../", features = ["defmt", "firmware-logs"] }
|
||||
cyw43 = { path = "../../cyw43", features = ["defmt", "firmware-logs"] }
|
||||
cyw43-pio = { path = "../../cyw43-pio", features = ["defmt", "overclock"] }
|
||||
embassy-executor = { version = "0.2.0", features = ["defmt", "integrated-timers", "executor-thread", "arch-cortex-m"] }
|
||||
embassy-time = { version = "0.1.0", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
|
@ -28,7 +28,11 @@ macro_rules! singleton {
|
||||
|
||||
#[embassy_executor::task]
|
||||
async fn wifi_task(
|
||||
runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>,
|
||||
runner: cyw43::Runner<
|
||||
'static,
|
||||
Output<'static, PIN_23>,
|
||||
PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>,
|
||||
>,
|
||||
) -> ! {
|
||||
runner.run().await
|
||||
}
|
||||
@ -44,8 +48,8 @@ async fn main(spawner: Spawner) {
|
||||
|
||||
let p = embassy_rp::init(Default::default());
|
||||
|
||||
let fw = include_bytes!("../../../../firmware/43439A0.bin");
|
||||
let clm = include_bytes!("../../../../firmware/43439A0_clm.bin");
|
||||
let fw = include_bytes!("../../../../cyw43-firmware/43439A0.bin");
|
||||
let clm = include_bytes!("../../../../cyw43-firmware/43439A0_clm.bin");
|
||||
|
||||
// To make flashing faster for development, you may want to flash the firmwares independently
|
||||
// at hardcoded addresses, instead of baking them into the program with `include_bytes!`:
|
||||
@ -57,7 +61,15 @@ async fn main(spawner: Spawner) {
|
||||
let pwr = Output::new(p.PIN_23, Level::Low);
|
||||
let cs = Output::new(p.PIN_25, Level::High);
|
||||
let mut pio = Pio::new(p.PIO0);
|
||||
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,
|
||||
pio.irq0,
|
||||
cs,
|
||||
p.PIN_24,
|
||||
p.PIN_29,
|
||||
p.DMA_CH0,
|
||||
);
|
||||
|
||||
let state = singleton!(cyw43::State::new());
|
||||
let (net_device, mut control, runner) = cyw43::new(state, pwr, spi, fw).await;
|
||||
@ -90,7 +102,10 @@ async fn main(spawner: Spawner) {
|
||||
|
||||
loop {
|
||||
//control.join_open(env!("WIFI_NETWORK")).await;
|
||||
match control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await {
|
||||
match control
|
||||
.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD"))
|
||||
.await
|
||||
{
|
||||
Ok(_) => break,
|
||||
Err(err) => {
|
||||
info!("join failed with status={}", err.status);
|
||||
|
@ -28,7 +28,11 @@ macro_rules! singleton {
|
||||
|
||||
#[embassy_executor::task]
|
||||
async fn wifi_task(
|
||||
runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>,
|
||||
runner: cyw43::Runner<
|
||||
'static,
|
||||
Output<'static, PIN_23>,
|
||||
PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>,
|
||||
>,
|
||||
) -> ! {
|
||||
runner.run().await
|
||||
}
|
||||
@ -44,8 +48,8 @@ async fn main(spawner: Spawner) {
|
||||
|
||||
let p = embassy_rp::init(Default::default());
|
||||
|
||||
let fw = include_bytes!("../../../../firmware/43439A0.bin");
|
||||
let clm = include_bytes!("../../../../firmware/43439A0_clm.bin");
|
||||
let fw = include_bytes!("../../../../cyw43-firmware/43439A0.bin");
|
||||
let clm = include_bytes!("../../../../cyw43-firmware/43439A0_clm.bin");
|
||||
|
||||
// To make flashing faster for development, you may want to flash the firmwares independently
|
||||
// at hardcoded addresses, instead of baking them into the program with `include_bytes!`:
|
||||
@ -57,7 +61,15 @@ async fn main(spawner: Spawner) {
|
||||
let pwr = Output::new(p.PIN_23, Level::Low);
|
||||
let cs = Output::new(p.PIN_25, Level::High);
|
||||
let mut pio = Pio::new(p.PIO0);
|
||||
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,
|
||||
pio.irq0,
|
||||
cs,
|
||||
p.PIN_24,
|
||||
p.PIN_29,
|
||||
p.DMA_CH0,
|
||||
);
|
||||
|
||||
let state = singleton!(cyw43::State::new());
|
||||
let (net_device, mut control, runner) = cyw43::new(state, pwr, spi, fw).await;
|
||||
|
@ -26,7 +26,11 @@ macro_rules! singleton {
|
||||
|
||||
#[embassy_executor::task]
|
||||
async fn wifi_task(
|
||||
runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>,
|
||||
runner: cyw43::Runner<
|
||||
'static,
|
||||
Output<'static, PIN_23>,
|
||||
PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>,
|
||||
>,
|
||||
) -> ! {
|
||||
runner.run().await
|
||||
}
|
||||
@ -42,8 +46,8 @@ async fn main(spawner: Spawner) {
|
||||
|
||||
let p = embassy_rp::init(Default::default());
|
||||
|
||||
let fw = include_bytes!("../../../../firmware/43439A0.bin");
|
||||
let clm = include_bytes!("../../../../firmware/43439A0_clm.bin");
|
||||
let fw = include_bytes!("../../../../cyw43-firmware/43439A0.bin");
|
||||
let clm = include_bytes!("../../../../cyw43-firmware/43439A0_clm.bin");
|
||||
|
||||
// To make flashing faster for development, you may want to flash the firmwares independently
|
||||
// at hardcoded addresses, instead of baking them into the program with `include_bytes!`:
|
||||
@ -55,7 +59,15 @@ async fn main(spawner: Spawner) {
|
||||
let pwr = Output::new(p.PIN_23, Level::Low);
|
||||
let cs = Output::new(p.PIN_25, Level::High);
|
||||
let mut pio = Pio::new(p.PIO0);
|
||||
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,
|
||||
pio.irq0,
|
||||
cs,
|
||||
p.PIN_24,
|
||||
p.PIN_29,
|
||||
p.DMA_CH0,
|
||||
);
|
||||
|
||||
let state = singleton!(cyw43::State::new());
|
||||
let (_net_device, mut control, runner) = cyw43::new(state, pwr, spi, fw).await;
|
||||
|
Reference in New Issue
Block a user