Fix LCD driver timings

This commit is contained in:
Jakub Hlusička 2026-01-01 03:22:43 +01:00
parent 3b88ae8316
commit 512cdc20b8
2 changed files with 7 additions and 5 deletions

View file

@ -3,8 +3,7 @@ use esp_hal::{
DriverMode,
gpio::{Flex, Level, Output},
lcd_cam::lcd::{
ClockMode, Phase, Polarity,
dpi::{Dpi, Format, FrameTiming},
ClockMode, DelayMode, Phase, Polarity, dpi::{Dpi, Format, FrameTiming}
},
time::Rate,
};
@ -1253,6 +1252,10 @@ where
polarity: Polarity::IdleLow, // From Adafruit
phase: Phase::ShiftHigh, // From Adafruit
})
.with_de_mode(DelayMode::RaisingEdge)
.with_hsync_mode(DelayMode::RaisingEdge)
.with_vsync_mode(DelayMode::RaisingEdge)
.with_output_bit_mode(DelayMode::RaisingEdge)
.with_format(Format {
enable_2byte_mode: true,
..Default::default()

View file

@ -11,9 +11,8 @@ export component AppWindow inherits Window {
width: 960px;
height: 368px;
padding: 0px;
// These off-by-one values might be caused by incorrect timings.
padding-top: 121px;
padding-bottom: 7px;
padding-top: 120px;
padding-bottom: 8px;
Rectangle {
background: #2c82ff;
border-color: #ffcf00;