aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormrcodetastic <12006953+mrcodetastic@users.noreply.github.com>2024-07-26 11:23:16 +0100
committermrcodetastic <12006953+mrcodetastic@users.noreply.github.com>2024-07-26 11:23:16 +0100
commitaa28e2a93baaf90083b2d556c0ac80602d9940aa (patch)
treee2de41c2174bae75159bf0812b2ee134d982b442 /src
parentc4ecdcfeeb5aa668d92ddf3c3c74bc93316f6e10 (diff)
Update gdma_lcd_parallel16.cpp
Diffstat (limited to 'src')
-rw-r--r--src/platforms/esp32s3/gdma_lcd_parallel16.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/platforms/esp32s3/gdma_lcd_parallel16.cpp b/src/platforms/esp32s3/gdma_lcd_parallel16.cpp
index 54fc766..a405a11 100644
--- a/src/platforms/esp32s3/gdma_lcd_parallel16.cpp
+++ b/src/platforms/esp32s3/gdma_lcd_parallel16.cpp
@@ -127,11 +127,14 @@
//LCD_CAM.lcd_clock.lcd_clkm_div_num = 10; //16mhz is the fasted the Octal PSRAM can support it seems from faptastic's testing using an N8R8 variant (Octal SPI PSRAM).
// https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA/issues/441#issuecomment-1513631890
- LCD_CAM.lcd_clock.lcd_clkm_div_num = 12; // 13Mhz is about the fastest output from PSRAM if we want to be able to service other peripherals as well.
+ LCD_CAM.lcd_clock.lcd_clkm_div_num = 12; // 13Mhz is the fastest output from PSRAM if we want to be able to service other peripherals as well.
}
else
{
+#if defined(S3_LCD_DIV_NUM)
+ auto _div_num = S3_LCD_DIV_NUM;
+#else
auto freq = (_cfg.bus_freq);
auto _div_num = 16; // 10Mhz
if (freq <= 10000000L) {
@@ -139,10 +142,10 @@
_div_num = 10; // 16Mhz
} else {
_div_num = 7; // 22Mhz --- likely to have noise without a good connection
- }
-
- //LCD_CAM.lcd_clock.lcd_clkm_div_num = lcd_clkm_div_num;
- LCD_CAM.lcd_clock.lcd_clkm_div_num = _div_num; //3;
+ }
+
+#endif
+ LCD_CAM.lcd_clock.lcd_clkm_div_num = _div_num;
}