From a45fb2d7183738bdcc020a9b1916fdfab469ec0c Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Sat, 24 Sep 2022 09:42:06 -0700 Subject: [PATCH] usb: fix compile errors with the log feature --- embassy-usb-serial/src/lib.rs | 6 +++--- embassy-usb/src/lib.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/embassy-usb-serial/src/lib.rs b/embassy-usb-serial/src/lib.rs index 27b536a6..15c2bb0a 100644 --- a/embassy-usb-serial/src/lib.rs +++ b/embassy-usb-serial/src/lib.rs @@ -268,7 +268,7 @@ impl<'d, D: Driver<'d>> CdcAcmClass<'d, D> { } /// Number of stop bits for LineCoding -#[derive(Copy, Clone, PartialEq, Eq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum StopBits { /// 1 stop bit @@ -292,7 +292,7 @@ impl From for StopBits { } /// Parity for LineCoding -#[derive(Copy, Clone, PartialEq, Eq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum ParityType { None = 0, @@ -316,7 +316,7 @@ impl From for ParityType { /// /// This is provided by the host for specifying the standard UART parameters such as baud rate. Can /// be ignored if you don't plan to interface with a physical UART. -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Debug)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct LineCoding { stop_bits: StopBits, diff --git a/embassy-usb/src/lib.rs b/embassy-usb/src/lib.rs index ca7dde62..6f58c953 100644 --- a/embassy-usb/src/lib.rs +++ b/embassy-usb/src/lib.rs @@ -247,7 +247,7 @@ impl<'d, D: Driver<'d>> UsbDevice<'d, D> { async fn handle_control(&mut self, req: [u8; 8]) { let req = Request::parse(&req); - trace!("control request: {:02x}", req); + trace!("control request: {:?}", req); match req.direction { UsbDirection::In => self.handle_control_in(req).await,