usb: fix compile errors with the log feature

This commit is contained in:
Alex Martens 2022-09-24 09:42:06 -07:00
parent dacbc9acd5
commit a45fb2d718
2 changed files with 4 additions and 4 deletions

View file

@ -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<u8> 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<u8> 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,

View file

@ -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,