VLCB
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
10namespace VLCB
11{
12
14{
15public:
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
31private:
32 byte getChipEEPROMVal(unsigned int eeaddress);
33 void setChipEEPROMVal(unsigned int eeaddress, byte val);
34};
35
36}
Definition EepromInternalStorage.h:14
virtual void commitWriteEEPROM() override
Definition EepromInternalStorage.cpp:96
virtual void writeBytes(unsigned int eeaddress, const byte src[], byte numbytes) override
Definition EepromInternalStorage.cpp:76
virtual void write(unsigned int eeaddress, byte data) override
write a byte
Definition EepromInternalStorage.cpp:65
virtual void reset() override
clear all event data in external EEPROM chip
Definition EepromInternalStorage.cpp:105
virtual byte readBytes(unsigned int eeaddress, byte nbytes, byte dest[]) override
Definition EepromInternalStorage.cpp:43
virtual byte read(unsigned int eeaddress) override
read a single byte from EEPROM
Definition EepromInternalStorage.cpp:32
Interface for persistent storage. Used by Configuration class.
Definition Storage.h:15
Definition AbstractEventTeachingService.cpp:13
void begin()
Definition VLCB.cpp:181