pub struct UartBitbangConfig {
pub data_bits: u8,
pub stop_bits: UartStopBits,
pub break_char_cycles: u8,
pub parity: Parity,
}
Expand description
UART frame configuration to use for UART bitbanging. Assumes LSB first.
Fields§
§data_bits: u8
§stop_bits: UartStopBits
§break_char_cycles: u8
§parity: Parity
Implementations§
Source§impl UartBitbangConfig
impl UartBitbangConfig
pub fn new( data_bits: u8, stop_bits: UartStopBits, break_char_cycles: u8, parity: Parity, ) -> Result<UartBitbangConfig>
Sourcepub fn bit_time_per_frame(&self) -> u32
pub fn bit_time_per_frame(&self) -> u32
The amount of samples (bit transmissions) in one frame.
Sourcepub fn break_bit_time(&self) -> u32
pub fn break_bit_time(&self) -> u32
For a break, hold logic low for (frame bit time) * break cycles
Trait Implementations§
Source§impl Clone for UartBitbangConfig
impl Clone for UartBitbangConfig
Source§fn clone(&self) -> UartBitbangConfig
fn clone(&self) -> UartBitbangConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for UartBitbangConfig
impl RefUnwindSafe for UartBitbangConfig
impl Send for UartBitbangConfig
impl Sync for UartBitbangConfig
impl Unpin for UartBitbangConfig
impl UnwindSafe for UartBitbangConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more