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] 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 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> { 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 cb9fe2576..ea6347c7d 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))]