pub struct Uarte<'a> { /* private fields */ }
Expand description
UARTE
Implementations§
source§impl<'a> Uarte<'a>
impl<'a> Uarte<'a>
sourcepub const fn new(regs: StaticRef<UarteRegisters>) -> Uarte<'a>
pub const fn new(regs: StaticRef<UarteRegisters>) -> Uarte<'a>
Constructor
sourcepub fn initialize(
&self,
txd: Pinmux,
rxd: Pinmux,
cts: Option<Pinmux>,
rts: Option<Pinmux>,
)
pub fn initialize( &self, txd: Pinmux, rxd: Pinmux, cts: Option<Pinmux>, rts: Option<Pinmux>, )
Configure which pins the UART should use for txd, rxd, cts and rts
sourcepub fn handle_interrupt(&self)
pub fn handle_interrupt(&self)
UART interrupt handler that listens for both tx_end and rx_end events
Trait Implementations§
source§impl<'a> Receive<'a> for Uarte<'a>
impl<'a> Receive<'a> for Uarte<'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 Uarte<'a>
impl<'a> Transmit<'a> for Uarte<'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_data: &'static mut [u8],
tx_len: usize,
) -> Result<(), (ErrorCode, &'static mut [u8])>
fn transmit_buffer( &self, tx_data: &'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 Uarte<'a>
impl<'a> !RefUnwindSafe for Uarte<'a>
impl<'a> !Send for Uarte<'a>
impl<'a> !Sync for Uarte<'a>
impl<'a> Unpin for Uarte<'a>
impl<'a> !UnwindSafe for Uarte<'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