diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9f4d08c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,11 @@ +# SmartMatrix Library +# https://github.com/pixelmatix/SmartMatrix +# + +cmake_minimum_required(VERSION 3.5) + +idf_component_register(SRC_DIRS "src" + INCLUDE_DIRS "src" + REQUIRES driver arduino Adafruit-GFX-Library Adafruit_BusIO) + +project(SmartMatrix) diff --git a/src/MatrixEsp32Hub75Refresh_Impl.h b/src/MatrixEsp32Hub75Refresh_Impl.h index c928875..dc07941 100644 --- a/src/MatrixEsp32Hub75Refresh_Impl.h +++ b/src/MatrixEsp32Hub75Refresh_Impl.h @@ -132,11 +132,11 @@ void SmartMatrixHub75Refresh::begin(uint32_t dmaRamToKeepFreeBytes) .bits=MATRIX_I2S_MODE, .bufa=0, .bufb=0, - desccount, - desccount, - dmadesc_a, - dmadesc_b + .desccount_a=desccount, + .desccount_b=desccount, + .lldesc_a=dmadesc_a, + .lldesc_b=dmadesc_b }; //Setup I2S diff --git a/src/esp32_i2s_parallel.c b/src/esp32_i2s_parallel.c index e4db0b1..30312c0 100644 --- a/src/esp32_i2s_parallel.c +++ b/src/esp32_i2s_parallel.c @@ -26,12 +26,20 @@ #include "soc/i2s_struct.h" #include "soc/i2s_reg.h" +#include "soc/gpio_periph.h" #include "driver/periph_ctrl.h" +#include "driver/gpio.h" #include "soc/io_mux_reg.h" #include "rom/lldesc.h" #include "esp_heap_caps.h" #include "esp32_i2s_parallel.h" +#if CONFIG_IDF_TARGET_ESP32 +#include "esp32/rom/gpio.h" +#else +#error Target CONFIG_IDF_TARGET is not supported +#endif + typedef struct { volatile lldesc_t *dmadesc_a, *dmadesc_b; int desccount_a, desccount_b;