zephyr: Update disk access configuration for Zephyr v2.6.0.

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>
This commit is contained in:
Maureen Helm 2021-05-20 20:52:37 -05:00 committed by Damien George
parent b15e1ef5a6
commit f17c0db5f7
2 changed files with 3 additions and 4 deletions

View File

@ -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"

View File

@ -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)