summaryrefslogtreecommitdiffstatshomepage
path: root/ports/stm32/mpconfigboard_common.h
diff options
context:
space:
mode:
authorChris Wilson <chris@wilson.house>2019-08-01 19:54:32 -0700
committerDamien George <damien.p.george@gmail.com>2019-08-08 12:53:05 +1000
commit3d02ebb4e8262b67433eadc80100155387c6f186 (patch)
tree3d15c94395644dacfa349ab5c2359491539dccaa /ports/stm32/mpconfigboard_common.h
parentefdcd6baa710af11bdc2f4930e42e439cc1b2ff8 (diff)
downloadmicropython-3d02ebb4e8262b67433eadc80100155387c6f186.tar.gz
micropython-3d02ebb4e8262b67433eadc80100155387c6f186.zip
stm32/sdcard: Support configuring the SD/MMC bus width to 1 or 4 bits.
Some SD/MMC breakout boards don't support 4-bit bus mode. This adds a new macro MICROPY_HW_SDMMC_BUS_WIDTH that allows each board to define the width of the SD/MMC bus interface used on that board, defaulting to 4 bits.
Diffstat (limited to 'ports/stm32/mpconfigboard_common.h')
-rw-r--r--ports/stm32/mpconfigboard_common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/stm32/mpconfigboard_common.h b/ports/stm32/mpconfigboard_common.h
index 121b64d038..603215af4b 100644
--- a/ports/stm32/mpconfigboard_common.h
+++ b/ports/stm32/mpconfigboard_common.h
@@ -102,6 +102,11 @@
#define MICROPY_HW_ENABLE_MMCARD (0)
#endif
+// SD/MMC interface bus width (defaults to 4 bits)
+#ifndef MICROPY_HW_SDMMC_BUS_WIDTH
+#define MICROPY_HW_SDMMC_BUS_WIDTH (4)
+#endif
+
// Whether to automatically mount (and boot from) the SD card if it's present
#ifndef MICROPY_HW_SDCARD_MOUNT_AT_BOOT
#define MICROPY_HW_SDCARD_MOUNT_AT_BOOT (MICROPY_HW_ENABLE_SDCARD)