diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-12-29 10:03:11 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-12-29 10:03:11 +0000 |
| commit | 509c60b41fe7a04de72cf63ebe6ed4e7bcde8033 (patch) | |
| tree | b5e8b6def094ad111a14817554ed713525d4d25d | |
| parent | b71696c8f54edba664e9bfe77a1d86d09d88f52c (diff) | |
| parent | 2c5ae2e0117f44bb19714417a3edc8656271f3bf (diff) | |
Merge pull request #3692 from 9names/embassy-usb-fix-build-w-log
embassy-usb: fix building with optional log feature
| -rwxr-xr-x | ci.sh | 9 | ||||
| -rw-r--r-- | embassy-usb/src/class/uac1/speaker.rs | 2 | ||||
| -rw-r--r-- | embassy-usb/src/types.rs | 6 |
3 files changed, 16 insertions, 1 deletions
| @@ -186,6 +186,15 @@ cargo batch \ | |||
| 186 | --- build --release --manifest-path embassy-boot-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9161-ns \ | 186 | --- build --release --manifest-path embassy-boot-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9161-ns \ |
| 187 | --- build --release --manifest-path embassy-boot-rp/Cargo.toml --target thumbv6m-none-eabi --features embassy-rp/rp2040 \ | 187 | --- build --release --manifest-path embassy-boot-rp/Cargo.toml --target thumbv6m-none-eabi --features embassy-rp/rp2040 \ |
| 188 | --- build --release --manifest-path embassy-boot-stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32l496zg \ | 188 | --- build --release --manifest-path embassy-boot-stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32l496zg \ |
| 189 | --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --no-default-features \ | ||
| 190 | --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi \ | ||
| 191 | --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features log \ | ||
| 192 | --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features defmt \ | ||
| 193 | --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features usbd-hid \ | ||
| 194 | --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features max-interface-count-1 \ | ||
| 195 | --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features max-interface-count-8 \ | ||
| 196 | --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features max-handler-count-8 \ | ||
| 197 | --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features max-handler-count-8 \ | ||
| 189 | --- build --release --manifest-path docs/examples/basic/Cargo.toml --target thumbv7em-none-eabi \ | 198 | --- build --release --manifest-path docs/examples/basic/Cargo.toml --target thumbv7em-none-eabi \ |
| 190 | --- build --release --manifest-path docs/examples/layer-by-layer/blinky-pac/Cargo.toml --target thumbv7em-none-eabi \ | 199 | --- build --release --manifest-path docs/examples/layer-by-layer/blinky-pac/Cargo.toml --target thumbv7em-none-eabi \ |
| 191 | --- build --release --manifest-path docs/examples/layer-by-layer/blinky-hal/Cargo.toml --target thumbv7em-none-eabi \ | 200 | --- build --release --manifest-path docs/examples/layer-by-layer/blinky-hal/Cargo.toml --target thumbv7em-none-eabi \ |
diff --git a/embassy-usb/src/class/uac1/speaker.rs b/embassy-usb/src/class/uac1/speaker.rs index 96456d94a..6c3a4e378 100644 --- a/embassy-usb/src/class/uac1/speaker.rs +++ b/embassy-usb/src/class/uac1/speaker.rs | |||
| @@ -579,7 +579,7 @@ impl<'d> Control<'d> { | |||
| 579 | 579 | ||
| 580 | if endpoint_address != self.streaming_endpoint_address { | 580 | if endpoint_address != self.streaming_endpoint_address { |
| 581 | debug!( | 581 | debug!( |
| 582 | "Unhandled endpoint set request for endpoint {} and control {} with data {}", | 582 | "Unhandled endpoint set request for endpoint {} and control {} with data {:?}", |
| 583 | endpoint_address, control_selector, data | 583 | endpoint_address, control_selector, data |
| 584 | ); | 584 | ); |
| 585 | return None; | 585 | return None; |
diff --git a/embassy-usb/src/types.rs b/embassy-usb/src/types.rs index cb9fe2576..ea6347c7d 100644 --- a/embassy-usb/src/types.rs +++ b/embassy-usb/src/types.rs | |||
| @@ -18,6 +18,12 @@ impl From<InterfaceNumber> for u8 { | |||
| 18 | } | 18 | } |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | impl core::fmt::Display for InterfaceNumber { | ||
| 22 | fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { | ||
| 23 | write!(f, "{}", self.0) | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 21 | /// A handle for a USB string descriptor that contains its index. | 27 | /// A handle for a USB string descriptor that contains its index. |
| 22 | #[derive(Copy, Clone, Eq, PartialEq)] | 28 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 23 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 29 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
