summaryrefslogtreecommitdiff
path: root/docs/library/rp2.Flash.rst
diff options
context:
space:
mode:
authorTim Radvan <tim@tjvr.org>2021-04-16 12:18:04 +0100
committerDamien George <damien@micropython.org>2021-05-08 18:02:04 +1000
commitfd24e649fde26bcd484b30025527768d37f5c562 (patch)
tree6f82e91eaca5e0d2330cddb6921b059688def801 /docs/library/rp2.Flash.rst
parent9eea51b730532cb33fe2531a3aade734d0a0a121 (diff)
docs/library: Add initial API reference for rp2 module and its classes.
All the method signatures from rp2_pio.c and friends have been taken and converted to RST format, then explanatory notes added for each signature. Signed-off-by: Tim Radvan <tim@tjvr.org>
Diffstat (limited to 'docs/library/rp2.Flash.rst')
-rw-r--r--docs/library/rp2.Flash.rst36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/library/rp2.Flash.rst b/docs/library/rp2.Flash.rst
new file mode 100644
index 000000000..3b423adfd
--- /dev/null
+++ b/docs/library/rp2.Flash.rst
@@ -0,0 +1,36 @@
+.. 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:`uos.AbstractBlockDev`.
+