Skip to content

Commit

Permalink
embassy-usb: fix building with optional log feature
Browse files Browse the repository at this point in the history
  • Loading branch information
9names committed Dec 28, 2024
1 parent b71696c commit adf3134
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion embassy-usb/src/class/uac1/speaker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions embassy-usb/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ impl From<InterfaceNumber> 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))]
Expand Down

0 comments on commit adf3134

Please sign in to comment.