rp2: Add USB MSC support.

It is currently not enabled by default on any board.
This commit is contained in:
iabdalkader
2021-06-16 00:55:09 +02:00
committed by Damien George
parent e2513bfe8d
commit 507ad03329
8 changed files with 193 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
import os
import machine, rp2
# Try to mount the filesystem, and format the flash if it doesn't exist.
bdev = rp2.Flash()
try:
vfs = os.VfsFat(bdev)
os.mount(vfs, "/")
except:
os.VfsFat.mkfs(bdev)
vfs = os.VfsFat(bdev)
os.mount(vfs, "/")
del os, bdev, vfs