File tree Expand file tree Collapse file tree 3 files changed +33
-5
lines changed Expand file tree Collapse file tree 3 files changed +33
-5
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,30 @@ The workflow APIs are documented here.
1919These USB interfaces are enabled by default on boards with USB support. They are usable once the
2020device has been plugged into a host.
2121
22- ### CIRCUITPY drive
22+ ### Mass Storage
2323CircuitPython exposes a standard mass storage (MSC) interface to enable file manipulation over a
24- standard interface. This interface works underneath the file system at the block level so using it
25- excludes other types of workflows from manipulating the file system at the same time.
24+ standard interface. (This is how USB drives work.) This interface works underneath the file system at
25+ the block level so using it excludes other types of workflows from manipulating the file system at
26+ the same time.
27+
28+ CircuitPython 10.x adds multiple Logical Units (LUNs) to the mass storage interface. This allows for
29+ multiple drives to be accessed and ejected independently.
30+
31+ #### CIRCUITPY drive
32+ The CIRCUITPY drive is the main drive that CircuitPython uses. It is writable by the host by default
33+ and read-only to CircuitPython. ` storage.remount() ` can be used to remount the drive to
34+ CircuitPython as read-write.
35+
36+ #### CPSAVES drive
37+ The board may also expose a CPSAVES drive. (This is based on the `` CIRCUITPY_SAVES_PARTITION_SIZE ``
38+ setting in `` mpconfigboard.h `` .) It is a portion of the main flash that is writable by CircuitPython
39+ by default. It is read-only to the host. ` storage.remount() ` can be used to remount the drive to the
40+ host as read-write.
41+
42+ #### SD card drive
43+ A few boards have SD card automounting. (This is based on the `` DEFAULT_SD `` settings in
44+ `` mpconfigboard.h `` .) The card is writable from CircuitPython by default and read-only to the host.
45+ ` storage.remount() ` can be used to remount the drive to the host as read-write.
2646
2747### CDC serial
2848CircuitPython exposes one CDC USB interface for CircuitPython serial. This is a standard serial
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ msgstr ""
8282msgid "%q and %q contain duplicate pins"
8383msgstr ""
8484
85- #: ports/atmel-samd/common-hal /audioio/AudioOut.c
85+ #: shared-bindings /audioio/AudioOut.c
8686msgid "%q and %q must be different"
8787msgstr ""
8888
@@ -154,7 +154,7 @@ msgstr ""
154154msgid "%q length must be >= %d"
155155msgstr ""
156156
157- #: py/modsys.c py/objmodule.c py/ runtime.c
157+ #: py/modsys.c py/runtime.c
158158msgid "%q moved from %q to %q"
159159msgstr ""
160160
Original file line number Diff line number Diff line change @@ -97,6 +97,14 @@ MP_DEFINE_CONST_FUN_OBJ_1(storage_umount_obj, storage_umount);
9797//| ) -> None:
9898//| """Remounts the given path with new parameters.
9999//|
100+ //| This can always be done from boot.py. After boot, it can only be done when the host computer
101+ //| doesn't have write access and CircuitPython isn't currently writing to the filesystem. An
102+ //| exception will be raised if this is the case. Some host OSes allow you to eject a drive which
103+ //| will allow for remounting.
104+ //|
105+ //| Remounting after USB is active may take a little time because it "ejects" the drive for one
106+ //| query from the host. These queries happen every second or so.
107+ //|
100108//| :param str mount_path: The path to remount.
101109//| :param bool readonly: True when the filesystem should be readonly to CircuitPython.
102110//| :param bool disable_concurrent_write_protection: When True, the check that makes sure the
You can’t perform that action at this time.
0 commit comments