[nrf528xx] check nrf_802154_sleep_if_idle() return status to set correct pending event (#5504)

This commit is contained in:
Jintao Lin
2020-09-09 10:54:56 -07:00
committed by GitHub
parent 209347c3b4
commit 3ea1e9d1f2
+2 -2
View File
@@ -422,7 +422,7 @@ otError otPlatRadioSleep(otInstance *aInstance)
{
OT_UNUSED_VARIABLE(aInstance);
if (nrf_802154_sleep_if_idle())
if (nrf_802154_sleep_if_idle() == NRF_802154_SLEEP_ERROR_NONE)
{
clearPendingEvents();
}
@@ -827,7 +827,7 @@ void nrf5RadioProcess(otInstance *aInstance)
if (isPendingEventSet(kPendingEventSleep))
{
if (nrf_802154_sleep_if_idle())
if (nrf_802154_sleep_if_idle() == NRF_802154_SLEEP_ERROR_NONE)
{
resetPendingEvent(kPendingEventSleep);
}