pub struct Uart<'a> { /* private fields */ }Implementations§
Source§impl<'a> Uart<'a>
impl<'a> Uart<'a>
pub fn new(registers: StaticRef<UsartRegisters>, instance: u8) -> Self
pub fn new_uart0() -> Self
pub fn new_uart4() -> Self
pub fn set_clocks(&self, clocks: &'a Clock)
pub fn set_flexcomm(&self, flexcomm: &'a Flexcomm)
pub fn set_clock_source(&self, source: FrgClockSource)
pub fn enable(&self)
pub fn disable(&self)
pub fn is_transmitting(&self) -> bool
pub fn enable_receive_interrupt(&self)
pub fn disable_receive_interrupt(&self)
pub fn uart_is_writable(&self) -> bool
pub fn uart_is_readable(&self) -> bool
pub fn send_byte(&self, data: u8)
pub fn receive_byte(&self) -> u8
pub fn handle_interrupt(&self)
pub fn is_configured(&self) -> bool
pub fn get_stat_raw(&self) -> u32
pub fn get_fifostat_raw(&self) -> u32
pub fn clear_fifo_errors(&self)
pub fn clear_status_flags_and_fifos(&self)
Trait Implementations§
Source§impl<'a> Receive<'a> for Uart<'a>
impl<'a> Receive<'a> for Uart<'a>
Source§fn set_receive_client(&self, client: &'a dyn ReceiveClient)
fn set_receive_client(&self, client: &'a dyn ReceiveClient)
Set the receive client, which will be called when reads complete.
Source§impl<'a> Transmit<'a> for Uart<'a>
impl<'a> Transmit<'a> for Uart<'a>
Source§fn set_transmit_client(&self, client: &'a dyn TransmitClient)
fn set_transmit_client(&self, client: &'a dyn TransmitClient)
Set the transmit client, which will be called when transmissions
complete.
Source§fn transmit_buffer(
&self,
tx_buffer: &'static mut [u8],
tx_len: usize,
) -> Result<(), (ErrorCode, &'static mut [u8])>
fn transmit_buffer( &self, tx_buffer: &'static mut [u8], tx_len: usize, ) -> Result<(), (ErrorCode, &'static mut [u8])>
Transmit a buffer of data. Read more
Auto Trait Implementations§
impl<'a> !Freeze for Uart<'a>
impl<'a> !RefUnwindSafe for Uart<'a>
impl<'a> !Send for Uart<'a>
impl<'a> !Sync for Uart<'a>
impl<'a> Unpin for Uart<'a>
impl<'a> !UnwindSafe for Uart<'a>
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