diff options
| author | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2022-09-30 03:17:19 +0100 |
|---|---|---|
| committer | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2022-09-30 03:17:19 +0100 |
| commit | ebe75dcaba0239d225243cdedd31aaf860abbd0a (patch) | |
| tree | fda21143906b93de687447af52c40f9329956d21 /src/platforms/platform_detect.hpp | |
| parent | 86063fe594cda6a572bd335e7e34af7c75226aad (diff) | |
Update to include S3 support.
Refactor tonnes of code. Double buffering not yet fully tested. PSRAM support doesn't work at all - garbled mess.
Enable in platformIO using:
build_flags =
-DSPIRAM_FRAMEBUFFER=1
Diffstat (limited to 'src/platforms/platform_detect.hpp')
| -rw-r--r-- | src/platforms/platform_detect.hpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/platforms/platform_detect.hpp b/src/platforms/platform_detect.hpp new file mode 100644 index 0000000..f660a5e --- /dev/null +++ b/src/platforms/platform_detect.hpp @@ -0,0 +1,57 @@ +/*----------------------------------------------------------------------------/ +Original Source: + https://github.com/lovyan03/LovyanGFX/ + +Licence: + [FreeBSD](https://github.com/lovyan03/LovyanGFX/blob/master/license.txt) + +Author: + [lovyan03](https://twitter.com/lovyan03) + +Contributors: + [ciniml](https://github.com/ciniml) + [mongonta0716](https://github.com/mongonta0716) + [tobozo](https://github.com/tobozo) + +Modified heavily for the ESP32 HUB75 DMA library by: + [mrfaptastic](https://github.com/mrfaptastic) +/----------------------------------------------------------------------------*/ +#pragma once + +#if defined (ESP_PLATFORM) + + #include <sdkconfig.h> + + #if defined (CONFIG_IDF_TARGET_ESP32C3) + + #error "ERROR: ESP32C3 not supported." + + #elif defined (CONFIG_IDF_TARGET_ESP32S2) + + #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" + #include "esp32s3/gdma_lcd_parallel16.hpp" + #include "esp32s3/esp32s3-default-pins.hpp" + + #else + + // Assume an ESP32 (the original 2015 version) + // Same include as ESP32S3 + #pragma message "Compiling for original ESP32 (2015 release)" + #define ESP32_THE_ORIG 1 + //#include "esp32/esp32_i2s_parallel_dma.hpp" + //#include "esp32/esp32_i2s_parallel_dma.h" + #include "esp32/esp32_i2s_parallel_dma.hpp" + #include "esp32/esp32-default-pins.hpp" + + #endif + + +#endif + |
