diff options
author | Damien George <damien@micropython.org> | 2024-02-02 13:51:18 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-02-07 13:25:10 +1100 |
commit | 4c56b39051b4a992d8691aa504cd2e76b958bf26 (patch) | |
tree | 9bd5e19a08626bf26c222c3e093e65916ce147b0 /docs/library | |
parent | 7d28789544e4e35d8c931b41765dd64a53c506f1 (diff) | |
download | micropython-4c56b39051b4a992d8691aa504cd2e76b958bf26.tar.gz micropython-4c56b39051b4a992d8691aa504cd2e76b958bf26.zip |
docs: Use vfs module instead of os.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'docs/library')
-rw-r--r-- | docs/library/machine.SD.rst | 4 | ||||
-rw-r--r-- | docs/library/machine.SDCard.rst | 2 | ||||
-rw-r--r-- | docs/library/pyb.rst | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/docs/library/machine.SD.rst b/docs/library/machine.SD.rst index c736dc4d28..b10b407a2f 100644 --- a/docs/library/machine.SD.rst +++ b/docs/library/machine.SD.rst @@ -20,11 +20,11 @@ more info regarding the pins which can be remapped to be used with a SD card. Example usage:: from machine import SD - import os + import vfs # clk cmd and dat0 pins must be passed along with # their respective alternate functions sd = machine.SD(pins=('GP10', 'GP11', 'GP15')) - os.mount(sd, '/sd') + vfs.mount(sd, '/sd') # do normal file operations Constructors diff --git a/docs/library/machine.SDCard.rst b/docs/library/machine.SDCard.rst index 4faa7a5557..e4bb25dfc0 100644 --- a/docs/library/machine.SDCard.rst +++ b/docs/library/machine.SDCard.rst @@ -30,7 +30,7 @@ vary from platform to platform. The class implements the block protocol defined by :class:`vfs.AbstractBlockDev`. This allows the mounting of an SD card to be as simple as:: - os.mount(machine.SDCard(), "/sd") + vfs.mount(machine.SDCard(), "/sd") The constructor takes the following parameters: diff --git a/docs/library/pyb.rst b/docs/library/pyb.rst index 869e2f8f3b..f169a77f3a 100644 --- a/docs/library/pyb.rst +++ b/docs/library/pyb.rst @@ -213,7 +213,7 @@ Miscellaneous functions .. function:: mount(device, mountpoint, *, readonly=False, mkfs=False) .. note:: This function is deprecated. Mounting and unmounting devices should - be performed by :meth:`os.mount` and :meth:`os.umount` instead. + be performed by :meth:`vfs.mount` and :meth:`vfs.umount` instead. Mount a block device and make it available as part of the filesystem. ``device`` must be an object that provides the block protocol. (The |