mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 01:40:14 +01:00
rp2: Add USB MSC support.
It is currently not enabled by default on any board.
This commit is contained in:
committed by
Damien George
parent
e2513bfe8d
commit
507ad03329
15
ports/rp2/modules/_boot_fat.py
Normal file
15
ports/rp2/modules/_boot_fat.py
Normal 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
|
||||
Reference in New Issue
Block a user