浏览代码

make it compatible with idf 4.4

philippe44 1 年之前
父节点
当前提交
d1858c3cc3
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 3 1
      components/_override/CMakeLists.txt
  2. 1 1
      components/services/gpio_exp.c

+ 3 - 1
components/_override/CMakeLists.txt

@@ -1,4 +1,4 @@
-if(IDF_TARGET STREQUAL esp32)
+if(IDF_TARGET STREQUAL esp32 AND IDF_VERSION_MAJOR EQUAL 4 AND IDF_VERSION_MINOR LESS 4)
     set(lib_dir ${build_dir}/esp-idf)
     set(driver esp32/i2s.c esp32/i2s_hal.c)
     string(REPLACE ".c" ".c.obj" driver_obj "${driver}")
@@ -19,4 +19,6 @@ if(IDF_TARGET STREQUAL esp32)
                 COMMAND xtensa-esp32-elf-ar -d ${lib_dir}/driver/libdriver.a ${driver_obj}
                 VERBATIM
     )
+else()
+    message(STATUS "==> NO I2S LIBRARY OVERRIDE, SPDIF MIGHT NOT WORK <==")
 endif()

+ 1 - 1
components/services/gpio_exp.c

@@ -537,7 +537,7 @@ static esp_err_t mpr121_init(gpio_exp_t* self) {
 		{ 0x57, 0x28 }, { 0x58, 0x14 }, /* ELE11: Touch Threshold, Release Threshold */
 
 		{ 0x5e, 0xcc }, /* ECR - must be set last */
-		{0, 0} 
+		{ 0, 0 } 
 	};
 
 	esp_err_t err = 0;