diff options
| author | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2023-11-27 03:26:41 +0000 |
|---|---|---|
| committer | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2023-11-27 03:26:41 +0000 |
| commit | ad5e2338d09b236519b8b7b231e145da9c0fed87 (patch) | |
| tree | 81f37cc0604f3c0406038c0bb3f6ce3f018f1215 /src | |
| parent | 7a100a0a35d300876c44c81d9e818961495b9c4d (diff) | |
espidf 5.1 vs 4.x fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/platforms/esp32/esp32_i2s_parallel_dma.cpp | 4 | ||||
| -rw-r--r-- | src/platforms/esp32/esp32_i2s_parallel_dma.hpp | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/platforms/esp32/esp32_i2s_parallel_dma.cpp b/src/platforms/esp32/esp32_i2s_parallel_dma.cpp index 5db80bf..e9d45d3 100644 --- a/src/platforms/esp32/esp32_i2s_parallel_dma.cpp +++ b/src/platforms/esp32/esp32_i2s_parallel_dma.cpp @@ -31,7 +31,11 @@ Modified heavily for the ESP32 HUB75 DMA library by: #endif #include <driver/gpio.h> +#if (ESP_IDF_VERSION_MAJOR == 5) #include <esp_private/periph_ctrl.h> +#else +#include <driver/periph_ctrl.h> +#endif #include <soc/gpio_sig_map.h> #include <soc/i2s_periph.h> //includes struct and reg diff --git a/src/platforms/esp32/esp32_i2s_parallel_dma.hpp b/src/platforms/esp32/esp32_i2s_parallel_dma.hpp index 88a09e4..7b9185f 100644 --- a/src/platforms/esp32/esp32_i2s_parallel_dma.hpp +++ b/src/platforms/esp32/esp32_i2s_parallel_dma.hpp @@ -46,7 +46,13 @@ Contributors: //#include <driver/i2s.h> #include <rom/lldesc.h> #include <rom/gpio.h> +#if (ESP_IDF_VERSION_MAJOR == 5) #include <driver/i2s_types.h> //includes struct and reg +#else +#include <driver/i2s.h> +#include <soc/i2s_struct.h> +#endif + #include <soc/i2s_periph.h> //includes struct and reg |
