VLCB
Toggle main menu visibility
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
10
namespace
VLCB
11
{
12
14
class
Storage
15
{
16
public
:
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
29
extern
Storage *
createDefaultStorageForPlatform
();
30
31
}
VLCB::Storage
Interface for persistent storage. Used by Configuration class.
Definition
Storage.h:15
VLCB::Storage::readBytes
virtual byte readBytes(unsigned int eeaddress, byte nbytes, byte dest[])=0
VLCB::Storage::reset
virtual void reset()=0
VLCB::Storage::write
virtual void write(unsigned int eeaddress, byte data)=0
VLCB::Storage::begin
virtual void begin(unsigned int size)=0
Initialise the storage.
VLCB::Storage::commitWriteEEPROM
virtual void commitWriteEEPROM()
Definition
Storage.h:26
VLCB::Storage::writeBytes
virtual void writeBytes(unsigned int eeaddress, const byte src[], byte numbytes)=0
VLCB::Storage::read
virtual byte read(unsigned int eeaddress)=0
VLCB
Definition
AbstractEventTeachingService.cpp:13
VLCB::createDefaultStorageForPlatform
Storage * createDefaultStorageForPlatform()
Definition
CreateDefaultStorageForPlatform.cpp:19
src
Storage.h
Generated by
1.18.0