Skip to content

Commit

Permalink
zephyr: Update disk access configuration for Zephyr v2.6.0.
Browse files Browse the repository at this point in the history
Zephyr's Kconfig symbols and defaults for SDHC/SDMMC disk drivers and
the disk access subsystem were reworked between Zephyr v2.5.0 and
v2.6.0. Update MicroPython accordingly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
  • Loading branch information
MaureenHelm authored and dpgeorge committed Jun 6, 2021
1 parent b15e1ef commit f17c0db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ports/zephyr/boards/mimxrt1050_evk.conf
@@ -1,9 +1,8 @@
# Required for zephyr.DiskAccess block devices
CONFIG_DISK_ACCESS=y
CONFIG_DISK_ACCESS_SDHC=y

CONFIG_USB=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr MicroPython"
CONFIG_USB_MASS_STORAGE=y
CONFIG_MASS_STORAGE_DISK_NAME="SDHC"
CONFIG_MASS_STORAGE_DISK_NAME="SDMMC"
4 changes: 2 additions & 2 deletions ports/zephyr/main.c
Expand Up @@ -100,8 +100,8 @@ STATIC void vfs_init(void) {
const char *mount_point_str = NULL;
int ret = 0;

#ifdef CONFIG_DISK_ACCESS_SDHC
mp_obj_t args[] = { mp_obj_new_str(CONFIG_DISK_SDHC_VOLUME_NAME, strlen(CONFIG_DISK_SDHC_VOLUME_NAME)) };
#ifdef CONFIG_DISK_DRIVER_SDMMC
mp_obj_t args[] = { mp_obj_new_str(CONFIG_SDMMC_VOLUME_NAME, strlen(CONFIG_SDMMC_VOLUME_NAME)) };
bdev = zephyr_disk_access_type.make_new(&zephyr_disk_access_type, ARRAY_SIZE(args), 0, args);
mount_point_str = "/sd";
#elif defined(CONFIG_FLASH_MAP) && FLASH_AREA_LABEL_EXISTS(storage)
Expand Down

0 comments on commit f17c0db

Please sign in to comment.