#include "main.h" #include "bsp_time.h" #include "selfcheck.h" #include "hal_ble_client.h" #include "hal_ble_host.h" #include "nrf_delay.h" #include "hal_dfu.h" extern void PRE_Init(void); extern void USR_Init(void); extern void USR_Process(void); int main(void) { //初始化抽象层、系统层 // { #if BLE_DFU_ENANBLE hal_dfu_init();// Initialize the async SVCI interface to bootloader before any interrupts are enabled. #endif PRE_Init(); #if BLE_DFU_ENANBLE hal_dfu_server_init(); #endif if(selfcheck_Init() == SELFCHECK_FLOW_DONE) // } { USR_Init(); //初始化驱动层、功能层、业务逻辑层、应用层 } while (1) { USR_Process(); //系统调度器 } }