[][src]Function rpi_pico_sdk::alarm_pool_add_repeating_timer_us

pub unsafe extern "C" fn alarm_pool_add_repeating_timer_us(
    pool: *mut alarm_pool_t,
    delay_us: i64,
    callback: repeating_timer_callback_t,
    user_data: *mut c_void,
    out: *mut repeating_timer_t
) -> bool

\brief Add a repeating timer that is called repeatedly at the specified interval in microseconds \ingroup repeating_timer

Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core the alarm pool was created on. 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.

\note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.

@param pool the alarm pool to use for scheduling the repeating timer (this determines which hardware alarm is used, and which core calls the callback) @param delay_us the repeat delay in microseconds; if >0 then this is the delay between one callback ending and the next starting; if <0 then this is the negative of the time between the starts of the callbacks. The value of 0 is treated as 1 @param callback the repeating timer callback function @param user_data user data to pass to store in the repeating_timer structure for use by the callback. @param out the pointer to the user owned structure to store the repeating timer info in. BEWARE this storage location must outlive the repeating timer, so be careful of using stack space @return false if there were no alarm slots available to create the timer, true otherwise.