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...
|
|
Detailed Description
Macro Definition Documentation
| #define NRF_BOOTLOADER_MS_TO_TICKS | ( | ms | ) | ((((uint64_t)(ms) * 32768)) / 1000) |
Macro for converting milliseconds to timer ticks.
- Parameters
-
[in] ms The milliseconds to convert.
- Returns
-
msconverted to ticks.
Function Documentation
| void nrf_bootloader_dfu_inactivity_timer_restart | ( | uint32_t | timeout_ticks , |
| nrf_bootloader_dfu_timeout_callback_t | callback | ||
| ) |
Function for restarting the inactivity timer.
- Note
- Calling this function cancels any previous calls to this function.
- Parameters
-
[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.
- Note
- The value can be 2^24 ticks too small if sampled immediately after the RTC counter wraps, but before the internal loop counter has been incremented.
- Returns
- The number of ticks since the RTC was started.
| 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.
- Parameters
-
[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.