rusefi/misc/stm32f1_test_project/persistence.h

26 lines
468 B
C
Raw Permalink Normal View History

2023-06-27 15:33:30 -07:00
#pragma once
#include "hal_mfs.h"
#define PERSISTENCE_VERSION 41
2023-06-27 15:33:30 -07:00
#define MFS_CONFIGURATION_RECORD_ID 1
struct TestConfiguration {
void resetToDefaults() {
version = PERSISTENCE_VERSION;
updateCounter = 100;
rebootCounter = 10;
2023-06-27 15:33:30 -07:00
}
2023-06-27 15:42:41 -07:00
bool IsValid() const {
return version == PERSISTENCE_VERSION;
}
2023-06-27 15:33:30 -07:00
int version;
int updateCounter;
int rebootCounter;
2023-06-27 15:33:30 -07:00
};
int InitConfiguration();
void pokeConfiguration();