pub struct UartFuture<C, D, R = NoneT, T = NoneT>where
    C: ValidConfig,
    D: Capability,{ /* private fields */ }Expand description
async version of a Uart.
Create this struct by calling Uart::into_future.
Implementations§
Source§impl<C, D, R, T> UartFuture<C, D, R, T>
 
impl<C, D, R, T> UartFuture<C, D, R, T>
Sourcepub fn take_rx_channel(self) -> (UartFuture<C, D, NoneT, T>, R)
 
pub fn take_rx_channel(self) -> (UartFuture<C, D, NoneT, T>, R)
Reclaim the RX DMA channel. Subsequent RX operations will no longer use DMA.
Source§impl<C, D, R, T> UartFuture<C, D, R, T>
 
impl<C, D, R, T> UartFuture<C, D, R, T>
Sourcepub fn take_tx_channel(self) -> (UartFuture<C, D, R, NoneT>, T)
 
pub fn take_tx_channel(self) -> (UartFuture<C, D, R, NoneT>, T)
Reclaim the TX DMA channel. Subsequent TX operations will no longer use DMA.
Source§impl<C, D, S, R, T> UartFuture<C, D, R, T>where
    C: ValidConfig<Sercom = S>,
    C::Word: Beat,
    D: Receive,
    S: Sercom + 'static,
    DataReg: AsPrimitive<C::Word>,
    R: AnyChannel<Status = ReadyFuture>,
 
impl<C, D, S, R, T> UartFuture<C, D, R, T>where
    C: ValidConfig<Sercom = S>,
    C::Word: Beat,
    D: Receive,
    S: Sercom + 'static,
    DataReg: AsPrimitive<C::Word>,
    R: AnyChannel<Status = ReadyFuture>,
Source§impl<C, D, S, R, T> UartFuture<C, D, R, T>where
    C: ValidConfig<Sercom = S>,
    C::Word: Beat,
    D: Transmit,
    S: Sercom + 'static,
    T: AnyChannel<Status = ReadyFuture>,
 
impl<C, D, S, R, T> UartFuture<C, D, R, T>where
    C: ValidConfig<Sercom = S>,
    C::Word: Beat,
    D: Transmit,
    S: Sercom + 'static,
    T: AnyChannel<Status = ReadyFuture>,
Source§impl<C, R, T> UartFuture<C, Duplex, R, T>where
    C: ValidConfig,
 
impl<C, R, T> UartFuture<C, Duplex, R, T>where
    C: ValidConfig,
Sourcepub fn split(
    self,
) -> (UartFuture<C, RxDuplex, R, NoneT>, UartFuture<C, TxDuplex, NoneT, T>)
 
pub fn split( self, ) -> (UartFuture<C, RxDuplex, R, NoneT>, UartFuture<C, TxDuplex, NoneT, T>)
Split the UartFuture into RxDuplexand TxDuplex halves.
Sourcepub fn join(
    rx: UartFuture<C, RxDuplex, R, NoneT>,
    tx: UartFuture<C, TxDuplex, NoneT, T>,
) -> Self
 
pub fn join( rx: UartFuture<C, RxDuplex, R, NoneT>, tx: UartFuture<C, TxDuplex, NoneT, T>, ) -> Self
Source§impl<C, D> UartFuture<C, D, NoneT, NoneT>where
    C: ValidConfig,
    D: SingleOwner,
 
impl<C, D> UartFuture<C, D, NoneT, NoneT>where
    C: ValidConfig,
    D: SingleOwner,
Source§impl<C, D, S, R, T> UartFuture<C, D, R, T>
 
impl<C, D, S, R, T> UartFuture<C, D, R, T>
Sourcepub fn with_rx_dma_channel<Chan: AnyChannel<Status = ReadyFuture>>(
    self,
    rx_channel: Chan,
) -> UartFuture<C, D, Chan, T>
 
pub fn with_rx_dma_channel<Chan: AnyChannel<Status = ReadyFuture>>( self, rx_channel: Chan, ) -> UartFuture<C, D, Chan, T>
Use a DMA channel for receiving words on the RX line
Source§impl<C, D, S, T> UartFuture<C, D, NoneT, T>
 
impl<C, D, S, T> UartFuture<C, D, NoneT, T>
Source§impl<C, D, S, R, T> UartFuture<C, D, R, T>
 
impl<C, D, S, R, T> UartFuture<C, D, R, T>
Sourcepub fn with_tx_dma_channel<Chan: AnyChannel<Status = ReadyFuture>>(
    self,
    tx_channel: Chan,
) -> UartFuture<C, D, R, Chan>
 
pub fn with_tx_dma_channel<Chan: AnyChannel<Status = ReadyFuture>>( self, tx_channel: Chan, ) -> UartFuture<C, D, R, Chan>
Use a DMA channel for sending words on the TX line
Sourcepub async fn write_word(&mut self, word: C::Word)
 
pub async fn write_word(&mut self, word: C::Word)
Write a single Word to the UART.
Trait Implementations§
Source§impl<C, D, R, T, S> AsMut<Uart<C, D, R, T>> for UartFuture<C, D, R, T>
 
impl<C, D, R, T, S> AsMut<Uart<C, D, R, T>> for UartFuture<C, D, R, T>
Source§impl<C, D, R, T, S> AsRef<Uart<C, D, R, T>> for UartFuture<C, D, R, T>
 
impl<C, D, R, T, S> AsRef<Uart<C, D, R, T>> for UartFuture<C, D, R, T>
Source§impl<C, D, R, T> ErrorType for UartFuture<C, D, R, T>where
    C: ValidConfig,
    D: Capability,
 
impl<C, D, R, T> ErrorType for UartFuture<C, D, R, T>where
    C: ValidConfig,
    D: Capability,
Source§impl<C, D, S, R> Read for UartFuture<C, D, NoneT, R>
 
impl<C, D, S, R> Read for UartFuture<C, D, NoneT, R>
Source§async fn read(&mut self, buffer: &mut [u8]) -> Result<usize, Self::Error>
 
async fn read(&mut self, buffer: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§async fn read_exact(
    &mut self,
    buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
 
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill 
buf. Read moreSource§impl<C, D, S, R, T> Read for UartFuture<C, D, R, T>where
    C: ValidConfig<Sercom = S, Word = u8>,
    D: Receive,
    S: Sercom + 'static,
    DataReg: AsPrimitive<C::Word>,
    R: AnyChannel<Status = ReadyFuture>,
 
impl<C, D, S, R, T> Read for UartFuture<C, D, R, T>where
    C: ValidConfig<Sercom = S, Word = u8>,
    D: Receive,
    S: Sercom + 'static,
    DataReg: AsPrimitive<C::Word>,
    R: AnyChannel<Status = ReadyFuture>,
Source§async fn read(&mut self, words: &mut [u8]) -> Result<usize, Error>
 
async fn read(&mut self, words: &mut [u8]) -> Result<usize, Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§async fn read_exact(
    &mut self,
    buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
 
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill 
buf. Read moreSource§impl<C, D, S, R> Write for UartFuture<C, D, R, NoneT>
 
impl<C, D, S, R> Write for UartFuture<C, D, R, NoneT>
Source§async fn write(&mut self, buffer: &[u8]) -> Result<usize, Self::Error>
 
async fn write(&mut self, buffer: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§impl<C, D, S, R, T> Write for UartFuture<C, D, R, T>where
    C: ValidConfig<Sercom = S, Word = u8>,
    D: Transmit,
    S: Sercom + 'static,
    T: AnyChannel<Status = ReadyFuture>,
 
impl<C, D, S, R, T> Write for UartFuture<C, D, R, T>where
    C: ValidConfig<Sercom = S, Word = u8>,
    D: Transmit,
    S: Sercom + 'static,
    T: AnyChannel<Status = ReadyFuture>,
Source§async fn write(&mut self, words: &[u8]) -> Result<usize, Error>
 
async fn write(&mut self, words: &[u8]) -> Result<usize, Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Auto Trait Implementations§
impl<C, D, R, T> Freeze for UartFuture<C, D, R, T>
impl<C, D, R, T> RefUnwindSafe for UartFuture<C, D, R, T>
impl<C, D, R, T> Send for UartFuture<C, D, R, T>
impl<C, D, R, T> Sync for UartFuture<C, D, R, T>
impl<C, D, R, T> Unpin for UartFuture<C, D, R, T>
impl<C, D, R, T> UnwindSafe for UartFuture<C, D, R, T>
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