Skip to content

Commit 46aa206

Browse files
authored
Merge pull request #2865 from embassy-rs/pico-bluetooth
Cyw43 / Pico W bluetooth, take 2
2 parents afc8e68 + 4f7ac19 commit 46aa206

File tree

21 files changed

+1037
-84
lines changed

21 files changed

+1037
-84
lines changed

ci.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ cargo batch \
173173
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'defmt' \
174174
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'log,firmware-logs' \
175175
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'defmt,firmware-logs' \
176+
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'log,firmware-logs,bluetooth' \
177+
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'defmt,firmware-logs,bluetooth' \
176178
--- build --release --manifest-path cyw43-pio/Cargo.toml --target thumbv6m-none-eabi --features '' \
177179
--- build --release --manifest-path cyw43-pio/Cargo.toml --target thumbv6m-none-eabi --features 'overclock' \
178180
--- build --release --manifest-path embassy-boot-nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \

cyw43-firmware/43439A0.bin

100755100644
756 Bytes
Binary file not shown.

cyw43-firmware/43439A0_btfw.bin

6.02 KB
Binary file not shown.

cyw43-firmware/43439A0_clm.bin

100755100644
-3.68 KB
Binary file not shown.

cyw43-firmware/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
# WiFi firmware
1+
# WiFi + Bluetooth firmware blobs
22

3-
Firmware obtained from https://github.com/Infineon/wifi-host-driver/tree/master/WiFi_Host_Driver/resources/firmware/COMPONENT_43439
3+
Firmware obtained from https://github.com/georgerobotics/cyw43-driver/tree/main/firmware
44

55
Licensed under the [Infineon Permissive Binary License](./LICENSE-permissive-binary-license-1.0.txt)
66

77
## Changelog
88

9-
* 2023-07-28: synced with `ad3bad0` - Update 43439 fw from 7.95.55 ot 7.95.62
9+
* 2023-08-21: synced with `a1dc885` - Update 43439 fw + clm to come from `wb43439A0_7_95_49_00_combined.h` + add Bluetooth firmware
10+
* 2023-07-28: synced with `ad3bad0` - Update 43439 fw from 7.95.55 to 7.95.62
11+
12+
## Notes
13+
14+
If you update these files, please update the lengths in the `tests/rp/src/bin/cyw43_perf.rs` test (which relies on these files running from RAM).

cyw43-pio/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,10 @@ where
181181
let read_bits = read.len() * 32 + 32 - 1;
182182

183183
#[cfg(feature = "defmt")]
184-
defmt::trace!("write={} read={}", write_bits, read_bits);
184+
defmt::trace!("cmd_read write={} read={}", write_bits, read_bits);
185+
186+
#[cfg(feature = "defmt")]
187+
defmt::trace!("cmd_read cmd = {:02x} len = {}", cmd, read.len());
185188

186189
unsafe {
187190
instr::set_y(&mut self.sm, read_bits as u32);
@@ -201,6 +204,10 @@ where
201204
.rx()
202205
.dma_pull(self.dma.reborrow(), slice::from_mut(&mut status))
203206
.await;
207+
208+
#[cfg(feature = "defmt")]
209+
defmt::trace!("cmd_read cmd = {:02x} len = {} read = {:08x}", cmd, read.len(), read);
210+
204211
status
205212
}
206213
}

cyw43/Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ repository = "https://github.com/embassy-rs/embassy"
1010
documentation = "https://docs.embassy.dev/cyw43"
1111

1212
[features]
13-
defmt = ["dep:defmt", "heapless/defmt-03", "embassy-time/defmt"]
13+
defmt = ["dep:defmt", "heapless/defmt-03", "embassy-time/defmt", "bt-hci?/defmt", "embedded-io-async?/defmt-03"]
1414
log = ["dep:log"]
15+
bluetooth = ["dep:bt-hci", "dep:embedded-io-async"]
1516

1617
# Fetch console logs from the WiFi firmware and forward them to `log` or `defmt`.
1718
firmware-logs = []
@@ -31,9 +32,12 @@ futures = { version = "0.3.17", default-features = false, features = ["async-awa
3132

3233
embedded-hal-1 = { package = "embedded-hal", version = "1.0" }
3334
num_enum = { version = "0.5.7", default-features = false }
34-
3535
heapless = "0.8.0"
3636

37+
# Bluetooth deps
38+
embedded-io-async = { version = "0.6.0", optional = true }
39+
bt-hci = { git = "https://github.com/alexmoon/bt-hci.git", rev = "b9cd5954f6bd89b535cad9c418e9fdf12812d7c3", optional = true, default-features = false }
40+
3741
[package.metadata.embassy_docs]
3842
src_base = "https://github.com/embassy-rs/embassy/blob/cyw43-v$VERSION/cyw43/src/"
3943
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/cyw43/src/"

0 commit comments

Comments
 (0)