From e188117823f0406cfd8fa65e1e0e3a35019c96f2 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 18 Feb 2022 16:30:21 +0700 Subject: [PATCH] more esp build fix --- hw/bsp/esp32s2/boards/esp32s2.c | 7 ++++++- hw/bsp/esp32s3/boards/esp32s3.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/bsp/esp32s2/boards/esp32s2.c b/hw/bsp/esp32s2/boards/esp32s2.c index 03ae9e366..a7ca82deb 100644 --- a/hw/bsp/esp32s2/boards/esp32s2.c +++ b/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" diff --git a/hw/bsp/esp32s3/boards/esp32s3.c b/hw/bsp/esp32s3/boards/esp32s3.c index 03ae9e366..a7ca82deb 100644 --- a/hw/bsp/esp32s3/boards/esp32s3.c +++ b/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"