特性:新增 WS2812 组件并迁移至 ESP32-C3
更新编译器路径:切换至 RISC-V 工具链,以支持 ESP32-C3 芯片。 新增 WS2812 组件:集成了基于 RMT(远程控制器)外设的驱动程序,用于控制 RGB LED。 配置烧录方式:将 IDF 的 Flash 烧录类型配置为 UART 模式。
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
INCLUDE_DIRS ".")
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES ws2812)
|
||||
|
||||
17
main/idf_component.yml
Normal file
17
main/idf_component.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
## IDF Component Manager Manifest File
|
||||
dependencies:
|
||||
## Required IDF version
|
||||
idf:
|
||||
version: '>=4.1.0'
|
||||
# # Put list of dependencies here
|
||||
# # For components maintained by Espressif:
|
||||
# component: "~1.0.0"
|
||||
# # For 3rd party components:
|
||||
# username/component: ">=1.0.0,<2.0.0"
|
||||
# username2/component2:
|
||||
# version: "~1.0.0"
|
||||
# # For transient dependencies `public` flag can be set.
|
||||
# # `public` flag doesn't have an effect dependencies of the `main` component.
|
||||
# # All dependencies of `main` are public by default.
|
||||
# public: true
|
||||
espressif/led_strip: ^3.0.3
|
||||
@@ -1,6 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
||||
#include "ws2812.h"
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
|
||||
ws2812_start_task();
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user