pub struct Serial<USART> { /* private fields */ }
Expand description

Serial abstraction

Implementations

Starts listening for an interrupt event

Stop listening for an interrupt event

Returns a pending and enabled Event.

Multiple Events can be signaled at the same time. In that case, an arbitrary pending event will be returned. Clearing the event condition will cause this method to return the other pending event(s).

For an event to be returned by this method, it must first be enabled by calling listen.

This method will never clear a pending event. If the event condition is not resolved by the user, it will be returned again by the next call to pending_event.

Checks for reception errors that may have occurred.

Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.

Clears any signaled errors without returning them.

Starts listening for an interrupt event

Stop listening for an interrupt event

Returns a pending and enabled Event.

Multiple Events can be signaled at the same time. In that case, an arbitrary pending event will be returned. Clearing the event condition will cause this method to return the other pending event(s).

For an event to be returned by this method, it must first be enabled by calling listen.

This method will never clear a pending event. If the event condition is not resolved by the user, it will be returned again by the next call to pending_event.

Checks for reception errors that may have occurred.

Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.

Clears any signaled errors without returning them.

Starts listening for an interrupt event

Stop listening for an interrupt event

Returns a pending and enabled Event.

Multiple Events can be signaled at the same time. In that case, an arbitrary pending event will be returned. Clearing the event condition will cause this method to return the other pending event(s).

For an event to be returned by this method, it must first be enabled by calling listen.

This method will never clear a pending event. If the event condition is not resolved by the user, it will be returned again by the next call to pending_event.

Checks for reception errors that may have occurred.

Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.

Clears any signaled errors without returning them.

Starts listening for an interrupt event

Stop listening for an interrupt event

Returns a pending and enabled Event.

Multiple Events can be signaled at the same time. In that case, an arbitrary pending event will be returned. Clearing the event condition will cause this method to return the other pending event(s).

For an event to be returned by this method, it must first be enabled by calling listen.

This method will never clear a pending event. If the event condition is not resolved by the user, it will be returned again by the next call to pending_event.

Checks for reception errors that may have occurred.

Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.

Clears any signaled errors without returning them.

Starts listening for an interrupt event

Stop listening for an interrupt event

Returns a pending and enabled Event.

Multiple Events can be signaled at the same time. In that case, an arbitrary pending event will be returned. Clearing the event condition will cause this method to return the other pending event(s).

For an event to be returned by this method, it must first be enabled by calling listen.

This method will never clear a pending event. If the event condition is not resolved by the user, it will be returned again by the next call to pending_event.

Checks for reception errors that may have occurred.

Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.

Clears any signaled errors without returning them.

Switches LPUART1 clock course to LSE

Consumes LSE token, to get guarantee that LSE clocks are configured.

At the moment configured baudrate is ignored and LPUART1 is forced to 9600 when clocked by LSE, assuming that LSE is 32768 (and it must be so according to RM).

Trait Implementations

Read error

Reads a single word from the serial interface

Read error

Reads a single word from the serial interface

Read error

Reads a single word from the serial interface

Read error

Reads a single word from the serial interface

Read error

Reads a single word from the serial interface

Write error

Ensures that none of the previously written words are still buffered

Writes a single word to the serial interface

Write error

Ensures that none of the previously written words are still buffered

Writes a single word to the serial interface

Write error

Ensures that none of the previously written words are still buffered

Writes a single word to the serial interface

Write error

Ensures that none of the previously written words are still buffered

Writes a single word to the serial interface

Write error

Ensures that none of the previously written words are still buffered

Writes a single word to 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

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.