This is the documentation for the latest development branch of MicroPython and may refer to features that are not available in released versions.

If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

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 customise the filesystem configuration or implement a low-level storage system for your application.

Constructors

class rp2.Flash

Gets the singleton object for accessing the SPI flash memory.

Methods

Flash.readblocks(block_num, buf)
Flash.readblocks(block_num, buf, offset)
Flash.writeblocks(block_num, buf)
Flash.writeblocks(block_num, buf, offset)
Flash.ioctl(cmd, arg)

These methods implement the simple and extended block protocol defined by vfs.AbstractBlockDev.