Enum avr_oxide::event::OxideEvent
source · pub enum OxideEvent {
Initialise,
ClockTick(TimerIdentity, u16),
ButtonEvent(PinIdentity, ButtonState),
SerialEvent(SerialPortIdentity, SerialState),
}
Expand description
Events that can cause your application to wake up and need to do something.
Variants§
Initialise
Sent when the system starts up to allow the application to process any initialisation tasks it needs. This is guaranteed to be the first event received by the application program.
ClockTick(TimerIdentity, u16)
Sent when a clock timer tick interrupt occurs. The number of ticks is included. (This will usually be 1, of course, but if events are coalesced by the queue it may be greater.)
ButtonEvent(PinIdentity, ButtonState)
Sent when a button event occurs. The state of the button when the event was generated is included.
SerialEvent(SerialPortIdentity, SerialState)
Sent when a serial port event occurs.
Trait Implementations§
source§impl Clone for OxideEvent
impl Clone for OxideEvent
source§fn clone(&self) -> OxideEvent
fn clone(&self) -> OxideEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl PartialEq for OxideEvent
impl PartialEq for OxideEvent
source§fn eq(&self, other: &OxideEvent) -> bool
fn eq(&self, other: &OxideEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Persist for OxideEvent
impl Persist for OxideEvent
source§fn load_from<R: Read>(reader: &mut R) -> PersistenceResult<Self>where
Self: Sized,
fn load_from<R: Read>(reader: &mut R) -> PersistenceResult<Self>where
Self: Sized,
Load an instance of this Enum from the given reader
source§fn save_to<W: Write>(&self, writer: &mut W) -> PersistenceResult<()>
fn save_to<W: Write>(&self, writer: &mut W) -> PersistenceResult<()>
Save an instance of this Enum to the given writer.
source§fn load_with<R: Read>(reader: R) -> PersistenceResult<Self>
fn load_with<R: Read>(reader: R) -> PersistenceResult<Self>
Take the given reader and use it to load an instance of this type.
source§impl uDebug for OxideEvent
impl uDebug for OxideEvent
impl Copy for OxideEvent
impl Eq for OxideEvent
impl StructuralPartialEq for OxideEvent
Auto Trait Implementations§
impl Freeze for OxideEvent
impl RefUnwindSafe for OxideEvent
impl Send for OxideEvent
impl Sync for OxideEvent
impl Unpin for OxideEvent
impl UnwindSafe for OxideEvent
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