esp32: Add machine.SDCard class using built-in HW SD/MMC controller.

This adds support for SD cards using the ESP32's built-in hardware SD/MMC
host controller, over either the SDIO bus or SPI.  The class is available
as machine.SDCard and using it can be as simple as:

    uos.mount(machine.SDCard(), '/sd')
This commit is contained in:
Nicko van Someren
2019-05-04 19:00:35 -06:00
committed by Damien George
parent 84f1067f7f
commit 8e3af7d4c8
5 changed files with 416 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ extern const mp_obj_type_t machine_pwm_type;
extern const mp_obj_type_t machine_hw_spi_type;
extern const mp_obj_type_t machine_uart_type;
extern const mp_obj_type_t machine_rtc_type;
extern const mp_obj_type_t machine_sdcard_type;
void machine_pins_init(void);
void machine_pins_deinit(void);