class DiskAccess – access to disk storage¶
Uses Zephyr Disk Access API.
This class allows access to storage devices on the board, such as support for SD card controllers and interfacing with SD cards via SPI. Disk devices are automatically detected and initialized on boot using Zephyr devicetree data.
The Zephyr disk access class enables the transfer of data between a disk device and an accessible memory buffer given a disk name, buffer, starting disk block, and number of sectors to read. MicroPython reads as many blocks as necessary to fill the buffer, so the number of sectors to read is found by dividing the buffer length by block size of the disk.
Gets an object for accessing disk memory of the specific disk. For accessing an SD card on the mimxrt1050_evk,
SDHC. See board documentation and devicetree for usable disk names for your board (ex. RT boards use style USDHC#).
readblocks(block_num, buf, offset)
writeblocks(block_num, buf, offset)