summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPeter Hinch <peter@hinch.me.uk>2021-09-07 07:56:26 +0100
committerDamien George <damien@micropython.org>2021-09-10 15:21:12 +1000
commitcc0884bb4fe7ad5087030323cfae0bf800e432b5 (patch)
treebf23795e483f30e395e6101c1c89922a8168a580 /docs
parent318c029d4569488df97661018fdce0e2c1443a79 (diff)
docs/library/os.rst: Clarify littlefs requirements for block erase.
Diffstat (limited to 'docs')
-rw-r--r--docs/library/os.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/library/os.rst b/docs/library/os.rst
index a1eae4f24..19652ee2b 100644
--- a/docs/library/os.rst
+++ b/docs/library/os.rst
@@ -314,6 +314,12 @@ that the block device supports the extended interface.
``ioctl(6, ...)`` must also be intercepted. The need for others is
hardware dependent.
+ Prior to any call to ``writeblocks(block, ...)`` littlefs issues
+ ``ioctl(6, block)``. This enables a device driver to erase the block
+ prior to a write if the hardware requires it. Alternatively a driver
+ might intercept ``ioctl(6, block)`` and return 0 (success). In this case
+ the driver assumes responsibility for detecting the need for erasure.
+
Unless otherwise stated ``ioctl(op, arg)`` can return ``None``.
Consequently an implementation can ignore unused values of ``op``. Where
``op`` is intercepted, the return value for operations 4 and 5 are as