Speeduino
Loading...
Searching...
No Matches
Public Attributes | List of all members
storage_api_t Struct Reference

The external storage API. This must be supported by any storage system. E.g. EEPROM, SPI. More...

#include <storage_api.h>

Public Attributes

byte(* read )(uint16_t address)
 Function to read a single byte from storage.
 
void(* write )(uint16_t address, byte val)
 Function to write a single byte to storage.
 
uint16_t(* length )(void)
 Function to get the size of the address space.
 
uint16_t(* getMaxWriteBlockSize )(const statuses &current)
 The maximum number of write operations that will be performed in one go.
 

Detailed Description

The external storage API. This must be supported by any storage system. E.g. EEPROM, SPI.

This abstracts our requirements for low level storage I/O from the underlying storage hardware.

Modelled as a byte addressable address space

Member Data Documentation

◆ getMaxWriteBlockSize

uint16_t(* storage_api_t::getMaxWriteBlockSize) (const statuses &current)

The maximum number of write operations that will be performed in one go.

◆ length

uint16_t(* storage_api_t::length) (void)

Function to get the size of the address space.

We assume the entire address space from 0 to this size is available for use.

◆ read

byte(* storage_api_t::read) (uint16_t address)

Function to read a single byte from storage.

◆ write

void(* storage_api_t::write) (uint16_t address, byte val)

Function to write a single byte to storage.


The documentation for this struct was generated from the following file: