pub struct Lpuart<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Lpuart<'a>
impl<'a> Lpuart<'a>
pub fn new_lpuart1(ccm: &'a Ccm) -> Self
pub fn new_lpuart2(ccm: &'a Ccm) -> Self
Sourcepub fn set_tx_dma_channel(&'static self, dma_channel: &'static DmaChannel)
pub fn set_tx_dma_channel(&'static self, dma_channel: &'static DmaChannel)
Set the DMA channel for transferring data from this UART peripheral
Sourcepub fn set_rx_dma_channel(&'static self, dma_channel: &'static DmaChannel)
pub fn set_rx_dma_channel(&'static self, dma_channel: &'static DmaChannel)
Set the DMA channel used for receiving data from this UART peripheral
pub fn is_enabled_clock(&self) -> bool
pub fn enable_clock(&self)
pub fn disable_clock(&self)
pub fn set_baud(&self)
pub fn send_byte(&self, byte: u8)
Sourcepub fn is_transmit_enabled(&self) -> bool
pub fn is_transmit_enabled(&self) -> bool
Returns true if the transmit is enabled
Sourcepub fn is_receive_enabled(&self) -> bool
pub fn is_receive_enabled(&self) -> bool
Returns true
if receive is enabled
pub fn handle_interrupt(&self)
Trait Implementations§
Source§impl DmaClient for Lpuart<'_>
impl DmaClient for Lpuart<'_>
Source§fn transfer_complete(&self, result: Result)
fn transfer_complete(&self, result: Result)
Handle the completion of a DMA transfer, which either succeeded or failed.
Source§impl<'a> Receive<'a> for Lpuart<'a>
impl<'a> Receive<'a> for Lpuart<'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 Lpuart<'a>
impl<'a> Transmit<'a> for Lpuart<'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 Lpuart<'a>
impl<'a> !RefUnwindSafe for Lpuart<'a>
impl<'a> !Send for Lpuart<'a>
impl<'a> !Sync for Lpuart<'a>
impl<'a> Unpin for Lpuart<'a>
impl<'a> !UnwindSafe for Lpuart<'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