STM32 EEPROM Testing

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers cal.h Source File

cal.h

00001 #ifndef CAL_H
00002 #define CAL_H
00003 
00004 
00005 typedef struct {
00006     float uv_zero_mV;  // uv adc mV reading at 0 ppb
00007     float uv_cal_mV;   // uv adc mV reading at calibration point
00008     float uv_cal_ppb;  // uv user ppb value at calibration point
00009 
00010     float vis_zero_mV;
00011     float vis_cal_mV;
00012     float vis_cal_ppb;
00013 
00014     uint16_t trim_4mA;     // 12-bit dac value to use for 4 mA
00015     uint16_t trim_20mA;    // 12-bit dac value to use for 20 mA
00016     float    ppb_at_20mA;  // ppb value equal to 20 mA, zero is assumed at 4
00017     
00018     uint16_t padding;  // needed to create multiple of 2 bytes
00019     //double mAOffsetValue; //mA Offset Value for simulator project. 
00020     uint16_t checksum;
00021 
00022 } CALIBRATION_DATA; // compiler makes this a multiple of 2 bytes (half-word)
00023 
00024 extern CALIBRATION_DATA g_cal;
00025 
00026 void cal_init();
00027 void cal_save();
00028 void cal_print();
00029 void cal_factory();
00030 void cal_test();
00031 
00032 #endif