23#ifndef NRF52_NRF_CLOCK_H
24#define NRF52_NRF_CLOCK_H
29#include_next "nrf_clock.h"
37#define NRF_CLOCK_HFCLK_HIGH_ACCURACY (1UL)
38#define NRF_CLOCK_EVENT_HFCLKSTARTED offsetof(NRF_CLOCK_Type, EVENTS_HFCLKSTARTED)
41 NRF_CLOCK_TASK_HFCLKSTART,
42 NRF_CLOCK_TASK_HFCLKSTOP,
56static bool _nrf_clock_hf_running =
false;
61static inline bool nrf_clock_hf_is_running(NRF_CLOCK_Type
const *reg,
65 return _nrf_clock_hf_running;
74static inline bool nrf_clock_event_clear(NRF_CLOCK_Type *reg, uint32_t
event)
86static inline void nrf_clock_task_trigger(NRF_CLOCK_Type *reg,
87 nrf_clock_task_t task)
90 case NRF_CLOCK_TASK_HFCLKSTART:
92 _nrf_clock_hf_running =
true;
94 case NRF_CLOCK_TASK_HFCLKSTOP:
96 _nrf_clock_hf_running =
false;
void clock_hfxo_request(void)
Request the external high frequency crystal (HFXO) as HF clock source.
void clock_hfxo_release(void)
Release the use of the HFXO.