#pragma once
#include <Arduino.h>

#define CAL_MAGIC 0xC4
#define SETTINGS_MAGIC 0xC5
#define EEPROM_CAL 0
#define EEPROM_SETTINGS 9
#define EEPROM_LOG 16
#define GAME_ENTRY_SIZE 46
#define EEPROM_SIZE (EEPROM_LOG + MAX_GAME_LOG * GAME_ENTRY_SIZE)

void initStorage();
void saveCalibration();
void loadCalibration();
void saveSettings();
void loadSettings();
void saveGameLog();
void loadGameLog();
void logGame(int8_t winner);
void clearGameLog();
