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
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.
CTS (Clear to Send) event.
This event is set by hardware when the CTS input toggles, if the CTSE bit is set.
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.
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.
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 line state detected.
This event is set by hardware when an Idle Line is detected.
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.
Noise error detected.
This event is set by hardware when noise is detected on a received frame.
Framing error detected
This event is set by hardware when a de-synchronization, excessive noise or a break character is detected.
LIN break
This bit is set by hardware when the LIN break is detected.
The received character matched the configured character.
The matching character can be configured with Serial::match_character()
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
type Repr = u16
type Repr = u16
The underlying type used to store the bitset.
Converts an enum of this type into its bit position.
Converts a bit position into an enum value.