Type Alias avr_oxide::hal::generic::port::PinIsrFunction

source ·
pub type PinIsrFunction = fn(_: Isolated, _: &'static dyn Pin, _: PinIdentity, _: bool, _: Option<*const dyn Any>);
Expand description

Callback called by a pin when it generates an interrupt. The callback is given the new state read from the pin (true = high). The callback should return a boolean:

  • true: Continue generating interrupts for this pin
  • false: Disable generating interrupts for this pin

Note: The callback runs within the interrupt context - be careful about using mutual exclusion where necessary, and DO NOT DO HEAVY PROCESSING IN THE CALLBACK.