Skip to content

Commit 6f2ecea

Browse files
committed
Fix clock drivers for nRF devices in Arduino.
1 parent 5e5591f commit 6f2ecea

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/nimble/nimble/drivers/nrf51/src/ble_phy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ ble_phy_resolv_list_disable(void)
15081508
void
15091509
ble_phy_rfclk_enable(void)
15101510
{
1511-
#if MYNEWT
1511+
#if MYNEWT || ARDUINO
15121512
nrf51_clock_hfxo_request();
15131513
#else
15141514
NRF_CLOCK->TASKS_HFCLKSTART = 1;
@@ -1518,7 +1518,7 @@ ble_phy_rfclk_enable(void)
15181518
void
15191519
ble_phy_rfclk_disable(void)
15201520
{
1521-
#if MYNEWT
1521+
#if MYNEWT || ARDUINO
15221522
nrf51_clock_hfxo_release();
15231523
#else
15241524
NRF_CLOCK->TASKS_HFCLKSTOP = 1;

src/nimble/nimble/drivers/nrf52/src/ble_phy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
19+
2020
#if defined(ARDUINO_ARCH_NRF5) && defined(NRF52_SERIES)
2121

2222
#include <stdint.h>
@@ -2100,7 +2100,7 @@ void ble_phy_disable_dtm(void)
21002100
void
21012101
ble_phy_rfclk_enable(void)
21022102
{
2103-
#if MYNEWT
2103+
#if MYNEWT || ARDUINO
21042104
nrf52_clock_hfxo_request();
21052105
#else
21062106
NRF_CLOCK->TASKS_HFCLKSTART = 1;
@@ -2110,7 +2110,7 @@ ble_phy_rfclk_enable(void)
21102110
void
21112111
ble_phy_rfclk_disable(void)
21122112
{
2113-
#if MYNEWT
2113+
#if MYNEWT || ARDUINO
21142114
nrf52_clock_hfxo_release();
21152115
#else
21162116
NRF_CLOCK->TASKS_HFCLKSTOP = 1;

0 commit comments

Comments
 (0)