Enum stm32f3xx_hal::serial::Event[][src]

#[non_exhaustive]
pub enum Event {
    TransmitDataRegisterEmtpy,
    CtsInterrupt,
    TransmissionComplete,
    ReceiveDataRegisterNotEmpty,
    OverrunError,
    Idle,
    ParityError,
    NoiseError,
    FramingError,
    LinBreak,
    CharacterMatch,
    ReceiverTimeout,
}
Expand description

Interrupt and status events.

All events can be cleared by Serial::clear_event or Serial::clear_events. Some events are also cleared on other conditions.

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.
TransmitDataRegisterEmtpy

Transmit data register empty / new data can be sent.

This event is set by hardware when the content of the TDR register has been transferred into the shift register. It is cleared by Serials serial::Write::write() implementation to the TDR register.

CtsInterrupt

CTS (Clear to Send) event.

This event is set by hardware when the CTS input toggles, if the CTSE bit is set.

TransmissionComplete

Transmission complete

This event is set by hardware if the transmission of a frame containing data is complete and if TXE is set. It is cleared by Serials serial::Write::write() implementaiton to the USART_TDR register.

ReceiveDataRegisterNotEmpty

Read data register not empty / new data has been received.

This event is set by hardware when the content of the RDR shift register has been transferred to the RDR register. It is cleared by Serials serial::Read::read() to the USART_RDR register.

OverrunError

Overrun Error detected.

This event is set by hardware when the data currently being received in the shift register is ready to be transferred into the RDR register while Event::ReceiveDataRegisterNotEmpty is set.

See Error::Overrun for a more detailed description.

Idle

Idle line state detected.

This event is set by hardware when an Idle Line is detected.

ParityError

Parity error detected.

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

Parity can be configured by using config::Parity to create a config::Config.

NoiseError

Noise error detected.

This event is set by hardware when noise is detected on a received frame.

FramingError

Framing error detected

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

LinBreak

LIN break

This bit is set by hardware when the LIN break is detected.

CharacterMatch

The received character matched the configured character.

The matching character can be configured with Serial::match_character()

ReceiverTimeout

Nothing was received since the last received character for Serial::receiver_timeout() amount of time.

Note

Never set for UART peripheral, which does not have ReceiverTimeoutExt implemented.

Trait Implementations

The resulting type after applying the & operator.

Performs the & operation. Read more

The resulting type after applying the | operator.

Performs the | operation. Read more

The resulting type after applying the ^ operator.

Performs the ^ operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The underlying type used to store the bitset.

A mask of bits that are valid in the bitset.

Converts an enum of this type into its bit position.

Converts a bit position into an enum value.

Performs the conversion.

The resulting type after applying the ! operator.

Performs the unary ! operation. Read more

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

This method tests for !=.

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

This method tests for !=.

The resulting type after applying the - operator.

Performs the - operation. Read more

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.