From ace8d938eeba00842a9c8729c425b75971f0aba8 Mon Sep 17 00:00:00 2001 From: mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> Date: Wed, 25 Jan 2023 23:46:34 +0000 Subject: Update ESP32-HUB75-MatrixPanel-I2S-DMA.h --- src/ESP32-HUB75-MatrixPanel-I2S-DMA.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ESP32-HUB75-MatrixPanel-I2S-DMA.h b/src/ESP32-HUB75-MatrixPanel-I2S-DMA.h index 2b76152..ab232b9 100644 --- a/src/ESP32-HUB75-MatrixPanel-I2S-DMA.h +++ b/src/ESP32-HUB75-MatrixPanel-I2S-DMA.h @@ -202,7 +202,7 @@ struct HUB75_I2S_CFG { /** * I2S clock speed selector */ - enum clk_speed {HZ_10M=10000000, HZ_15M=15000000, HZ_20M=20000000}; + enum clk_speed {HZ_8M=8000000, HZ_10M=10000000, HZ_15M=15000000, HZ_20M=20000000}; // Structure Variables @@ -342,6 +342,11 @@ class MatrixPanel_I2S_DMA { if (m_cfg.driver) shiftDriver(m_cfg); + #if defined(SPIRAM_DMA_BUFFER) + // Trick library into dropping colour depth slightly when using PSRAM. + // Actual output clockrate override occurs in configureDMA + m_cfg.i2sspeed = HUB75_I2S_CFG::HZ_8M; + #endif /* As DMA buffers are dynamically allocated, we must allocated in begin() * Ref: https://github.com/espressif/arduino-esp32/issues/831 -- cgit v1.3.1