idf_component_register(SRCS"led.c"REQUIRES driver INCLUDE_DIRS".") 在外面也要记得添加引用. 编译测试成功. 有没有必要把lv_port_disp这些单独做一个components呢,我认为是没必要的,主要他其实属于HAL层,并不通用,当然如果做成components也没问题.
Espressif IoT Development Framework. Official development framework for Espressif SoCs. - esp-idf/components/log/include/esp_log.h at v4.3-beta1 · espressif/esp-idf
Espressif IoT Development Framework. Official development framework for Espressif SoCs. - esp-idf/components/vfs/include/esp_vfs.h at v4.2 · espressif/esp-idf
project.cmake第12行包含了idf.cmake # The mere inclusion of this CMake file sets up some interal build properties. # These properties can be modified in between this inclusion the the idf_build_process # call. include(${CMAKE_CURRENT_LIST_DIR}/idf.cmake) idf.cmake第39行引入了git_submod...
idf_component_register( SRCS${SOURCES}INCLUDE_DIRS"./include/") 这才算是编译成功了,没有弹出找不到void app_main(void)的错误 添加组件 ├───.devcontainer ├───.vscode ├───main │ └───include └───managed_components
2.在自己的组件(components下) (1)使用官方的组件需要添加REQUIRES driver idf_component_register(SRCS "I2Cdev.cpp" INCLUDE_DIRS "." REQUIRES driver ) (2)引用自己的文件(MPU6050) REQUIRES I2Cdev idf_component_register(SRCS "MPU6050.cpp" INCLUDE_DIRS "." REQUIRES I2Cdev )发布...
idf.py -C components create-component led 该命令会创建一个新组件。 新组件将包含构建组件所需的一组空文件。我们的工作就是在这一组空文件中写上我们的代码。 添加组件smart_config 你可以使用 idf.py create-component命令创建新组件。如果熟悉了组件结构,也可以直接在项目中手工创建。
③选择ESP_IDF ④我们现在idf里面的一个工程案例sample_project,然后创建 ⑤点击YES ⑥依次点击,确保编译无错误并且编译通过 二、向工程移植LVGL库和驱动库lvgl_esp32_drivers ①在工程文件夹下新建一个conponents文件夹。 方法一:直接在工程文件夹下新建文件夹,并命名为components ...
头文件位置:components/driver/include/driver/gpio.h 1. gpio口配置函数 esp_err_t gpio_config(const gpio_config_t *pGPIOConfig)端口可以设置以下模式:pull-upPullDownIntrType参数: pGPIOConfig结构体返回: ERP_OK或ESP_ERR_INVALID_ARG gpio_config_t 结构体 使用示例:gpio_set_pull_mode(3, GPIO_...
4、复制components/lvgl/example下的porting文件夹 至 components 下, 新建CMakeLists.txt 添加内容(参考) file(GLOB_RECURSE SOURCES ./*.C ) idf_component_register(SRCS ${SOURCES} INCLUDE_DIRS REQUIRES ) 把lv_port_disp_template的两个文件名改为lv_port_disp.c和.h。