SHA2017-badge / micropython-esp32

MicroPython ported to the SHA2017 badge
https://micropython.org/
MIT License
12 stars 16 forks source link

Move mount-code to modbadge; add sdcard support #171

Closed basvs closed 7 years ago

basvs commented 7 years ago

The native locfd-mount was hidden in the vfs_mount code.

Mounting the fat partition and having a virtual file-system mount to the native filesystem are two different things. Split it up.

Mounting the locfd filesystem is now done with:

badge.mount_root()

Mounting the native filesystems into micropython is still done with:

uos.mount(uos.VfsNative(None), '/')

Mounting the bpp moved to:

badge.mount_bpp()

Added support for sdcard mounts:

badge.mount_sdcard()
badge.unmount_sdcard()

.. and fixed a printf bug in badge_eink_png.

basvs commented 7 years ago

badge.unmount_sdcard() left the esp-idf filesystem code in an undetermined state. I guess it's a bug in the esp-idf library. Disabled unmounting for now.