2022-01-04 11:31:44 +01:00
|
|
|
# HUB75 RGB LED matrix library utilizing ESP32 DMA Engine
|
|
|
|
# https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA
|
|
|
|
# MIT License
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.5)
|
2022-12-17 12:54:54 +01:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
2022-01-04 11:31:44 +01:00
|
|
|
|
2022-12-17 12:54:54 +01:00
|
|
|
if(ARDUINO_ARCH_ESP32)
|
|
|
|
list(APPEND arduino_build arduino Adafruit-GFX-Library)
|
|
|
|
else()
|
|
|
|
list(APPEND esp_idf_build esp_lcd driver)
|
|
|
|
endif()
|
2022-10-10 21:02:04 +02:00
|
|
|
idf_component_register(SRCS "src/platforms/esp32/esp32_i2s_parallel_dma.cpp" "src/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp" "src/ESP32-HUB75-MatrixPanel-leddrivers.cpp"
|
2022-12-17 12:54:54 +01:00
|
|
|
src/platforms/${target}/gdma_lcd_parallel16.cpp
|
|
|
|
INCLUDE_DIRS "./src"
|
2022-12-20 22:54:05 +01:00
|
|
|
REQUIRES ${arduino_build} ${esp_idf_build}
|
2022-12-17 12:54:54 +01:00
|
|
|
)
|
2022-01-04 11:31:44 +01:00
|
|
|
|
2022-01-30 10:56:14 +01:00
|
|
|
# In case you are running into issues with "missing" header files from 3rd party libraries
|
|
|
|
# you can add them to the REQUIRES section above. If you use some of the build options below
|
|
|
|
# you probably want to remove (NO_GFX) or replace Adafruit-GFX-Library (USE_GFX_ROOT)
|
2022-01-09 18:26:56 +01:00
|
|
|
|
|
|
|
# Example to build with USE_GFX_ROOT or NO_GFX / just uncomment the appropriate line
|
|
|
|
# target_compile_options(${COMPONENT_TARGET} PUBLIC -DUSE_GFX_ROOT)
|
|
|
|
# target_compile_options(${COMPONENT_TARGET} PUBLIC -DNO_GFX)
|
|
|
|
|
2022-12-17 12:54:54 +01:00
|
|
|
# esp-idf does not have any GFX library support yet, so we need to define NO_GFX
|
|
|
|
if(ARDUINO_ARCH_ESP32)
|
|
|
|
else()
|
|
|
|
target_compile_options(${COMPONENT_TARGET} PUBLIC -DNO_GFX)
|
|
|
|
if(${target} STREQUAL "esp32s3")
|
|
|
|
target_compile_options(${COMPONENT_TARGET} PUBLIC -DSPIRAM_FRAMEBUFFER)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2022-01-09 18:26:56 +01:00
|
|
|
# You can also use multiple options like this
|
|
|
|
# target_compile_options(${COMPONENT_TARGET} PUBLIC -DNO_GFX -DNO_FAST_FUNCTIONS)
|
|
|
|
|
|
|
|
# All options can be found here:
|
|
|
|
# https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA/blob/master/doc/BuildOptions.md
|
|
|
|
|
2022-01-04 11:31:44 +01:00
|
|
|
project(ESP32-HUB75-MatrixPanel-I2S-DMA)
|