Skip to content

Commit 21d0920

Browse files
committed
Use mbed_sleep API instead of Silicon Labs specific sleepmode API
1 parent a2514fd commit 21d0920

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

features/nanostack/FEATURE_NANOSTACK/targets/TARGET_SL_RAIL/NanostackRfPhyEfr32.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
#include <string.h>
1919

2020
#include "mbed.h"
21+
#include "mbed_sleep.h"
2122
#include "ns_types.h"
2223
#include "platform/arm_hal_interrupt.h"
2324
#include "nanostack/platform/arm_hal_phy.h"
2425
#include "mbed_toolchain.h"
25-
#include "sleepmodes.h"
2626

2727
#include "mbed-trace/mbed_trace.h"
2828
#define TRACE_GROUP "SLRF"
@@ -482,7 +482,7 @@ static void rf_device_unregister(void)
482482
{
483483
arm_net_phy_unregister(rf_radio_driver_id);
484484
if(sleep_blocked) {
485-
unblockSleepMode(EM1);
485+
sleep_manager_unlock_deep_sleep();
486486
sleep_blocked = false;
487487
}
488488
}
@@ -580,7 +580,7 @@ static int8_t rf_interface_state_control(phy_interface_state_e new_state, uint8_
580580
RAIL_Idle(gRailHandle, RAIL_IDLE_FORCE_SHUTDOWN_CLEAR_FLAGS, true);
581581
radio_state = RADIO_IDLE;
582582
if(sleep_blocked) {
583-
unblockSleepMode(EM1);
583+
sleep_manager_unlock_deep_sleep();
584584
sleep_blocked = false;
585585
}
586586
break;
@@ -589,7 +589,7 @@ static int8_t rf_interface_state_control(phy_interface_state_e new_state, uint8_
589589
RAIL_Idle(gRailHandle, RAIL_IDLE_FORCE_SHUTDOWN_CLEAR_FLAGS, true);
590590
radio_state = RADIO_IDLE;
591591
if(sleep_blocked) {
592-
unblockSleepMode(EM1);
592+
sleep_manager_unlock_deep_sleep();
593593
sleep_blocked = false;
594594
}
595595
break;
@@ -602,7 +602,7 @@ static int8_t rf_interface_state_control(phy_interface_state_e new_state, uint8_
602602
radio_state = RADIO_RX;
603603
if(!sleep_blocked) {
604604
/* RX can only happen in EM0/1*/
605-
blockSleepMode(EM1);
605+
sleep_manager_lock_deep_sleep();
606606
sleep_blocked = true;
607607
}
608608
} else {
@@ -623,7 +623,7 @@ static int8_t rf_interface_state_control(phy_interface_state_e new_state, uint8_
623623
radio_state = RADIO_RX;
624624
if(!sleep_blocked) {
625625
/* RX can only happen in EM0/1*/
626-
blockSleepMode(EM1);
626+
sleep_manager_lock_deep_sleep();
627627
sleep_blocked = true;
628628
}
629629
} else {

0 commit comments

Comments
 (0)