mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-04 16:20:00 +00:00
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.
This commit is contained in:
committed by
Hauke Petersen
parent
70021b6dd8
commit
4fd03df543
@@ -27,6 +27,10 @@
|
||||
#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
|
||||
|
||||
Reference in New Issue
Block a user