mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-16 02:23:28 +01:00
Added configuration handling
This commit is contained in:
22
include/Configuration.h
Normal file
22
include/Configuration.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#define CONFIG_FILENAME "/config.bin"
|
||||
#define CONFIG_VERSION 0x00010000 // 0.1.0
|
||||
|
||||
struct CONFIG_T {
|
||||
uint32_t Cfg_Version;
|
||||
uint Cfg_SaveCount;
|
||||
};
|
||||
|
||||
class ConfigurationClass {
|
||||
public:
|
||||
void init();
|
||||
bool read();
|
||||
bool write();
|
||||
void migrate();
|
||||
CONFIG_T& get();
|
||||
};
|
||||
|
||||
extern ConfigurationClass Configuration;
|
||||
Reference in New Issue
Block a user