put the more flexible way of parsing firmware back

This commit is contained in:
Brandon Ros
2023-08-22 19:35:48 -04:00
parent 60ac9c80a8
commit fe4fc5663d
11 changed files with 111 additions and 399 deletions

View File

@ -21,7 +21,6 @@ lora-phy = { version = "1" }
lorawan-device = { version = "0.10.0", default-features = false, features = ["async", "external-lora-phy"] }
lorawan = { version = "0.7.3", default-features = false, features = ["default-crypto"] }
cyw43 = { path = "../../cyw43", features = ["defmt", "firmware-logs"] }
cyw43-firmware = { path = "../../cyw43-firmware" }
cyw43-pio = { path = "../../cyw43-pio", features = ["defmt"] }
defmt = "0.3"

View File

@ -33,6 +33,7 @@ async fn main(spawner: Spawner) {
let p = embassy_rp::init(Default::default());
let fw = include_bytes!("../../../../cyw43-firmware/43439A0.bin");
let clm = include_bytes!("../../../../cyw43-firmware/43439A0_clm.bin");
let btfw = include_bytes!("../../../../cyw43-firmware/43439A0_btfw.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!`:
@ -47,10 +48,7 @@ async fn main(spawner: Spawner) {
let spi = PioSpi::new(&mut pio.common, pio.sm0, pio.irq0, cs, p.PIN_24, p.PIN_29, p.DMA_CH0);
let state = make_static!(cyw43::State::new());
let bluetooth_firmware_offsets = &cyw43_firmware::BLUETOOTH_FIRMWARE_OFFSETS;
let bluetooth_firmware = &cyw43_firmware::BLUETOOTH_FIRMWARE;
let (_net_device, mut control, runner) =
cyw43::new_with_bluetooth(state, pwr, spi, fw, bluetooth_firmware_offsets, bluetooth_firmware).await;
let (_net_device, mut control, runner) = cyw43::new_with_bluetooth(state, pwr, spi, fw, btfw).await;
unwrap!(spawner.spawn(cyw43_runner_task(runner)));
control.init(clm).await;