809: Allow compiling usb-serial without defmt r=lulf a=lulf



Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
This commit is contained in:
bors[bot] 2022-06-13 12:46:39 +00:00 committed by GitHub
commit 624e46ccfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -269,7 +269,8 @@ impl<'d, D: Driver<'d>> CdcAcmClass<'d, D> {
} }
/// Number of stop bits for LineCoding /// Number of stop bits for LineCoding
#[derive(Copy, Clone, PartialEq, Eq, defmt::Format)] #[derive(Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum StopBits { pub enum StopBits {
/// 1 stop bit /// 1 stop bit
One = 0, One = 0,
@ -292,7 +293,8 @@ impl From<u8> for StopBits {
} }
/// Parity for LineCoding /// Parity for LineCoding
#[derive(Copy, Clone, PartialEq, Eq, defmt::Format)] #[derive(Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum ParityType { pub enum ParityType {
None = 0, None = 0,
Odd = 1, Odd = 1,
@ -315,7 +317,8 @@ impl From<u8> for ParityType {
/// ///
/// This is provided by the host for specifying the standard UART parameters such as baud rate. Can /// 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. /// be ignored if you don't plan to interface with a physical UART.
#[derive(Clone, Copy, defmt::Format)] #[derive(Clone, Copy)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct LineCoding { pub struct LineCoding {
stop_bits: StopBits, stop_bits: StopBits,
data_bits: u8, data_bits: u8,