Add an alarm callback to be called after a delay specified in microseconds Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.
if true, and the alarm time falls during this call before the alarm can be set, then the callback should be called during (by) this function instead
Return value
>0 the alarm id 0 if the alarm time passed before or during the call and fire_if_past was false <0 if there were no alarm slots available, or other error occurred
Notes
It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.
Examples
add_alarm_in_us() is referenced by 1 libraries and example projects: