File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -95,14 +95,11 @@ void rg_storage_init(void)
9595
9696 // If we're using esp-idf >= 5.0 and the SPI bus is not shared, we must keep the SD card selected
9797 // to work around slow accesses. (https://github.com/espressif/esp-idf/issues/10493)
98- #ifdef RG_STORAGE_SDSPI_HOLD_CS /* ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) */
99- if (RG_STORAGE_SDSPI_HOST != RG_SCREEN_HOST && RG_GPIO_SDSPI_CS != GPIO_NUM_NC )
100- {
101- gpio_set_direction (RG_GPIO_SDSPI_CS , GPIO_MODE_OUTPUT );
102- gpio_set_level (RG_GPIO_SDSPI_CS , 0 );
103- slot_config .gpio_cs = GPIO_NUM_NC ;
104- }
105- #endif
98+ #ifdef RG_STORAGE_SDSPI_HOLD_CS
99+ gpio_set_direction (slot_config .gpio_cs , GPIO_MODE_OUTPUT );
100+ gpio_set_level (slot_config .gpio_cs , 0 );
101+ slot_config .gpio_cs = GPIO_NUM_NC ;
102+ #endif
106103
107104 esp_vfs_fat_mount_config_t mount_config = {
108105 .format_if_mount_failed = false,
You can’t perform that action at this time.
0 commit comments