VLCB
Loading...
Searching...
No Matches
Storage.h
Go to the documentation of this file.
1// Copyright (C) Sven Rosvall (sven@rosvall.ie)
2// This file is part of VLCB-Arduino project on https://github.com/SvenRosvall/VLCB-Arduino
3// Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
4// The full licence can be found at: http://creativecommons.org/licenses/by-nc-sa/4.0/
5
6#pragma once
7
8#include <Arduino.h> // for definition of byte datatype
9
10namespace VLCB
11{
12
15{
16public:
19 virtual void begin(unsigned int size) = 0;
20
21 virtual byte read(unsigned int eeaddress) = 0;
22 virtual void write(unsigned int eeaddress, byte data) = 0;
23 virtual byte readBytes(unsigned int eeaddress, byte nbytes, byte dest[]) = 0;
24 virtual void writeBytes(unsigned int eeaddress, const byte src[], byte numbytes) = 0;
25 virtual void reset() = 0;
26 virtual void commitWriteEEPROM() {}
27};
28
29extern Storage * createDefaultStorageForPlatform();
30
31}
Interface for persistent storage. Used by Configuration class.
Definition Storage.h:15
virtual byte readBytes(unsigned int eeaddress, byte nbytes, byte dest[])=0
virtual void reset()=0
virtual void write(unsigned int eeaddress, byte data)=0
virtual void begin(unsigned int size)=0
Initialise the storage.
virtual void commitWriteEEPROM()
Definition Storage.h:26
virtual void writeBytes(unsigned int eeaddress, const byte src[], byte numbytes)=0
virtual byte read(unsigned int eeaddress)=0
Definition AbstractEventTeachingService.cpp:13
Storage * createDefaultStorageForPlatform()
Definition CreateDefaultStorageForPlatform.cpp:19