Rev 2159 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2159 | Rev 2189 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _EEPROM_H |
1 | #ifndef _EEPROM_H |
2 | #define _EEPROM_H |
2 | #define _EEPROM_H |
Line 3... | Line 3... | ||
3 | 3 | ||
4 | #include <inttypes.h> |
4 | #include <inttypes.h> |
5 | #include "configuration.h" |
- | |
Line 6... | Line 5... | ||
6 | #include "analog.h" |
5 | #include "configuration.h" |
7 | 6 | ||
Line 8... | Line 7... | ||
8 | #define EEPROM_ADR_PARAM_BEGIN 0 |
7 | #define EEPROM_ADR_PARAM_BEGIN 0 |
Line 14... | Line 13... | ||
14 | //#define EEPROM_ADR_GYROAMPLIFIER (EEPROM_ADR_GYROOFFSET+sizeof(SensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD) |
13 | //#define EEPROM_ADR_GYROAMPLIFIER (EEPROM_ADR_GYROOFFSET+sizeof(SensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD) |
15 | //#define EEPROM_ADR_CHANNELMAP (EEPROM_ADR_GYROAMPLIFIER+sizeof(SensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD) |
14 | //#define EEPROM_ADR_CHANNELMAP (EEPROM_ADR_GYROAMPLIFIER+sizeof(SensorOffset_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD) |
16 | //#define EEPROM_ADR_MIXER_TABLE (EEPROM_ADR_CHANNELMAP+sizeof(ChannelMap_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD) |
15 | //#define EEPROM_ADR_MIXER_TABLE (EEPROM_ADR_CHANNELMAP+sizeof(ChannelMap_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD) |
17 | //#define EEPROM_ADR_PARAMSET_BEGIN (EEPROM_ADR_MIXER_TABLE+sizeof(MixerMatrix_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD) |
16 | //#define EEPROM_ADR_PARAMSET_BEGIN (EEPROM_ADR_MIXER_TABLE+sizeof(MixerMatrix_t)+EEPROM_CHECKSUMMED_BLOCK_OVERHEAD) |
Line 18... | Line 17... | ||
18 | 17 | ||
19 | #define EEPROM_ADR_ACCOFFSET 16 |
18 | #define EEPROM_ADR_ACCELOFFSET 16 |
20 | #define EEPROM_ADR_GYROOFFSET 32 |
19 | #define EEPROM_ADR_GYROOFFSET 32 |
21 | #define EEPROM_ADR_GYROAMPLIFIER 48 |
20 | #define EEPROM_ADR_GYROAMPLIFIER 48 |
22 | #define EEPROM_ADR_CHANNELMAP 64 |
21 | #define EEPROM_ADR_CHANNELMAP 64 |
23 | #define EEPROM_ADR_IMU_CONFIG 100 |
22 | #define EEPROM_ADR_IMU_CONFIG 100 |
24 | #define EEPROM_ADR_MIXER_TABLE 128 |
23 | #define EEPROM_ADR_MIXER_TABLE 128 |
Line 25... | Line 24... | ||
25 | #define EEPROM_ADR_PARAMSET_BEGIN 256 |
24 | #define EEPROM_ADR_PARAMSET_BEGIN 384 |
26 | 25 | ||
27 | #define CHANNELMAP_REVISION 0 |
26 | #define CHANNELMAP_REVISION 0 |
28 | #define EEPARAM_REVISION 3 |
27 | #define EEPARAM_REVISION 5 |
29 | #define EEMIXER_REVISION 1 |
28 | #define EEMIXER_REVISION 3 |
Line 30... | Line 29... | ||
30 | #define SENSOROFFSET_REVISION 0 |
29 | #define SENSOROFFSET_REVISION 0 |
31 | #define IMUCONFIG_REVISION 0 |
30 | #define IMUCONFIG_REVISION 0 |
32 | 31 | ||
33 | void paramSet_readOrDefault(void); |
32 | void paramSet_readOrDefault(void); |
34 | void channelMap_readOrDefault(void); |
33 | void channelMap_readOrDefault(void); |
Line 35... | Line 34... | ||
35 | void motorMixer_readOrDefault(void); |
34 | void outputMixer_readOrDefault(void); |
36 | void IMUConfig_readOrDefault(void); |
35 | void IMUConfig_readOrDefault(void); |
Line 37... | Line 36... | ||
37 | void IMUConfig_writeToEEprom(void); |
36 | void IMUConfig_writeToEEprom(void); |
38 | 37 | ||
Line 39... | Line 38... | ||
39 | uint8_t paramSet_readFromEEProm(uint8_t setnumber); |
38 | uint8_t paramSet_readFromEEProm(uint8_t setnumber); |
40 | void paramSet_writeToEEProm(uint8_t setnumber); |
39 | void paramSet_writeToEEProm(uint8_t setnumber); |
Line 41... | Line 40... | ||
41 | 40 | ||
42 | //uint8_t channelMap_readFromEEProm(void); |
41 | //uint8_t channelMap_readFromEEProm(void); |
Line 43... | Line 42... | ||
43 | void channelMap_writeToEEProm(void); |
42 | void channelMap_writeToEEProm(void); |
44 | 43 | ||
Line 45... | Line 44... | ||
45 | //uint8_t motorMixer_readFromEEProm(void); |
44 | //uint8_t motorMixer_readFromEEProm(void); |
46 | void motorMixer_writeToEEProm(void); |
45 | void outputMixer_writeToEEProm(void); |
Line 47... | Line 46... | ||
47 | 46 | ||
48 | uint8_t gyroAmplifierOffset_readFromEEProm(void); |
47 | uint8_t gyroAmplifierOffset_readFromEEProm(void); |
49 | void gyroAmplifierOffset_writeToEEProm(void); |
48 | void gyroAmplifierOffset_writeToEEProm(void); |
50 | 49 |