做一个聪明的派
介绍在ESP32上使用ESP-IDF框架操作SPI接口的SD卡:1、复制官方示例从官方的ESP-IDF SDK中复制项目示例:cp /home/monkeypi/esp/esp-idf/examples/storage/sd_card/sdspi ./ -r 2、修改硬件接口打开文件 main/sd_card_example_main.c 文件,根据ESP32开发板连接SD卡的SPI引脚修改代码:#ifdef USE_SPI_MODE // Pin mapping when using SPI mode. // With this mapping, SD card can be used both in SPI and 1-line SD mode. // Note that a pull-up on CS line is required in SD mode. #if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 #define PIN_NUM_MISO 26
MonkeyPi
ICP粤ICP备19095914号-2