30 #ifndef CODEBASE_MS_TIMER_H_    31 #define CODEBASE_MS_TIMER_H_    35 #include "common_util.h"    36 #include "nrf_peripherals.h"    38 #include "hal_clocks.h"    40 #if SYS_CFG_PRESENT == 1    41 #include "sys_config.h"    43 #ifndef RTC_USED_MS_TIMER     44 #define RTC_USED_MS_TIMER 1    48 #define MS_TIMER_RTC_USED           RTC_USED_MS_TIMER    51 #define MS_TIMER_CC_COUNT           CONCAT_3(RTC, MS_TIMER_RTC_USED, _CC_NUM)    55 #define MS_TIMER_FREQ               32768    59 #if ((MS_TIMER_FREQ < 8) || (MS_TIMER_FREQ > LFCLK_FREQ))    60 #error MS_TIMER_FREQ value should be between 8 and 32768    64 #define MS_TIMER_TICKS_MS(ms)                ((uint32_t) ROUNDED_DIV( (MS_TIMER_FREQ*(uint64_t)(ms)) , 1000) )    72 #if (MS_TIMER_CC_COUNT == 4) uint32_t ms_timer_get_current_count(void)
Return the current count (24 bit) of the RTC timer used.
 
#define CONCAT_2(p1, p2)
Concatenates or joins two parameters.
 
Repeated call of the timer.
 
bool ms_timer_get_on_status(ms_timer_num id)
 
Not a timer, just used to find the number of timers.
 
void ms_timer_init(uint32_t irq_priority)
 
ms_timer_mode
Enumeration to specify the mode of operation of the timer.
 
#define MS_TIMER_RTC_USED
 
void ms_timer_start(ms_timer_num id, ms_timer_mode mode, uint64_t ticks, void(*handler)(void))
 
ms_timer_num
Enumeration used for specifying the timers that can be used with a RTC peripheral.
 
void ms_timer_stop(ms_timer_num id)
 
One shot call of the timer.