pub struct Serial<USART, PINS, WORD = u8> { /* fields omitted */ }
Expand description
impl<USART, TX, RX, WORD, const TXA: u8, const RXA: u8> Serial<USART, (TX, RX), WORD> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
impl<USART, TX, WORD, const TXA: u8> Serial<USART, (TX, NoPin), WORD> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
USART: Instance,
impl<USART, RX, WORD, const RXA: u8> Serial<USART, (NoPin, RX), WORD> where
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
impl<USART, PINS, WORD> Serial<USART, PINS, WORD> where
USART: Instance,
Starts listening for an interrupt event
Note, you will also have to enable the corresponding interrupt
in the NVIC to start receiving events.
Stop listening for an interrupt event
Return true if the line idle status is set
Return true if the tx register is empty (and can accept data)
👎 Deprecated since 0.10.0
Return true if the tx register is empty (and can accept data)
Return true if the rx register is not empty (and can be read)
👎 Deprecated since 0.10.0
Return true if the rx register is not empty (and can be read)
Clear idle line interrupt flag
Converts this Serial into a version that can read and write u16
values instead of u8
s
This can be used with a word length of 9 bits.
Converts this Serial into a version that can read and write u8
values instead of u16
s
This can be used with a word length of 8 bits.
impl<USART, TX, RX, const TXA: u8, const RXA: u8> Serial<USART, (TX, RX)> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
👎 Deprecated since 0.10.0
impl<USART, TX, RX, const TXA: u8, const RXA: u8> Serial<USART, (TX, RX)> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
👎 Deprecated since 0.10.0
impl<USART, TX, RX, const TXA: u8, const RXA: u8> Serial<USART, (TX, RX)> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
👎 Deprecated since 0.10.0
impl<USART, TX, RX, const TXA: u8, const RXA: u8> Serial<USART, (TX, RX)> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
👎 Deprecated since 0.10.0
impl<USART, TX, RX, const TXA: u8, const RXA: u8> Serial<USART, (TX, RX)> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
👎 Deprecated since 0.10.0
impl<USART, TX, RX, const TXA: u8, const RXA: u8> Serial<USART, (TX, RX)> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
👎 Deprecated since 0.10.0
impl<USART, TX, RX, const TXA: u8, const RXA: u8> Serial<USART, (TX, RX)> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
👎 Deprecated since 0.10.0
impl<USART, TX, RX, const TXA: u8, const RXA: u8> Serial<USART, (TX, RX)> where
TX: PinTx<USART, A = Const<TXA>> + SetAlternate<TXA>,
RX: PinRx<USART, A = Const<RXA>> + SetAlternate<RXA>,
USART: Instance,
👎 Deprecated since 0.10.0
impl<USART, PINS, WORD> AsMut<Rx<USART, WORD>> for Serial<USART, PINS, WORD>
impl<USART, PINS, WORD> AsMut<Tx<USART, WORD>> for Serial<USART, PINS, WORD>
impl<USART, PINS, WORD> AsRef<Rx<USART, WORD>> for Serial<USART, PINS, WORD>
impl<USART, PINS, WORD> AsRef<Tx<USART, WORD>> for Serial<USART, PINS, WORD>
Reads a single word from the serial interface
Writes a string slice into this writer, returning whether the write
succeeded. Read more
Writes a char
into this writer, returning whether the write succeeded. Read more
Glue for usage of the write!
macro with implementors of this trait. Read more
Ensures that none of the previously written words are still buffered
Writes a single word to the serial interface
The type of error that can occur when writing
Writes a slice, blocking until everything has been written Read more
Block until the serial interface has sent all buffered words
The type of error that can occur when writing
Writes a slice, blocking until everything has been written Read more
Block until the serial interface has sent all buffered words
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.