Browse Source

move wd_init to znordic init function begin

master
zhaohe 1 year ago
parent
commit
a5cc5239ad
  1. 5
      src/znordic.c

5
src/znordic.c

@ -41,7 +41,8 @@ static void rtcCallbackFunc(nrf_drv_rtc_int_type_t interruptType)
* CODE * * CODE *
*******************************************************************************/ *******************************************************************************/
void znordic_init() { void znordic_init() {
{
wd_init();
{
/******************************************************************************* /*******************************************************************************
* ÈÕ־ϵͳ³õʼ?? * * ÈÕ־ϵͳ³õʼ?? *
*******************************************************************************/ *******************************************************************************/
@ -87,7 +88,6 @@ void znordic_init() {
err_code = nrf_sdh_ble_enable(&ram_start); err_code = nrf_sdh_ble_enable(&ram_start);
APP_ERROR_CHECK(err_code); APP_ERROR_CHECK(err_code);
} }
{ {
ret_code_t errCode; ret_code_t errCode;
@ -105,6 +105,7 @@ void znordic_init() {
void znordic_loop() { void znordic_loop() {
while (true) { while (true) {
app_sched_execute(); app_sched_execute();
wd_feed();
if (NRF_LOG_PROCESS() == false) { if (NRF_LOG_PROCESS() == false) {
nrf_pwr_mgmt_run(); nrf_pwr_mgmt_run();
} }

Loading…
Cancel
Save