Enum stm32f3xx_hal::serial::Event
source · #[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
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 Serial
s 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 Serial
s 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 Serial
s 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.