Skip to content

Commit bb6af4d

Browse files
committed
TARGET_NORDIC: editorial corrections in 'sleep()' implementations to better fit mbed coding style.
1 parent f62d7e5 commit bb6af4d

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sleep.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ void sleep(void)
3232
SCB->SCR |= SCB_SCR_SEVONPEND_Msk;
3333

3434
// If the SoftDevice is enabled, its API must be used to go to sleep.
35-
if (softdevice_handler_isEnabled())
36-
{
35+
if (softdevice_handler_isEnabled()) {
3736
sd_power_mode_set(NRF_POWER_MODE_LOWPWR);
3837
sd_app_evt_wait();
39-
}
40-
else
41-
{
38+
} else {
4239
NRF_POWER->TASKS_LOWPWR = 1;
4340

4441
// Note: it is not sufficient to just use WFE here, since the internal

targets/TARGET_NORDIC/TARGET_NRF5/sleep.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ void sleep(void)
3232
SCB->SCR |= SCB_SCR_SEVONPEND_Msk;
3333

3434
// If the SoftDevice is enabled, its API must be used to go to sleep.
35-
if (softdevice_handler_isEnabled())
36-
{
35+
if (softdevice_handler_isEnabled()) {
3736
sd_power_mode_set(NRF_POWER_MODE_LOWPWR);
3837
sd_app_evt_wait();
39-
}
40-
else
41-
{
38+
} else {
4239
NRF_POWER->TASKS_LOWPWR = 1;
4340

4441
// Note: it is not sufficient to just use WFE here, since the internal

0 commit comments

Comments
 (0)