This repository has been archived on 2025-04-02. You can view files and clone it, but cannot push or open issues or pull requests.
controller-hart/User/system/freertos/readme.md

579 B

移植

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);
}

信号量