system/freertos
许晟昊 a6030813eb Merge remote-tracking branch 'origin/f407' into f407 2025-01-20 20:31:13 +08:00
..
inc 修改OS 2025-01-20 20:27:19 +08:00
port 增加freertos 2025-01-20 19:44:46 +08:00
src 增加freertos 2025-01-20 19:44:46 +08:00
os.h 增加freertos 2025-01-20 19:44:46 +08:00
readme.md 增加freertos 2025-01-20 19:44:46 +08:00

readme.md

移植

https://blog.csdn.net/ctt15703065585/article/details/139291183

创建任务

static TaskHandle_t xxx_task_handle = NULL; // 定义任务句柄
static void xxx_task(void *pvParameters)
{
    for (;;)
    {
        vTaskDelay(1000);
    }
}

void task_init()
{
    // 创建任务
    xTaskCreate((TaskFunction_t)xxx_task,
                (const char *)"xxx_task",
                (uint16_t)configMINIMAL_STACK_SIZE,
                (void *)NULL,
                (UBaseType_t)1,
                (TaskHandle_t *)&xxx_task_handle);
}

信号量