EEPROM file storage, and argparsing that actually works

This commit is contained in:
John Stäck 2019-06-24 11:56:57 +02:00
parent 3b2f0fa4cf
commit 829c08c031
5 changed files with 4385 additions and 492 deletions

View file

@ -2,6 +2,7 @@
#define __EEPROM_H
#include <stdint.h>
#include <stdio.h>
struct EEPROMClass
{
@ -36,12 +37,19 @@ struct EEPROMClass
// return t;
// }
//Make EEPROM persistent by storing to a file
int16_t setStorage(const char* filename, bool write);
void closeStorage();
private:
char someFakeEEPROM_memory[2048];
uint8_t someFakeEEPROM_memory[2048]; //Teensy 3.2 size
FILE *storage;
bool autoUpdate;
};
static EEPROMClass EEPROM __attribute__ ((unused));
extern EEPROMClass EEPROM __unused;
#endif