@@ -26,28 +26,28 @@ void hspi_init(void)
2626 .sclk_io_num = CONFIG_SPI_SCLK_PIN ,
2727 .quadwp_io_num = -1 ,
2828 .quadhd_io_num = -1 ,
29- #ifdef CONFIG_VFX_OUTPUT_CUBE0414
30- .max_transfer_sz = CUBE0414_X * CUBE0414_Y * CUBE0414_Z * 3
31- #elif defined(CONFIG_VFX_OUTPUT_ST7735 )
29+ #ifdef CONFIG_VFX_OUTPUT_ST7735
3230 .max_transfer_sz = ST7735_SCREEN_WIDTH * ST7735_SCREEN_HEIGHT * 2
3331#elif defined(CONFIG_VFX_OUTPUT_ST7789 )
3432 .max_transfer_sz = ST7789_SCREEN_WIDTH * ST7789_SCREEN_HEIGHT * 2
33+ #else
34+ .max_transfer_sz = CUBE0414_X * CUBE0414_Y * CUBE0414_Z * 3
3535#endif
3636 };
3737 ESP_ERROR_CHECK (spi_bus_initialize (HSPI_HOST , & buscfg , 1 ));
3838
3939 spi_device_interface_config_t devcfg = {
4040 .mode = 0 , // SPI mode 0
4141 .spics_io_num = CONFIG_SPI_CS_PIN , // CS pin
42- #ifdef CONFIG_VFX_OUTPUT_CUBE0414
43- .clock_speed_hz = 40000000 , // Clock out at 40 MHz
44- .pre_cb = cube0414_setpin_dc , // Specify pre-transfer callback to handle D/C line
45- #elif defined(CONFIG_VFX_OUTPUT_ST7735 )
42+ #ifdef CONFIG_VFX_OUTPUT_ST7735
4643 .clock_speed_hz = 26000000 , // Clock out at 26 MHz
4744 .pre_cb = st7735_setpin_dc , // Specify pre-transfer callback to handle D/C line
4845#elif defined(CONFIG_VFX_OUTPUT_ST7789 )
4946 .clock_speed_hz = 40000000 , // Clock out at 40 MHz
5047 .pre_cb = st7789_setpin_dc , // Specify pre-transfer callback to handle D/C line
48+ #else
49+ .clock_speed_hz = 40000000 , // Clock out at 40 MHz
50+ .pre_cb = cube0414_setpin_dc , // Specify pre-transfer callback to handle D/C line
5151#endif
5252 .queue_size = 2 , // We want to be able to queue 2 transactions at a time
5353 .flags = SPI_DEVICE_3WIRE | SPI_DEVICE_HALFDUPLEX
0 commit comments