2013-07-16 05:29:17 -07:00
|
|
|
#include <EEPROM.h>
|
|
|
|
|
|
|
|
void writeConfig();
|
|
|
|
void loadConfig();
|
2014-05-12 04:28:24 -07:00
|
|
|
void loadCalibration();
|
2014-05-13 00:13:12 -07:00
|
|
|
void writeCalibration();
|
2013-07-16 05:29:17 -07:00
|
|
|
|
|
|
|
/*
|
2014-02-06 01:48:19 -08:00
|
|
|
Current layout of EEPROM data (Version 2) is as follows (All sizes are in bytes):
|
2013-07-16 05:29:17 -07:00
|
|
|
|---------------------------------------------------|
|
|
|
|
|Byte # |Size | Description |
|
|
|
|
|---------------------------------------------------|
|
|
|
|
| 0 |1 | Data structure version |
|
|
|
|
| 1 |2 | X and Y sizes for VE table |
|
2013-07-18 04:53:40 -07:00
|
|
|
| 3 |64 | VE Map (8x8) |
|
|
|
|
| 67 |8 | VE Table RPM bins |
|
|
|
|
| 75 |8 | VE Table MAP/TPS bins |
|
2014-02-06 01:48:19 -08:00
|
|
|
| 83 |48 | Remaining Page 1 settings |
|
|
|
|
| 131 |2 | X and Y sizes for Ign table |
|
|
|
|
| 133 |64 | Ignition Map (8x8) |
|
|
|
|
| 197 |8 | Ign Table RPM bins |
|
|
|
|
| 205 |8 | Ign Table MAP/TPS bins |
|
|
|
|
| 213 |45 | Remaining Page 2 settings |
|
2014-05-11 20:43:57 -07:00
|
|
|
| 258 |12 | Calibration data (CLT) |
|
2014-05-19 22:30:22 -07:00
|
|
|
| 270 |12 | Calibration data (IAT) |
|
|
|
|
| 282 |12 | Calibration data (O2) |
|
|
|
|
| 294 |28 | Calibration data (Reserved) |
|
2013-07-16 05:29:17 -07:00
|
|
|
-----------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2013-07-18 04:53:40 -07:00
|
|
|
#define EEPROM_CONFIG1_XSIZE 1
|
|
|
|
#define EEPROM_CONFIG1_YSIZE 2
|
|
|
|
#define EEPROM_CONFIG1_MAP 3
|
|
|
|
#define EEPROM_CONFIG1_XBINS 67
|
|
|
|
#define EEPROM_CONFIG1_YBINS 75
|
2013-08-25 21:11:47 -07:00
|
|
|
#define EEPROM_CONFIG1_SETTINGS 83
|
2014-02-06 01:48:19 -08:00
|
|
|
#define EEPROM_CONFIG1_END 131
|
|
|
|
#define EEPROM_CONFIG2_XSIZE 131
|
|
|
|
#define EEPROM_CONFIG2_YSIZE 132
|
|
|
|
#define EEPROM_CONFIG2_MAP 133
|
|
|
|
#define EEPROM_CONFIG2_XBINS 197
|
|
|
|
#define EEPROM_CONFIG2_YBINS 205
|
|
|
|
#define EEPROM_CONFIG2_SETTINGS 213
|
2014-05-11 20:43:57 -07:00
|
|
|
|
|
|
|
#define EEPROM_CONFIG_END 258
|
|
|
|
|
|
|
|
#define EEPROM_CALIBRATION_CLT 258
|
2014-05-19 22:30:22 -07:00
|
|
|
#define EEPROM_CALIBRATION_IAT 270
|
|
|
|
#define EEPROM_CALIBRATION_O2 282
|
2014-05-11 20:43:57 -07:00
|
|
|
|