Type Alias avr_oxide::hal::generic::timer::TimerIsrFunction

source ·
pub type TimerIsrFunction = fn(_: Isolated, _: TimerIdentity, _: u16, _: Option<*const dyn Any>) -> bool;
Expand description

Callback called by a timer when it generates an interrupt. The callback is given the number of ticks counted since the last such event. The callback should return a boolean:

  • true: Continue timer running
  • false: Stop timer running

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.