pub enum Event {
Protocol,
Byte,
Error,
}Expand description
An I²C event that can raise an interrupt.
Variants§
Protocol
The phase events SBSEND, ADDSEND, ADD10SEND, STPDET and BTC
(EVIE). Each is cleared by the step of the transaction that acts on it.
Byte
The byte events TBE and RBNE (BUFIE), on top of the phase ones.
Listening raises EVIE as well, BUFIE doing nothing without it in
hardware. TBE is true whenever nothing is queued, so a handler feeding
a buffer must unlisten this once the last byte is out — which leaves
the phase events standing, and BTC then ends the transaction.
Error
Any of the STAT0 error flags, which share one enable (ERRIE).
Cleared by take_error, which a handler must call —
nothing else drains them.
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