26 lines
749 B
C
26 lines
749 B
C
#include "app.h"
|
|
#include "board.h"
|
|
#include "os.h"
|
|
static TaskHandle_t business_task_handle = NULL;
|
|
|
|
void business_task(void *pvParameters)
|
|
{
|
|
for (;;)
|
|
{
|
|
rtc_update();
|
|
led_toggle(LED_USER);
|
|
vTaskDelay(1000);
|
|
}
|
|
}
|
|
|
|
void app_init(void)
|
|
{
|
|
// 创建任务
|
|
xTaskCreate((TaskFunction_t)business_task, // 任务入口函数
|
|
(const char *)"business_task", // 任务名字
|
|
(uint16_t)1024, // 任务栈大小
|
|
(void *)NULL, // 任务入口函数参数
|
|
(UBaseType_t)1, // 任务优先级
|
|
(TaskHandle_t *)&business_task_handle); // 任务句柄
|
|
}
|