From adf3134e7d722d4c400e09715b3a49a7ffd45edb Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sat, 28 Dec 2024 23:41:36 +1100 Subject: [PATCH 1/2] embassy-usb: fix building with optional log feature --- embassy-usb/src/class/uac1/speaker.rs | 2 +- embassy-usb/src/types.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/embassy-usb/src/class/uac1/speaker.rs b/embassy-usb/src/class/uac1/speaker.rs index 96456d94a8..6c3a4e3784 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> { if endpoint_address != self.streaming_endpoint_address { debug!( - "Unhandled endpoint set request for endpoint {} and control {} with data {}", + "Unhandled endpoint set request for endpoint {} and control {} with data {:?}", endpoint_address, control_selector, data ); return None; diff --git a/embassy-usb/src/types.rs b/embassy-usb/src/types.rs index cb9fe2576f..ea6347c7d5 100644 --- a/embassy-usb/src/types.rs +++ b/embassy-usb/src/types.rs @@ -18,6 +18,12 @@ impl From for u8 { } } +impl core::fmt::Display for InterfaceNumber { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + write!(f, "{}", self.0) + } +} + /// A handle for a USB string descriptor that contains its index. #[derive(Copy, Clone, Eq, PartialEq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] From 2c5ae2e0117f44bb19714417a3edc8656271f3bf Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sun, 29 Dec 2024 10:54:51 +1100 Subject: [PATCH 2/2] ci: add embassy-usb to build tests --- ci.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci.sh b/ci.sh index e7f1504aa1..b6a950bdb2 100755 --- a/ci.sh +++ b/ci.sh @@ -186,6 +186,15 @@ cargo batch \ --- build --release --manifest-path embassy-boot-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9161-ns \ --- build --release --manifest-path embassy-boot-rp/Cargo.toml --target thumbv6m-none-eabi --features embassy-rp/rp2040 \ --- build --release --manifest-path embassy-boot-stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32l496zg \ + --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --no-default-features \ + --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi \ + --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features log \ + --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features defmt \ + --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features usbd-hid \ + --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features max-interface-count-1 \ + --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features max-interface-count-8 \ + --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features max-handler-count-8 \ + --- build --release --manifest-path embassy-usb/Cargo.toml --target thumbv6m-none-eabi --features max-handler-count-8 \ --- build --release --manifest-path docs/examples/basic/Cargo.toml --target thumbv7em-none-eabi \ --- build --release --manifest-path docs/examples/layer-by-layer/blinky-pac/Cargo.toml --target thumbv7em-none-eabi \ --- build --release --manifest-path docs/examples/layer-by-layer/blinky-hal/Cargo.toml --target thumbv7em-none-eabi \