Type Alias avr_oxide::hal::generic::twi::TwiCommandCompleteCallback

source ·
pub type TwiCommandCompleteCallback = IsrCallback<TwiCommandCompleteFunction, ()>;

Aliased Type§

enum TwiCommandCompleteCallback {
    Nop(()),
    Function(fn(_: Isolated, _: TwiIdentity, _: OxideResult<(Command<'static>, usize), TwiError>, _: Option<*const dyn Any>)),
    WithData(fn(_: Isolated, _: TwiIdentity, _: OxideResult<(Command<'static>, usize), TwiError>, _: Option<*const dyn Any>), *const dyn Any),
}

Variants§

§

Nop(())

No Operation - dummy callback that evaluates to a fixed constant return value.

§

Function(fn(_: Isolated, _: TwiIdentity, _: OxideResult<(Command<'static>, usize), TwiError>, _: Option<*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, which will be given a None value. The first parameter must be an isolation token (avr_oxide::concurrency::Isolated)

§

WithData(fn(_: Isolated, _: TwiIdentity, _: OxideResult<(Command<'static>, usize), TwiError>, _: Option<*const dyn Any>), *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)