Enum stm32f3xx_hal::serial::Error[][src]

#[non_exhaustive]
pub enum Error {
    Framing,
    Noise,
    Overrun,
    Parity,
}
Expand description

Serial error

As these are status events, they can be converted to Events, via Into.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Framing

Framing error

This error is thrown by hardware when a de-synchronization, excessive noise or a break character is detected.

Noise

Noise error

This error is thrown by hardware when noise is detected on a received frame.

Overrun

RX buffer overrun

Cause

An overrun error occurs when a character is received when RXNE has not been reset. Data can not be transferred from the shift register to the RDR register until the RXNE bit is cleared. The RXNE flag is set after every byte received. An overrun error occurs if RXNE flag is set when the next data is received or the previous DMA request has not been serviced.

Behavior

  • The RDR content will not be lost. The previous data is available when a read to USART_RDR is performed.
  • The shift register will be overwritten. After that point, any data received during overrun is lost
Parity

Parity check error

This error is thrown by hardware when a parity error occurs in receiver mode.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

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.