From 1a51fc9ddf889c6a81e0156e6d438e4228479874 Mon Sep 17 00:00:00 2001 From: Nicko van Someren Date: Sun, 16 Jun 2019 11:57:54 -0600 Subject: [PATCH] esp32/machine_sdcard: Fix bug in SPI slot number selection. And fix minor typo in docs when referring to SDCard class. --- docs/library/machine.SDCard.rst | 2 +- ports/esp32/machine_sdcard.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/library/machine.SDCard.rst b/docs/library/machine.SDCard.rst index 34bb2e48bf..8398624c15 100644 --- a/docs/library/machine.SDCard.rst +++ b/docs/library/machine.SDCard.rst @@ -30,7 +30,7 @@ vary from platform to platform. The class implements the block protocol defined by :class:`uos.AbstractBlockDev`. This allows the mounting of an SD card to be as simple as:: - uos.mount(storage.SDCard(), "/sd") + uos.mount(machine.SDCard(), "/sd") The constrcutor takes the following paramters: diff --git a/ports/esp32/machine_sdcard.c b/ports/esp32/machine_sdcard.c index 633d4031d6..1400c56f35 100644 --- a/ports/esp32/machine_sdcard.c +++ b/ports/esp32/machine_sdcard.c @@ -203,7 +203,6 @@ STATIC mp_obj_t machine_sdcard_make_new(const mp_obj_type_t *type, size_t n_args if (is_spi) { self->host.slot = slot_num ? HSPI_HOST : VSPI_HOST; - slot_num -= 2; } DEBUG_printf(" Calling host.init()");