pub enum IsrCallback<F, R> {
Nop(R),
Function(F),
WithData(F, *const dyn Any),
}
Expand description
Represents a callback function from an interrupt service routine.
Variants§
Nop(R)
No Operation - dummy callback that evaluates to a fixed constant return value.
Function(F)
A function/closure callback. This will be called when the interrupt
service routine needs it; the function signature is context dependent,
however the last parameter will always be an Option<&'static dyn Any>
user-data field, which will be given a None
value.
The first parameter must be an isolation token
(avr_oxide::concurrency::Isolated
)
WithData(F, *const dyn Any)
A function/closure callback. This will be called when the interrupt
service routine needs it; the function signature is context dependent,
however the last parameter will always be an Option<&'static dyn Any>
user-data field, into which the given data will be passed as Some()
value.
The first parameter must be an isolation token
(avr_oxide::concurrency::Isolated
)
Implementations§
Trait Implementations§
source§impl<F: Clone, R: Clone> Clone for IsrCallback<F, R>
impl<F: Clone, R: Clone> Clone for IsrCallback<F, R>
source§fn clone(&self) -> IsrCallback<F, R>
fn clone(&self) -> IsrCallback<F, R>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more