npl/riot: map nrf52_clock_hfxo_request/release()
Compiling the hal_timer abstractions requires
nrf52_clock_hfxo_request() and _release() functions to be available.
This commit maps the appropriate RIOT functions in the NPL layer.
#include "sema.h"
#include "ztimer.h"
+#if defined(CPU_FAM_NRF51) || defined(CPU_FAM_NRF52)
+#include "nrf_clock.h"
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -270,6 +274,22 @@ ble_npl_hw_is_in_critical(void)
return (bool)!irq_is_enabled();
}
+/* XXX: these functions are required to build hal_timer.c, however with the
+* default configuration they are never used... */
+#if defined(CPU_FAM_NRF51) || defined(CPU_FAM_NRF52)
+static inline void
+nrf52_clock_hfxo_request(void)
+{
+ clock_hfxo_request();
+}
+
+static inline void
+nrf52_clock_hfxo_release(void)
+{
+ clock_hfxo_release();
+}
+#endif
+
#ifdef __cplusplus
}
#endif
