Macros | |
#define | NRF_BOOTLOADER_MIN_TIMEOUT_TICKS (150) |
The shortest timeout allowed. To avoid the timeout not being activated before the time has passed. | |
#define | NRF_BOOTLOADER_MS_TO_TICKS(ms) ((((uint64_t)(ms) * 32768)) / 1000) |
Macro for converting milliseconds to timer ticks. More... | |
Typedefs | |
typedef void(* | nrf_bootloader_dfu_timeout_callback_t )(void) |
Handler called on timeout of a timer requested by the watchdog. | |
Functions | |
void | nrf_bootloader_dfu_inactivity_timer_restart (uint32_t timeout_ticks, nrf_bootloader_dfu_timeout_callback_t callback) |
Function for restarting the inactivity timer. More... | |
void | nrf_bootloader_wdt_feed_timer_start (uint32_t timeout_ticks, nrf_bootloader_dfu_timeout_callback_t callback) |
Function for initializing and starting a repeated timer for feeding the watchdog. More... | |
uint32_t | nrf_bootloader_dfu_timer_counter_get (void) |
Function for retrieving the number of ticks since the RTC was started. More... | |
#define NRF_BOOTLOADER_MS_TO_TICKS | ( | ms | ) | ((((uint64_t)(ms) * 32768)) / 1000) |
Macro for converting milliseconds to timer ticks.
[in] | ms | The milliseconds to convert. |
ms
converted to ticks. void nrf_bootloader_dfu_inactivity_timer_restart | ( | uint32_t | timeout_ticks, |
nrf_bootloader_dfu_timeout_callback_t | callback | ||
) |
Function for restarting the inactivity timer.
[in] | timeout_ticks | The number of ticks until reset. There are 32768 ticks per second. If 0 is passed, the timer will be stopped and not restarted. |
[in] | callback | Function to be called on timeout. |
uint32_t nrf_bootloader_dfu_timer_counter_get | ( | void | ) |
Function for retrieving the number of ticks since the RTC was started.
There are 32768 ticks per second. This value does not wrap, even when the RTC counter wraps.
void nrf_bootloader_wdt_feed_timer_start | ( | uint32_t | timeout_ticks, |
nrf_bootloader_dfu_timeout_callback_t | callback | ||
) |
Function for initializing and starting a repeated timer for feeding the watchdog.
[in] | timeout_ticks | The number of ticks between each feeding of the watchdog. There are 32768 ticks per second. |
[in] | callback | Function called on every timeout. |