50 #ifndef BSPACM_DEVICE_NRF51_INTERNAL_UTILITY_HIRES_H
51 #define BSPACM_DEVICE_NRF51_INTERNAL_UTILITY_HIRES_H
59 #ifndef BSPACM_HIRES_TIMER_BASE
65 #define BSPACM_HIRES_TIMER_BASE NRF_TIMER1_BASE
76 #if NRF_TIMER0_BASE == BSPACM_HIRES_TIMER_BASE
77 #define BSPACM_HIRES_TIMER NRF_TIMER0
78 #elif NRF_TIMER1_BASE == BSPACM_HIRES_TIMER_BASE
79 #define BSPACM_HIRES_TIMER NRF_TIMER1
80 #elif NRF_TIMER2_BASE == BSPACM_HIRES_TIMER_BASE
81 #define BSPACM_HIRES_TIMER NRF_TIMER2
83 #error Unrecognized high-resolution timer
162 return dur_us << shift;
164 return dur_us >> -shift;
174 return dur_hrt >> shift;
176 return dur_hrt << -shift;
unsigned int uiBSPACMhiresConvert_hfclk_hrt(unsigned int dur_hfclk)
Definition: hires.h:133
unsigned int uiBSPACMhires(void)
Definition: hires.h:123
unsigned int uiBSPACMhiresConvert_hrt_us(unsigned int dur_hrt)
Definition: hires.h:170
unsigned int uiBSPACMhiresConvert_us_hfclk(unsigned int dur_us)
Definition: hires.h:150
unsigned int uiBSPACMhiresConvert_us_hrt(unsigned int dur_us)
Definition: hires.h:158
Common header included by all BSPACM leaf headers.
unsigned int uiBSPACMhiresConvert_hrt_hfclk(unsigned int dur_hrt)
Definition: hires.h:142
#define BSPACM_HIRES_TIMER
Definition: hires.h:77
int iBSPACMhiresInitialize(unsigned int freq_Hz)
bool bBSPACMhiresEnabled(void)
void vBSPACMhiresSleep_us(unsigned long count_us)
void vBSPACMhiresSleep_ms(unsigned long count_ms)
Definition: hires.h:216
int iBSPACMhiresSetEnabled(bool enabled)