aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2023-01-25 23:46:34 +0000
committermrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2023-01-25 23:46:34 +0000
commitace8d938eeba00842a9c8729c425b75971f0aba8 (patch)
tree0fea5a5f16190112a0539090745a8df5fe76bba7 /src
parent8337c7cf7edefbdbacc5495e48834483157462d2 (diff)
Update ESP32-HUB75-MatrixPanel-I2S-DMA.h
Diffstat (limited to 'src')
-rw-r--r--src/ESP32-HUB75-MatrixPanel-I2S-DMA.h7
1 files changed, 6 insertions, 1 deletions
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