#[repr(C)]pub struct RegisterBlock {
pub sr: u32,
pub dr: u32,
pub brr: u32,
pub cr1: u32,
pub cr2: u32,
pub cr3: u32,
pub gtpr: u32,
}Fields§
§sr: u32§dr: u32§brr: u32§cr1: u32§cr2: u32§cr3: u32§gtpr: u32Implementations§
Source§impl RegisterBlock
impl RegisterBlock
Sourcepub fn set_baud_rate(&mut self, brr_value: u32)
pub fn set_baud_rate(&mut self, brr_value: u32)
Set baud rate
Sourcepub fn is_tx_empty(&self) -> bool
pub fn is_tx_empty(&self) -> bool
Check if transmit buffer is empty
Sourcepub fn is_rx_not_empty(&self) -> bool
pub fn is_rx_not_empty(&self) -> bool
Check if data is received
Sourcepub fn write_data(&mut self, data: u8)
pub fn write_data(&mut self, data: u8)
Write data
Auto Trait Implementations§
impl Freeze for RegisterBlock
impl RefUnwindSafe for RegisterBlock
impl Send for RegisterBlock
impl Sync for RegisterBlock
impl Unpin for RegisterBlock
impl UnwindSafe for RegisterBlock
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