
SC5305A Operating & Programming Manual
Rev 2.1.0
41
Function:
sc5305a_GetRawCalData
Definition:
int sc5305a_GetRawCalData(unsigned int *deviceHandle,
unsigned char *rawCalDataArray)
Return:
The status of the function
Input:
unsigned int *deviceHandle
(handle to the opened device)
Output:
unsigned char *rawCalDataArray
(the entire calibration EEPROM contents)
Description:
sc5305a_GetRawCalData
reads the entire calibration EEPROM into rawCalDataArray.
The array must be allocated for at least 15168 bytes.
Example:
See code block example below for using
sc5305a_ConvertRawCalData
.
Function:
sc5305a_GetCalData
Definition:
int sc5305a_GetCalData(unsigned int *deviceHandle,
deviceAttribute_t *deviceAttributes, calibrationData_t *calData)
Return:
The status of the function
Input:
unsigned int *deviceHandle
(handle to the opened device)
Output:
deviceAttribute_t *deviceAttributes
(device attributes)
calibrationData_t *calData
(structured calibration data)
Description:
sc5305a_GetCalData
returns the device attributes such as serial number, calibration
date, and also structured calibration data used for gain calculation and correction.
Example:
See code block example under
sc5305a_ConvertRawCalData
.
Function:
sc5305a_ConvertRawCalData
Definition:
int sc5305a_ConvertRawCalData(unsigned char *rawCalData,
deviceAttribute_t *deviceAttributes, calibrationData_t *calData)
Input:
unsigned char *rawCalData
(entire cal EEPROM data in raw byte format)
Output
:
calibrationData_t *calibrationData
(current calibration data)
deviceAttribute_t *deviceAttributes
(device attributes)
Description
:
sc5305a_ConvertRawCalData
organizes/decodes the entire 15168 bytes of raw
calibration data read from the EEPROM and returns two data formats -
deviceAttribute_t and calibrationData_t. The array rawCalData must contain valid
calibration data, obtained by reading the EEPROM, and rawCalData, calData and
deviceAttributes must have memory allocated.