8000 docs/library/os.rst: Clarify littlefs requirements for block erase. · micropython/micropython@cc0884b · GitHub
[go: up one dir, main page]

Skip to content

Commit cc0884b

Browse files
peterhinchdpgeorge
authored andcommitted
docs/library/os.rst: Clarify littlefs requirements for block erase.
1 parent 318c029 commit cc0884b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/library/os.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,12 @@ that the block device supports the extended interface.
314314
``ioctl(6, ...)`` must also be intercepted. The need for others is
315315
hardware dependent.
316316

317+
Prior to any call to ``writeblocks(block, ...)`` littlefs issues
318+
``ioctl(6, block)``. This enables a device driver to erase the block
319+
prior to a write if the hardware requires it. Alternatively a driver
320+
might intercept ``ioctl(6, block)`` and return 0 (success). In this case
321+
the driver assumes responsibility for detecting the need for erasure.
322+
317323
Unless otherwise stated ``ioctl(op, arg)`` can return ``None``.
318324
Consequently an implementation can ignore unused values of ``op``. Where
319325
``op`` is intercepted, the return value for operations 4 and 5 are as

0 commit comments

Comments
 (0)
0