Enum stm32f3xx_hal::serial::Error
source · #[non_exhaustive]pub enum Error {
Framing,
Noise,
Overrun,
Parity,
}
Expand description
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§
source§impl PartialEq for Error
impl PartialEq for Error
impl Copy for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more