esp32/machine_sdcard: Add SDCard pin assignments for ESP32-S3 support.

Previously ESP32-S3 SDMMC could only use fixed pin assignments, however the
ESP-IDF defaults don't match common boards. The chip also supports using
GPIO Matrix to assign any pin.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
Angus Gratton
2025-02-05 15:16:47 +11:00
committed by Damien George
parent 4d65b4e261
commit 79fb5aa878
3 changed files with 154 additions and 44 deletions

View File

@@ -747,7 +747,7 @@ See :ref:`machine.SDCard <machine.SDCard>`. ::
import machine, os, vfs
# Slot 2 uses pins sck=18, cs=5, miso=19, mosi=23
# On original ESP32, slot 2 uses pins sck=18, cs=5, miso=19, mosi=23
sd = machine.SDCard(slot=2)
vfs.mount(sd, '/sd') # mount