Rev 1612 |
Rev 1646 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#ifndef _EEPROM_H
#define _EEPROM_H
#include <inttypes.h>
#include "configuration.h"
#define EEPROM_ADR_PARAM_BEGIN 0
#define PID_PARAM_REVISION 1 // byte
#define PID_ACTIVE_SET 2 // byte
#define PID_PRESSURE_OFFSET 3 // byte
#define PID_ACC_PITCH 4 // word
#define PID_ACC_ROLL 6 // word
#define PID_ACC_TOP 8 // word
#ifdef USE_KILLAGREG
#define PID_MM3_X_OFF 11 // byte
#define PID_MM3_Y_OFF 12 // byte
#define PID_MM3_Z_OFF 13 // byte
#define PID_MM3_X_RANGE 14 // word
#define PID_MM3_Y_RANGE 16 // word
#define PID_MM3_Z_RANGE 18 // word
#endif
#define EEPROM_ADR_CHANNELS 80 // 8 bytes
#define EEPROM_ADR_PARAMSET_LENGTH 98 // word
#define EEPROM_ADR_PARAMSET_BEGIN 100
#define EEPROM_ADR_MIXER_TABLE 1000 // 1000 - 1076
#define EEPARAM_REVISION 75 // is count up, if paramater stucture has changed (compatibility)
#define EEMIXER_REVISION 1 // is count up, if Mixer stucture has changed (compatibility)
extern void ParamSet_Init(void);
extern void ParamSet_ReadFromEEProm(uint8_t setnumber);
extern void ParamSet_WriteToEEProm(uint8_t setnumber);
extern uint8_t MixerTable_ReadFromEEProm(void);
extern uint8_t MixerTable_WriteToEEProm(void);
extern uint8_t GetParamByte(uint16_t param_id);
extern void SetParamByte(uint16_t param_id, uint8_t value);
extern uint16_t GetParamWord(uint16_t param_id);
extern void SetParamWord(uint16_t param_id, uint16_t value);
extern uint8_t getActiveParamSet(void);
extern void setActiveParamSet(uint8_t setnumber);
#endif //_EEPROM_H