hathach 4 лет назад
Родитель
Сommit
e188117823
2 измененных файлов с 12 добавлено и 2 удалено
  1. 6 1
      hw/bsp/esp32s2/boards/esp32s2.c
  2. 6 1
      hw/bsp/esp32s3/boards/esp32s3.c

+ 6 - 1
hw/bsp/esp32s2/boards/esp32s2.c

@@ -33,7 +33,12 @@
 #include "soc/usb_periph.h"
 
 #include "driver/rmt.h"
-#include "esp_private/periph_ctrl.h"
+
+#if ESP_IDF_VERSION_MAJOR > 4
+  #include "esp_private/periph_ctrl.h"
+#else
+  #include "driver/periph_ctrl.h"
+#endif
 
 #ifdef NEOPIXEL_PIN
 #include "led_strip.h"

+ 6 - 1
hw/bsp/esp32s3/boards/esp32s3.c

@@ -33,7 +33,12 @@
 #include "soc/usb_periph.h"
 
 #include "driver/rmt.h"
-#include "esp_private/periph_ctrl.h"
+
+#if ESP_IDF_VERSION_MAJOR > 4
+  #include "esp_private/periph_ctrl.h"
+#else
+  #include "driver/periph_ctrl.h"
+#endif
 
 #ifdef NEOPIXEL_PIN
 #include "led_strip.h"