This is a tristate test. # string 表示一个字符串 config MY_TEST_STRING string "string_test" help This is a string test. endmenu 效果: 宏定义的名字是CONFIG_ + 配置名(config后边的) 对于bool,只有被选择的配置才会生成宏定义为1 可以编辑值,按?(即Shift+? / ?_/? / )即可打开帮助(hel...
include($ENV{IDF_PATH}/tools/cmake/project.cmake) string(REGEX REPLACE ".*/\(.*\)" "\\1" CURDIR ${CMAKE_CURRENT_SOURCE_DIR}) project(${CURDIR}) git_describe(PROJECT_VERSION ${COMPONENT_DIR}) message("Project commit: " ${PROJECT_VERSION}) 1. 2. 3. 4. 5. 6. 7. 8. 9. 1...
#ifdef __cplusplus extern"C"{#endif intsum_cpp(int a,int b);char*substr_c(char*src,int pos,int len);#ifdef __cplusplus}#endif 创建一个名为interface.cpp的文件,名字跟上面的.h一样,内容: #include<string>#include"interface.h"#include<string.h>using namespace std;extern"C"intsum_cpp(...
configMY_TEST_TRISTATEtristate"tristate_test"help This is a tristate test.# string 表示一个字符串 configMY_TEST_STRINGstring"string_test"help This is a string test.endmenu 官方参考 ESP-IDF官方解释 Kconfig: https://docs.espressif.com/projects/esp-idf/zh_CN/v5.1/esp32/api-reference/kconfig...
#include "string.h" #include "driver/gpio.h" #include "i_common.h" #include "i_sdmmc.h" static const char *TAG = "ESP32_GPS"; static const int RX_BUF_SIZE = 1024; char *data = NULL; char *dest = NULL; int s_count = 0; // 秒计数 ...
12 using font 22829tft.drawCentreString("Font size 4",70,30,4);//Draw text centre at position 80, 24 using font 43031tft.drawCentreString("12.34",70,54,6);//Draw text centre at position 80, 24 using font 63233tft.drawCentreString("12.34 is in font size 6",120,92,2);//Draw te...
ESP-IDF设备自动配网是一个涉及ESP32芯片及其开发框架(ESP-IDF)的重要功能,它允许设备在没有用户干预的情况下自动连接到WiFi网络。以下是一个基于ESP-IDF的ESP32设备自动配网的示例,涵盖了主要步骤和概念。 一、配网方式概述 ESP32设备自动配网有多种方式,包括但不限于SmartConfig、SoftAP+HTTPD、BLE配网等。这里以Sm...
void button7_callback(const String & state) { Serial.println("KFS"); } void button8_callback(const String & state) { Serial.println("GFS"); } void button9_callback(const String & state) { Serial.println("KRSQ"); } void button10_callback(const String & state) ...
CXX_FLAGS)set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)remove_duplicated_flags("-nostartfiles -march=rv32imc --specs=nosys.specs \ ${CMAKE_EXE_LINKER_FLAGS}" UNIQ_CMAKE_SAFE_EXE_LINKER_FLAGS)set(CMAKE_EXE_LINKER_FLAGS "${UNIQ...
/** * Return full IDF version string, same as 'git describe' output. * * @note If you are printing the ESP-IDF version in a log file or other information, * this function provides more information than using the numerical version macros....