c737cde947
Anywhere a module is mentioned, use its "non-u" name for consistency. The "import module" vs "import umodule" is something of a FAQ, and this commit intends to help clear that up. As a first approximation MicroPython is Python, and so imports should work the same as Python and use the same name, to a first approximation. The u-version of a module is a detail that can be learned later on, when the user wants to understand more and have finer control over importing. Existing Python code should just work, as much as it is possible to do that within the constraints of embedded systems, and the MicroPython documentation should match the idiomatic way to write Python code. With universal weak links for modules (via MICROPY_MODULE_WEAK_LINKS) users can consistently use "import foo" across all ports (with the exception of the minimal ports). And the ability to override/extend via "foo.py" continues to work well. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
37 lines
1015 B
ReStructuredText
37 lines
1015 B
ReStructuredText
.. currentmodule:: rp2
|
|
.. _rp2.Flash:
|
|
|
|
class Flash -- access to built-in flash storage
|
|
===============================================
|
|
|
|
This class gives access to the SPI flash memory.
|
|
|
|
In most cases, to store persistent data on the device, you'll want to use a
|
|
higher-level abstraction, for example the filesystem via Python's standard file
|
|
API, but this interface is useful to :ref:`customise the filesystem
|
|
configuration <filesystem>` or implement a low-level storage system for your
|
|
application.
|
|
|
|
|
|
Constructors
|
|
------------
|
|
|
|
.. class:: Flash()
|
|
|
|
Gets the singleton object for accessing the SPI flash memory.
|
|
|
|
|
|
Methods
|
|
-------
|
|
|
|
.. method:: Flash.readblocks(block_num, buf)
|
|
Flash.readblocks(block_num, buf, offset)
|
|
.. method:: Flash.writeblocks(block_num, buf)
|
|
Flash.writeblocks(block_num, buf, offset)
|
|
.. method:: Flash.ioctl(cmd, arg)
|
|
|
|
These methods implement the simple and extended
|
|
:ref:`block protocol <block-device-interface>` defined by
|
|
:class:`os.AbstractBlockDev`.
|
|
|