This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 9073465a8 drivers/nrf5x/phy: use nrf52_clock_hfxo_request|release if 
PEBBLEOS
9073465a8 is described below

commit 9073465a8e5e58d0ad7d615182900c37db873c9a
Author: Gerard Marull-Paretas <[email protected]>
AuthorDate: Fri Jul 4 12:07:17 2025 +0200

    drivers/nrf5x/phy: use nrf52_clock_hfxo_request|release if PEBBLEOS
    
    On PebbleOS we need reference counted access to HFXO because other parts
    of the system rely on it (I2S). It seems like this needs a more generic
    solution (maybe a porting layer function?), as on a sufficiently complex
    system this will likely be needed. For now adding PEBBLEOS define check,
    similar to what was done for RIOT.
    
    Signed-off-by: Gerard Marull-Paretas <[email protected]>
---
 nimble/drivers/nrf5x/src/ble_phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nimble/drivers/nrf5x/src/ble_phy.c 
b/nimble/drivers/nrf5x/src/ble_phy.c
index 3deec7dd6..634d58071 100644
--- a/nimble/drivers/nrf5x/src/ble_phy.c
+++ b/nimble/drivers/nrf5x/src/ble_phy.c
@@ -2319,7 +2319,7 @@ ble_phy_dtm_carrier(uint8_t rf_channel)
 void
 ble_phy_rfclk_enable(void)
 {
-#if MYNEWT || defined(RIOT_VERSION)
+#if MYNEWT || defined(RIOT_VERSION) || defined(PEBBLEOS)
 #ifdef NRF52_SERIES
     nrf52_clock_hfxo_request();
 #endif
@@ -2334,7 +2334,7 @@ ble_phy_rfclk_enable(void)
 void
 ble_phy_rfclk_disable(void)
 {
-#if MYNEWT || defined(RIOT_VERSION)
+#if MYNEWT || defined(RIOT_VERSION) || defined(PEBBLEOS)
 #ifdef NRF52_SERIES
     nrf52_clock_hfxo_release();
 #endif

Reply via email to