Skip to content

Commit

Permalink
Fixes for IDF 5.1 & Arduino 3.0.0
Browse files Browse the repository at this point in the history
Implement various tweaks such that it compiles with Arduino core 3.0.0-alpha2
  • Loading branch information
mrcodetastic committed Nov 27, 2023
1 parent 41cb8d3 commit 7a100a0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/ESP32-HUB75-MatrixPanel-leddrivers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
*/

#include <driver/gpio.h>

#ifdef ARDUINO_ARCH_ESP32
#include <Arduino.h>
#else
#include <driver/gpio.h>
#define LOW 0
#define HIGH 1
#endif
Expand Down
11 changes: 9 additions & 2 deletions src/platforms/esp32/esp32_i2s_parallel_dma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ Modified heavily for the ESP32 HUB75 DMA library by:

#include "esp32_i2s_parallel_dma.hpp"

#if defined (CONFIG_IDF_TARGET_ESP32S2)
#pragma message "Compiling for ESP32-S2"
#else
#pragma message "Compiling for original ESP32 (released 2016)"
#endif

#include <driver/gpio.h>
#include <driver/periph_ctrl.h>
#include <esp_private/periph_ctrl.h>
#include <soc/gpio_sig_map.h>
#include <soc/i2s_periph.h>
#include <soc/i2s_periph.h> //includes struct and reg


#if defined (ARDUINO_ARCH_ESP32)
#include <Arduino.h>
Expand Down
6 changes: 4 additions & 2 deletions src/platforms/esp32/esp32_i2s_parallel_dma.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ Original Source:

#include <sys/types.h>
#include <freertos/FreeRTOS.h>
#include <driver/i2s.h>
#include <soc/i2s_struct.h>
//#include <driver/i2s.h>
#include <rom/lldesc.h>
#include <rom/gpio.h>
#include <driver/i2s_types.h> //includes struct and reg
#include <soc/i2s_periph.h> //includes struct and reg


#define DMA_MAX (4096-4)

Expand Down
1 change: 1 addition & 0 deletions src/platforms/esp32s3/gdma_lcd_parallel16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
********************************************************************************************/
#if __has_include (<hal/lcd_ll.h>)
// Stop compile errors: /src/platforms/esp32s3/gdma_lcd_parallel16.hpp:64:10: fatal error: hal/lcd_ll.h: No such file or directory
#pragma message "Compiling for ESP32-S3"

#ifdef ARDUINO_ARCH_ESP32
#include <Arduino.h>
Expand Down
4 changes: 2 additions & 2 deletions src/platforms/platform_detect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ Modified heavily for the ESP32 HUB75 DMA library by:

#elif defined (CONFIG_IDF_TARGET_ESP32S2)

#pragma message "Compiling for ESP32-S2"
//#pragma message "Compiling for ESP32-S2"
#include "esp32/esp32_i2s_parallel_dma.hpp"
#include "esp32s2/esp32s2-default-pins.hpp"


#elif defined (CONFIG_IDF_TARGET_ESP32S3)

#pragma message "Compiling for ESP32-S3"
//#pragma message "Compiling for ESP32-S3"
#include "esp32s3/gdma_lcd_parallel16.hpp"
#include "esp32s3/esp32s3-default-pins.hpp"

Expand Down

0 comments on commit 7a100a0

Please sign in to comment.