USB EPROM/Flash Programmer
Static Public Member Functions | List of all members
Flash Class Reference

Pico Flash Class. More...

#include <flash.hpp>

Static Public Member Functions

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...
 

Detailed Description

Pico Flash Class.

The purpose of this static class is to manipulate the Flash space on board.

Member Function Documentation

◆ 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
dataPointer to a buffer to write.
lenSize 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
dataPointer to a buffer to receive data.
lenSize 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
dataPointer to a buffer to compare.
lenSize 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: