pub enum Event {
Rbne,
Tbe,
Error,
ParityError,
}Expand description
A USART event that can raise an interrupt.
Variants§
Rbne
A byte arrived in RDATA, cleared by reading it.
Also carries overrun: ORERR reaches the NVIC through this enable as
well as through Error, and
read_byte acknowledges it either way.
Tbe
The transmit buffer is free — true at idle, so listening for this needs
unlisten from inside the handler once nothing is left to send.
Error
A framing, noise or overrun error.
Reaches the NVIC only while receiving through DMA: in hardware the
enable is ANDed with the DMA request line, so without it the interrupt
never fires. Cleared by take_error, which a
handler must call — nothing else drains these flags on the DMA path.
ParityError
The parity check failed.
Its own enable, separate from Error and not gated by
DMA. Cleared by take_error.
Trait Implementations§
impl Copy for Event
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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