Skip to content

Commit 508ed1e

Browse files
committed
spi: fix st7735 timing issue
1 parent 4b690e8 commit 508ed1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main/src/chip/spi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ void hspi_init(void)
3939
spi_device_interface_config_t devcfg = {
4040
.mode = 0, // SPI mode 0
4141
.spics_io_num = CONFIG_SPI_CS_PIN, // CS pin
42-
.clock_speed_hz = 40000000, // Clock out at 40 MHz
4342
#ifdef CONFIG_VFX_OUTPUT_CUBE0414
43+
.clock_speed_hz = 40000000, // Clock out at 40 MHz
4444
.pre_cb = cube0414_setpin_dc, // Specify pre-transfer callback to handle D/C line
4545
#elif defined(CONFIG_VFX_OUTPUT_ST7735)
46+
.clock_speed_hz = 26000000, // Clock out at 26 MHz
4647
.pre_cb = st7735_setpin_dc, // Specify pre-transfer callback to handle D/C line
4748
#elif defined(CONFIG_VFX_OUTPUT_ST7789)
49+
.clock_speed_hz = 40000000, // Clock out at 40 MHz
4850
.pre_cb = st7789_setpin_dc, // Specify pre-transfer callback to handle D/C line
4951
#endif
5052
.queue_size = 2, // We want to be able to queue 2 transactions at a time

0 commit comments

Comments
 (0)