Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit e91b1cd

Browse files
author
Paul Sokolovsky
committed
docs/uos: Move cc3200 port legacy VFS mounting functions to its ref doc.
This patch also unconditionalizes uos.dupterm(), though exact interface and semantics is yet to be defined.
1 parent 1ce44f3 commit e91b1cd

File tree

2 files changed

+27
-22
lines changed

2 files changed

+27
-22
lines changed

docs/library/uos.rst

+4-22
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,8 @@ Functions
8787
Return a bytes object with n random bytes. Whenever possible, it is
8888
generated by the hardware random number generator.
8989

90-
.. only:: port_wipy
90+
.. function:: dupterm(stream_object)
9191

92-
.. function:: mount(block_device, mount_point, \*, readonly=False)
93-
94-
Mounts a block device (like an ``SD`` object) in the specified mount
95-
point. Example::
96-
97-
os.mount(sd, '/sd')
98-
99-
.. function:: unmount(path)
100-
101-
Unmounts a previously mounted block device from the given path.
102-
103-
.. function:: mkfs(block_device or path)
104-
105-
Formats the specified path, must be either ``/flash`` or ``/sd``.
106-
A block device can also be passed like an ``SD`` object before
107-
being mounted.
108-
109-
.. function:: dupterm(stream_object)
110-
111-
Duplicate the terminal (the REPL) on the passed stream-like object.
112-
The given object must at least implement the ``.read()`` and ``.write()`` methods.
92+
Duplicate or switch MicroPython terminal (the REPL) on the passed stream-like
93+
object. The given object must implement the `.readinto()` and `.write()`
94+
methods. If ``None`` is passed, previously set redirection is cancelled.

docs/wipy/general.rst

+23
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,26 @@ Example::
360360

361361
Returns ``True`` if the server is running, ``False`` otherwise.
362362

363+
Adhoc VFS-like support
364+
~~~~~~~~~~~~~~~~~~~~~~
365+
366+
WiPy doesn't implement full MicroPython VFS support, instead following
367+
functions are defined in ``uos`` module:
368+
369+
.. function:: mount(block_device, mount_point, \*, readonly=False)
370+
371+
Mounts a block device (like an ``SD`` object) in the specified mount
372+
point. Example::
373+
374+
os.mount(sd, '/sd')
375+
376+
.. function:: unmount(path)
377+
378+
Unmounts a previously mounted block device from the given path.
379+
380+
.. function:: mkfs(block_device or path)
381+
382+
Formats the specified path, must be either ``/flash`` or ``/sd``.
383+
A block device can also be passed like an ``SD`` object before
384+
being mounted.
385+

0 commit comments

Comments
 (0)