void app_timer_cancel | ( | AppTimer * | timer_handle) |
Cancels an already registered timer. Once cancelled the the handle may longer be used for any purpose.
AppTimer* app_timer_register | ( | uint32_t | timeout_ms, |
AppTimerCallback | callback, | ||
void * | callback_data | ||
) |
Registers a timer that ends up in callback being called some specified time in the future.
timeout_ms | The expiry time in milliseconds from the current time |
callback | The callback that gets called at expiry time |
callback_data | The data that will be passed to callback |
bool app_timer_reschedule | ( | AppTimer * | timer_handle, |
uint32_t | new_timeout_ms | ||
) |
Reschedules an already running timer for some point in the future.
timer_handle | The timer to reschedule |
new_timeout_ms | The new expiry time in milliseconds from the current time |
void psleep | ( | int | millis) |
Waits for a certain amount of milliseconds.
millis | The number of milliseconds to wait for |
typedef void(* AppTimerCallback)(void *data) |
The type of function which can be called when a timer fires. The argument will be the callback_data
passed to app_timer_register().