Skip to content

Commit

Permalink
Merge pull request #3692 from 9names/embassy-usb-fix-build-w-log
Browse files Browse the repository at this point in the history
embassy-usb: fix building with optional log feature
  • Loading branch information
Dirbaio authored Dec 29, 2024
2 parents b71696c + 2c5ae2e commit 509c60b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 9 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
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 509c60b

Please sign in to comment.