pub struct Usart<'a, DMA: StreamServer<'a>> { /* private fields */ }
Implementations§
source§impl<'a> Usart<'a, Dma1<'a>>
impl<'a> Usart<'a, Dma1<'a>>
pub fn new_usart2(clocks: &'a dyn Stm32f4Clocks) -> Self
pub fn new_usart3(clocks: &'a dyn Stm32f4Clocks) -> Self
source§impl<'a> Usart<'a, Dma2<'a>>
impl<'a> Usart<'a, Dma2<'a>>
pub fn new_usart1(clocks: &'a dyn Stm32f4Clocks) -> Self
source§impl<'a, DMA: StreamServer<'a>> Usart<'a, DMA>
impl<'a, DMA: StreamServer<'a>> Usart<'a, DMA>
pub fn is_enabled_clock(&self) -> bool
pub fn enable_clock(&self)
pub fn disable_clock(&self)
pub fn set_dma(&self, tx_dma: TxDMA<'a, DMA>, rx_dma: RxDMA<'a, DMA>)
pub fn handle_interrupt(&self)
pub fn send_byte(&self, byte: u8)
Trait Implementations§
source§impl<'a, DMA: StreamServer<'a>> Configure for Usart<'a, DMA>
impl<'a, DMA: StreamServer<'a>> Configure for Usart<'a, DMA>
source§impl<'a, DMA: StreamServer<'a>> DeferredCallClient for Usart<'a, DMA>
impl<'a, DMA: StreamServer<'a>> DeferredCallClient for Usart<'a, DMA>
source§impl<'a, DMA: StreamServer<'a>> Receive<'a> for Usart<'a, DMA>
impl<'a, DMA: StreamServer<'a>> Receive<'a> for Usart<'a, DMA>
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> StreamClient<'a, Dma1<'a>> for Usart<'a, Dma1<'a>>
impl<'a> StreamClient<'a, Dma1<'a>> for Usart<'a, Dma1<'a>>
fn transfer_done(&self, pid: Dma1Peripheral)
source§impl<'a> StreamClient<'a, Dma2<'a>> for Usart<'a, Dma2<'a>>
impl<'a> StreamClient<'a, Dma2<'a>> for Usart<'a, Dma2<'a>>
fn transfer_done(&self, pid: Dma2Peripheral)
source§impl<'a, DMA: StreamServer<'a>> Transmit<'a> for Usart<'a, DMA>
impl<'a, DMA: StreamServer<'a>> Transmit<'a> for Usart<'a, DMA>
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, DMA> !Freeze for Usart<'a, DMA>
impl<'a, DMA> !RefUnwindSafe for Usart<'a, DMA>
impl<'a, DMA> !Send for Usart<'a, DMA>
impl<'a, DMA> !Sync for Usart<'a, DMA>
impl<'a, DMA> Unpin for Usart<'a, DMA>
impl<'a, DMA> !UnwindSafe for Usart<'a, DMA>
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