You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ha...@apache.org on 2021/10/22 09:32:57 UTC
[mynewt-nimble] 02/02: npl/riot: map
nrf52_clock_hfxo_request/release()
This is an automated email from the ASF dual-hosted git repository.
hauke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 4fd03df5433617284294078ac4dc39e3b16a569c
Author: Hauke Petersen <ha...@fu-berlin.de>
AuthorDate: Wed Oct 20 17:22:31 2021 +0200
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.
---
porting/npl/riot/include/nimble/nimble_npl_os.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/porting/npl/riot/include/nimble/nimble_npl_os.h b/porting/npl/riot/include/nimble/nimble_npl_os.h
index ee0dfab..4633cbd 100644
--- a/porting/npl/riot/include/nimble/nimble_npl_os.h
+++ b/porting/npl/riot/include/nimble/nimble_npl_os.h
@@ -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