Skip to content

Commit 9073465

Browse files
gmarullsjanc
authored andcommitted
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 <gerard@teslabs.com>
1 parent e48a0af commit 9073465

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

nimble/drivers/nrf5x/src/ble_phy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,7 +2319,7 @@ ble_phy_dtm_carrier(uint8_t rf_channel)
23192319
void
23202320
ble_phy_rfclk_enable(void)
23212321
{
2322-
#if MYNEWT || defined(RIOT_VERSION)
2322+
#if MYNEWT || defined(RIOT_VERSION) || defined(PEBBLEOS)
23232323
#ifdef NRF52_SERIES
23242324
nrf52_clock_hfxo_request();
23252325
#endif
@@ -2334,7 +2334,7 @@ ble_phy_rfclk_enable(void)
23342334
void
23352335
ble_phy_rfclk_disable(void)
23362336
{
2337-
#if MYNEWT || defined(RIOT_VERSION)
2337+
#if MYNEWT || defined(RIOT_VERSION) || defined(PEBBLEOS)
23382338
#ifdef NRF52_SERIES
23392339
nrf52_clock_hfxo_release();
23402340
#endif

0 commit comments

Comments
 (0)