pub struct Serial<USART, PINS, WORD = u8> { /* private fields */ }
Expand description

Serial abstraction

Implementations

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

Converts this Serial into a version that can read and write u16 values instead of u8s

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 u16s

This can be used with a word length of 8 bits.

Trait Implementations

Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Error type
Read error
Reads a single word from the serial interface
Reads a single word from the serial interface

Return true if the line idle status is set

Return true if the rx register is not empty (and can be read)

Clear idle line interrupt flag

Return true if the tx register is empty (and can accept data)

Write error
Ensures that none of the previously written words are still buffered
Writes a single word to the serial interface
Ensures that none of the previously written words are still buffered
Writes a single word to the serial interface
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
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
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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.