Rev 1221 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1221 | Rev 1222 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | #define _EEPROM_H |
2 | #define _EEPROM_H |
Line 3... | Line 3... | ||
3 | 3 | ||
Line 4... | Line 4... | ||
4 | #include <inttypes.h> |
4 | #include <inttypes.h> |
5 | 5 | ||
6 | #define EEPROM_ADR_PARAM_BEGIN 0 |
6 | #define EEPROM_ADR_PARAM_BEGIN 0 |
7 | #define PID_VERSION 1 // byte |
7 | #define PID_PARAM_REVISION 1 // byte |
8 | #define PID_ACTIVE_SET 2 // byte |
8 | #define PID_ACTIVE_SET 2 // byte |
9 | #define PID_PRESSURE_OFFSET 3 // byte |
9 | #define PID_PRESSURE_OFFSET 3 // byte |
10 | #define PID_ACC_NICK 4 // word |
10 | #define PID_ACC_NICK 4 // word |
Line 11... | Line 11... | ||
11 | #define PID_ACC_ROLL 6 // word |
11 | #define PID_ACC_ROLL 6 // word |
12 | #define PID_ACC_TOP 8 // word |
12 | #define PID_ACC_TOP 8 // word |
13 | 13 | ||
14 | #ifdef USE_KILLAGREG |
14 | #ifdef USE_KILLAGREG |
15 | #define PID_MM3_X_OFF 10 // byte |
15 | #define PID_MM3_X_OFF 11 // byte |
16 | #define PID_MM3_Y_OFF 11 // byte |
16 | #define PID_MM3_Y_OFF 12 // byte |
17 | #define PID_MM3_Z_OFF 12 // byte |
17 | #define PID_MM3_Z_OFF 13 // byte |
18 | #define PID_MM3_X_RANGE 13 // word |
18 | #define PID_MM3_X_RANGE 14 // word |
Line -... | Line 19... | ||
- | 19 | #define PID_MM3_Y_RANGE 16 // word |
|
19 | #define PID_MM3_Y_RANGE 15 // word |
20 | #define PID_MM3_Z_RANGE 18 // word |
Line 20... | Line 21... | ||
20 | #define PID_MM3_Z_RANGE 17 // word |
21 | #endif |
21 | #endif |
22 | |
Line -... | Line 23... | ||
- | 23 | ||
- | 24 | #define EEPROM_ADR_CHANNELS 80 // 8 bytes |
|
- | 25 | ||
- | 26 | #define EEPROM_ADR_PARAMSET_LENGTH 98 // word |
|
- | 27 | #define EEPROM_ADR_PARAMSET_BEGIN 100 |
|
- | 28 | ||
- | 29 | ||
- | 30 | #define EEPROM_ADR_MIXER_TABLE 1000 // 1000 - 1076 |
|
- | 31 | ||
- | 32 | ||
- | 33 | ||
- | 34 | #define MIX_GAS 0 |
|
- | 35 | #define MIX_NICK 1 |
|
- | 36 | #define MIX_ROLL 2 |
|
- | 37 | #define MIX_YAW 3 |
|
- | 38 | ||
- | 39 | typedef struct |
|
- | 40 | { |
|
- | 41 | uint8_t Revision; |
|
- | 42 | int8_t Name[12]; |
|
22 | 43 | int8_t Motor[16][4]; |
|
23 | #define EEPROM_ADR_CHANNELS 80 // 8 bytes |
44 | } __attribute__((packed)) MixerTable_t; |
24 | 45 | ||
25 | #define EEPROM_ADR_PARAMSET_LENGTH 98 // word |
46 | extern MixerTable_t Mixer; |
26 | #define EEPROM_ADR_PARAMSET_BEGIN 100 |
47 | |
Line 50... | Line 71... | ||
50 | #define CH_POTI1 4 |
71 | #define CH_POTI1 4 |
51 | #define CH_POTI2 5 |
72 | #define CH_POTI2 5 |
52 | #define CH_POTI3 6 |
73 | #define CH_POTI3 6 |
53 | #define CH_POTI4 7 |
74 | #define CH_POTI4 7 |
Line 54... | Line 75... | ||
54 | 75 | ||
- | 76 | #define EEPARAM_REVISION 75 // is count up, if paramater stucture has changed (compatibility) |
|
Line 55... | Line 77... | ||
55 | #define EEPARAM_VERSION 74 // is count up, if EE_Paramater stucture has changed (compatibility) |
77 | #define EEMIXER_REVISION 1 // is count up, if Mixer stucture has changed (compatibility) |
56 | 78 | ||
57 | // values above 250 representing poti1 to poti4 |
79 | // values above 250 representing poti1 to poti4 |
58 | typedef struct |
80 | typedef struct |
Line 139... | Line 161... | ||
139 | extern void ParamSet_ReadFromEEProm(uint8_t setnumber); |
161 | extern void ParamSet_ReadFromEEProm(uint8_t setnumber); |
140 | extern void ParamSet_WriteToEEProm(uint8_t setnumber); |
162 | extern void ParamSet_WriteToEEProm(uint8_t setnumber); |
141 | extern uint8_t GetActiveParamSet(void); |
163 | extern uint8_t GetActiveParamSet(void); |
142 | extern void SetActiveParamSet(uint8_t setnumber); |
164 | extern void SetActiveParamSet(uint8_t setnumber); |
Line -... | Line 165... | ||
- | 165 | ||
- | 166 | extern uint8_t MixerTable_ReadFromEEProm(void); |
|
- | 167 | extern uint8_t MixerTable_WriteToEEProm(void); |
|
- | 168 | ||
- | 169 | ||
- | 170 | extern uint8_t GetParamByte(uint16_t param_id); |
|
- | 171 | extern void SetParamByte(uint16_t param_id, uint8_t value); |
|
- | 172 | extern uint16_t GetParamWord(uint16_t param_id); |
|
Line 143... | Line -... | ||
143 | - | ||
144 | - | ||
145 | extern uint8_t GetParamByte(uint8_t param_id); |
- | |
146 | extern void SetParamByte(uint8_t param_id, uint8_t value); |
- | |
Line 147... | Line 173... | ||
147 | extern uint16_t GetParamWord(uint8_t param_id); |
173 | extern void SetParamWord(uint16_t param_id, uint16_t value); |