VLCB
Loading...
Searching...
No Matches
EepromExternalStorage.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#include <Arduino.h> // for definition of byte datatype
11#include <Wire.h>
12
13namespace VLCB
14{
15
17{
18public:
19 EepromExternalStorage(byte address);
20 EepromExternalStorage(byte address, TwoWire *bus);
21 virtual void begin(unsigned int size) override;
22
23 virtual byte read(unsigned int eeaddress) override;
24 virtual byte readBytes(unsigned int eeaddress, byte nbytes, byte dest[]) override;
25 virtual void write(unsigned int eeaddress, byte data) override;
26 virtual void writeBytes(unsigned int eeaddress, const byte src[], byte numbytes) override;
27 virtual void reset() override;
28
29private:
30 byte external_address;
31 TwoWire *I2Cbus;
32};
33
34}
virtual void writeBytes(unsigned int eeaddress, const byte src[], byte numbytes) override
Definition EepromExternalStorage.cpp:119
EepromExternalStorage(byte address)
Definition EepromExternalStorage.cpp:13
virtual byte read(unsigned int eeaddress) override
read a single byte from EEPROM
Definition EepromExternalStorage.cpp:44
virtual void write(unsigned int eeaddress, byte data) override
write a byte
Definition EepromExternalStorage.cpp:100
virtual byte readBytes(unsigned int eeaddress, byte nbytes, byte dest[]) override
Definition EepromExternalStorage.cpp:73
virtual void reset() override
clear all event data in external EEPROM chip
Definition EepromExternalStorage.cpp:145
Interface for persistent storage. Used by Configuration class.
Definition Storage.h:15
Definition AbstractEventTeachingService.cpp:13
void begin()
Definition VLCB.cpp:181