Skip to content

Commit 7a70bf2

Browse files
committed
spi: fix st7735 timing issue
1 parent 59250bd commit 7a70bf2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main/src/chip/spi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ void hspi_init(void)
3636
spi_device_interface_config_t devcfg = {
3737
.mode = 0, // SPI mode 0
3838
.spics_io_num = CONFIG_SPI_CS_PIN, // CS pin
39-
.clock_speed_hz = 40000000, // Clock out at 40 MHz
4039
#ifdef CONFIG_SCREEN_PANEL_ST7735
40+
.clock_speed_hz = 26000000, // Clock out at 26 MHz
4141
.pre_cb = st7735_setpin_dc, // Specify pre-transfer callback to handle D/C line
4242
#elif defined(CONFIG_SCREEN_PANEL_ST7789)
43+
.clock_speed_hz = 40000000, // Clock out at 40 MHz
4344
.pre_cb = st7789_setpin_dc, // Specify pre-transfer callback to handle D/C line
4445
#endif
4546
.queue_size = 2, // We want to be able to queue 2 transactions at a time

0 commit comments

Comments
 (0)