VLCB
Toggle main menu visibility
Loading...
Searching...
No Matches
EepromInternalStorage.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 "
Storage.h
"
9
10
namespace
VLCB
11
{
12
13
class
EepromInternalStorage
:
public
Storage
14
{
15
public
:
16
17
#ifdef __SAM3X8E__
18
// If SAM3X8E is defined then this file shall be compilable but this class shall not be instantiatable and will not compile if used anyway.
19
EepromInternalStorage
() =
delete
;
20
#endif
21
22
virtual
void
begin
(
unsigned
int
size)
override
;
23
24
virtual
byte
read
(
unsigned
int
eeaddress)
override
;
25
virtual
byte
readBytes
(
unsigned
int
eeaddress,
byte
nbytes,
byte
dest[])
override
;
26
virtual
void
write
(
unsigned
int
eeaddress,
byte
data)
override
;
27
virtual
void
writeBytes
(
unsigned
int
eeaddress,
const
byte
src[],
byte
numbytes)
override
;
28
virtual
void
reset
()
override
;
29
virtual
void
commitWriteEEPROM
()
override
;
30
31
private
:
32
byte
getChipEEPROMVal(
unsigned
int
eeaddress);
33
void
setChipEEPROMVal(
unsigned
int
eeaddress,
byte
val);
34
};
35
36
}
Storage.h
VLCB::EepromInternalStorage
Definition
EepromInternalStorage.h:14
VLCB::EepromInternalStorage::commitWriteEEPROM
virtual void commitWriteEEPROM() override
Definition
EepromInternalStorage.cpp:96
VLCB::EepromInternalStorage::writeBytes
virtual void writeBytes(unsigned int eeaddress, const byte src[], byte numbytes) override
Definition
EepromInternalStorage.cpp:76
VLCB::EepromInternalStorage::write
virtual void write(unsigned int eeaddress, byte data) override
write a byte
Definition
EepromInternalStorage.cpp:65
VLCB::EepromInternalStorage::reset
virtual void reset() override
clear all event data in external EEPROM chip
Definition
EepromInternalStorage.cpp:105
VLCB::EepromInternalStorage::readBytes
virtual byte readBytes(unsigned int eeaddress, byte nbytes, byte dest[]) override
Definition
EepromInternalStorage.cpp:43
VLCB::EepromInternalStorage::begin
virtual void begin(unsigned int size) override
Initialise the storage.
Definition
EepromInternalStorage.cpp:15
VLCB::EepromInternalStorage::read
virtual byte read(unsigned int eeaddress) override
read a single byte from EEPROM
Definition
EepromInternalStorage.cpp:32
VLCB::Storage
Interface for persistent storage. Used by Configuration class.
Definition
Storage.h:15
VLCB
Definition
AbstractEventTeachingService.cpp:13
src
EepromInternalStorage.h
Generated by
1.18.0