pub type SerialReadEventCallback = IsrCallback<SerialReadEventHandlerFunction, ReadHandlerResult<u8>>;
Aliased Type§
enum SerialReadEventCallback {
Nop(ReadHandlerResult<u8>),
Function(fn(_: Isolated, _: SerialPortIdentity, _: u8, _: Option<*const dyn Any>) -> ReadHandlerResult<u8>),
WithData(fn(_: Isolated, _: SerialPortIdentity, _: u8, _: Option<*const dyn Any>) -> ReadHandlerResult<u8>, *const dyn Any),
}
Variants§
Nop(ReadHandlerResult<u8>)
No Operation - dummy callback that evaluates to a fixed constant return value.
Function(fn(_: Isolated, _: SerialPortIdentity, _: u8, _: Option<*const dyn Any>) -> ReadHandlerResult<u8>)
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(fn(_: Isolated, _: SerialPortIdentity, _: u8, _: Option<*const dyn Any>) -> ReadHandlerResult<u8>, *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
)