nrf52810(52832)的掉电重启还是外部唤醒判断例程,如下
作者:互联网
if(nrf_power_resetreas_get() & NRF_POWER_RESETREAS_OFF_MASK)//读取是掉电重启还是按键唤醒
{//按键唤醒
if(KEY_POWER_PRESSED)
{
key_smokekey_enable();
}
eStateMachine = E_SM_IDLE;
eStateMachine_pre = E_SM_NONE;
}
else
{//掉电重启
eStateMachine = E_SM_PowerOn;
eStateMachine_pre = E_SM_NONE;
}
标签:pre,例程,重启,掉电,nrf52810,SM,eStateMachine,唤醒 来源: https://www.cnblogs.com/TorryLong/p/12900793.html