Pico Flash Class.
More...
#include <flash.hpp>
|
| static void | write (const uint8_t *data, size_t len) |
| | Writes data to the flash space. More...
|
| |
| static void | read (uint8_t *data, size_t len) |
| | Reads data from the flash space. More...
|
| |
| static bool | verify (const uint8_t *data, size_t len) |
| | Verifies data written to the flash space. More...
|
| |
Pico Flash Class.
The purpose of this static class is to manipulate the Flash space on board.
◆ write()
| void write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
static |
Writes data to the flash space.
Writes data to the end of the program's flash memory space.
WARNINGS:
-
The second CPU core is stopped for this operation!
-
All data on the sector (flash sector size) will be erased first!
-
If the buffer size is greater than the available free space (total size of flash memory minus program size), the program will be permanently corrupted at runtime!
- Parameters
-
| data | Pointer to a buffer to write. |
| len | Size of buffer, in bytes. |
◆ read()
| void read |
( |
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
static |
Reads data from the flash space.
Reads data from the end of the program's flash memory space.
- Parameters
-
| data | Pointer to a buffer to receive data. |
| len | Size of buffer, in bytes. |
◆ verify()
| bool verify |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
static |
Verifies data written to the flash space.
Reads data from the end of the program's flash memory space, and compares with the buffer.
- Parameters
-
| data | Pointer to a buffer to compare. |
| len | Size of buffer, in bytes. |
- Returns
- True if the flash data is equal the buffer. False otherwise.
The documentation for this class was generated from the following files: