Subversion Repositories NaviCtrl

Rev

Rev 527 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
248 killagreg 1
#ifndef __EEPROM_H
2
#define __EEPROM_H
3
 
527 holgerb 4
// two calibrtion sets for extern and intern sensor
5
#define EEPROM_ADR_MAG_CALIBRATION_INTERN       50
6
#define EEPROM_ADR_MAG_CALIBRATION_EXTERN   70
7
#define EEPROM_ADR_LICENSE_DATA_CRC                124// - 600
8
#define EEPROM_ADR_LICENSE_DATA                    128// - 600
9
 
10
#define EEPROM_LICENSE_DATA_KOMPATIBEL          1
11
 
248 killagreg 12
typedef enum
13
{
14
  EEPROM_SUCCESS = 0,
15
  EERPOM_ERROR_I2C_DEINIT,
16
  EEPROM_ERROR_I2C_IDLE_TIMEOUT,
17
  EEPROM_ERROR_I2C_TRANSFER_TIMEOUT,
18
  EEPROM_ERROR_OUT_OF_ADDRESS_RANGE,
19
  EEPROM_DATA_TRANSFER_INCOMPLETE,
20
  EEPROM_I2C_BUFFER_OVERRUN,
256 killagreg 21
  EEPROM_NO_ACK,
248 killagreg 22
  EEPROM_ERROR_UNKNOWN
23
} EEPROM_Result_t;
24
 
527 holgerb 25
extern u8 EEPROM_Init(void);
26
extern EEPROM_Result_t EEPROM_WriteBlock(u16 Address, u8 *pData, u16 DataLen);
27
extern EEPROM_Result_t EEPROM_ReadBlock(u16 Address, u8 *pData, u16 DataLen);
28
extern void WriteLicenseToEEPROM(u8 kampatibel);
29
extern u8 ReadLicenseFromEEPROM(void);
30
extern void DeleteLicenseInEEPROM(void);
31
extern void ClearLicenseText(void);
248 killagreg 32
 
33
#endif // EEPROM_H
34