supla-device
Loading...
Searching...
No Matches
eeprom.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_STORAGE_EEPROM_H_
5#define SRC_SUPLA_STORAGE_EEPROM_H_
6
7#include "storage.h"
8
9namespace Supla {
10
11class Eeprom : public Storage {
12 public:
13 explicit Eeprom(unsigned int storageStartingOffset = 0,
14 int reservedSize = -1);
15 bool init();
16 void commit();
17
18 protected:
19 int readStorage(unsigned int, unsigned char *, unsigned int, bool);
20 int writeStorage(unsigned int, const unsigned char *, unsigned int);
21
22 int reservedSize;
23 bool dataChanged;
24};
25
26}; // namespace Supla
27
28#endif // SRC_SUPLA_STORAGE_EEPROM_H_
Definition eeprom.h:11
Definition storage.h:23