36 lines
640 B
C
36 lines
640 B
C
#ifndef _CALIB_CALLOUT_H
|
|
#define _CALIB_CALLOUT_H
|
|
#include "Std_Types.h"
|
|
#include "smartee.h"
|
|
#include "forcedetect.h"
|
|
|
|
#define CALIBRATION_BASE_ADDRESS 0x700
|
|
#define CALIBRATION_SPACE_SIZE 128
|
|
|
|
int8_t Calib_Write(uint16_t addr, uint8_t *data, uint8_t len)
|
|
{
|
|
int8_t ret = 0;
|
|
|
|
ret = SmartEE_Write(addr+CALIBRATION_BASE_ADDRESS, data, len);
|
|
|
|
return ret;
|
|
}
|
|
|
|
int8_t Calib_Read(uint16_t addr, uint8_t *data, uint8_t len)
|
|
{
|
|
int8_t ret = 0;
|
|
|
|
ret = SmartEE_Read(addr+CALIBRATION_BASE_ADDRESS, data, len);
|
|
|
|
return ret;
|
|
}
|
|
|
|
|
|
uint16_t Calib_GetData4Save(void)
|
|
{
|
|
return Get_forcedetect_force_value();
|
|
}
|
|
|
|
|
|
#endif
|