#include "gd32f30x.h" #include "systick.h" #include #include "main.h" #include "bsp_charge.h" #include "charge.h" #include "os.h" #include "uart.h" #include "sensor_tmp75.h" #include "comm.h" #include "app_wdgt.h" #include "gd32f303r_eval.h" uint8_t UPdataState = DISABLE; Filter FilterBuffer[FILTER_MAX] = { 0 }; GlobalVariableDef GlobalVariable = { 0 }; /*! \brief main function \param[in] none \param[out] none \retval none */ int main(void) { OS_ERR err; /* configure systick */ systick_config(); /* configure device */ gpio_config(); TMPSensorInit(); ChargeInit(); uart0_init(); printf("\n\r SPMB_V2.0 usart0 transmit test !\n\r"); /* Init uC/OS-III. */ OSInit(&err); /* Create the start task */ app_task_comm(); //通讯任务初始化 任务优先级5 写flash相关只能在此任务 app_task_charge(); //充电任务初始化 任务优先级6 app_task_wdgt(); //看门狗任务初始化 任务优先级13 /* Start multitasking (i.e. give control to uC/OS-III). */ OSStart(&err); }