esp-adf icon indicating copy to clipboard operation
esp-adf copied to clipboard

SD-card code hardcodes SPI GPIO pins (AUD-3001)

Open ropg opened this issue 3 years ago • 2 comments

From esp-adf/components/esp_peripherals/lib/sdcard/sdcard.c:

#define PIN_NUM_MISO 2
#define PIN_NUM_MOSI 15
#define PIN_NUM_CLK  14
#define PIN_NUM_CS   13

See here for more information.

ropg avatar May 13 '21 11:05 ropg

Hi @ropg

I have to admit that this code is not good. Thanks for your advice!

HengYongChao avatar Jun 03 '21 02:06 HengYongChao

A simple fix would be too use get_spi_pins, wouldn't it? I guess most use this for a generic SPI (boy the same cs pin as SD card).. maybe a new CONFIG_* (CONFIG_BOARD_HAS_SD_SPI or something). That menu could set CONFIG_[SCK/MISO/MOSI/CS]_PIN

and-elf avatar Sep 10 '22 12:09 and-elf

Fixed it on 80fd0163d9bc7613fabed42d4fa782485b3a0b44

jason-mao avatar Sep 05 '23 08:09 jason-mao