Go to most recent revision | Details | 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 |
780 | holgerb | 5 | #define EEPROM_ADR_BARO_KALIBRATION 46 // 46 - 49 |
527 | holgerb | 6 | #define EEPROM_ADR_MAG_CALIBRATION_INTERN 50 |
7 | #define EEPROM_ADR_MAG_CALIBRATION_EXTERN 70 |
||
8 | #define EEPROM_ADR_LICENSE_DATA_CRC 124// - 600 |
||
9 | #define EEPROM_ADR_LICENSE_DATA 128// - 600 |
||
760 | holgerb | 10 | #define EEPROM_ADR_OEM_Name_CRC 601// 2 bytes |
11 | #define EEPROM_ADR_OEM_Name 603// 603 - 619 |
||
527 | holgerb | 12 | |
13 | #define EEPROM_LICENSE_DATA_KOMPATIBEL 1 |
||
14 | |||
760 | holgerb | 15 | // points into the license struct |
16 | #define OEM_IN_LICENSE 460 |
||
17 | |||
248 | killagreg | 18 | typedef enum |
19 | { |
||
20 | EEPROM_SUCCESS = 0, |
||
21 | EERPOM_ERROR_I2C_DEINIT, |
||
22 | EEPROM_ERROR_I2C_IDLE_TIMEOUT, |
||
23 | EEPROM_ERROR_I2C_TRANSFER_TIMEOUT, |
||
24 | EEPROM_ERROR_OUT_OF_ADDRESS_RANGE, |
||
25 | EEPROM_DATA_TRANSFER_INCOMPLETE, |
||
26 | EEPROM_I2C_BUFFER_OVERRUN, |
||
256 | killagreg | 27 | EEPROM_NO_ACK, |
248 | killagreg | 28 | EEPROM_ERROR_UNKNOWN |
29 | } EEPROM_Result_t; |
||
30 | |||
527 | holgerb | 31 | extern u8 EEPROM_Init(void); |
32 | extern EEPROM_Result_t EEPROM_WriteBlock(u16 Address, u8 *pData, u16 DataLen); |
||
33 | extern EEPROM_Result_t EEPROM_ReadBlock(u16 Address, u8 *pData, u16 DataLen); |
||
34 | extern void WriteLicenseToEEPROM(u8 kampatibel); |
||
35 | extern u8 ReadLicenseFromEEPROM(void); |
||
36 | extern void DeleteLicenseInEEPROM(void); |
||
37 | extern void ClearLicenseText(void); |
||
760 | holgerb | 38 | extern u8 ReadOemNameFromEEPROM(void); |
39 | extern void WriteOemNameToEEPROM(void); |
||
780 | holgerb | 40 | extern void WriteBaroCalibrationToEEprom(void); |
41 | extern void ReadBaroCalibrationfromEEprom(void); |
||
248 | killagreg | 42 | |
43 | #endif // EEPROM_H |
||
44 |