123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #ifndef NRF_BOOTLOADER_DFU_TIMERS_H__
- #define NRF_BOOTLOADER_DFU_TIMERS_H__
- #include <stdint.h>
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- #define NRF_BOOTLOADER_MIN_TIMEOUT_TICKS (150)
- #define NRF_BOOTLOADER_MS_TO_TICKS(ms) ((((uint64_t)(ms) * 32768)) / 1000)
- typedef void (*nrf_bootloader_dfu_timeout_callback_t)(void);
- void nrf_bootloader_dfu_inactivity_timer_restart(uint32_t timeout_ticks,
- nrf_bootloader_dfu_timeout_callback_t callback);
- void nrf_bootloader_wdt_feed_timer_start(uint32_t timeout_ticks,
- nrf_bootloader_dfu_timeout_callback_t callback);
- uint32_t nrf_bootloader_dfu_timer_counter_get(void);
- #ifdef __cplusplus
- }
- #endif
- #endif
|