system/freertos/readme.md

34 lines
579 B
Markdown

## 移植
https://blog.csdn.net/ctt15703065585/article/details/139291183
## 创建任务
```c
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);
}
```
## 信号量
```c
```