#ifndef DS2433_INC
#define DS2433_INC

#include	<msc_config.h>

extern char   DURASN[32];         // DuraFET Sensor Serial Number
extern float  K0;                 // Iso-Potential EMF which is the zero Kelvin Standard Potential (y intercept of K2 at zero Kelvin)
extern float  K1;                 // Nerst Factor
extern float  K2;                 // Standard Potenial TempCo of Sensor (non-pH dependent temperature coef of sensor)
extern float  PTS;                // Percent Theoretical Slope
extern float  IsopH;              // Iso-Potential pH which is the pH value where the EMF of the electrode pair is temperature invariant and occurs when Vrs and K0 are equal


// Address Values of DuraFET III Calibration Values
#define K0_PTR              0x0021      // Iso Potential pH Voltage  - float
#define K0_REPEAT_PTR       0x0041      // Iso Potential pH Voltage  - float
#define ISOPH_PTR           0x0025      // Iso Potential pH Value    - float
#define ISOPH_REPEAT_PTR    0x002D      // Iso Potential pH Value    - float
#define ISOPH_VALTWO_PTR    0x0045      // A second Iso Potential pH Value    - float
#define PTS_PTR             0x0029      // Percent Theoretical Slope - float
#define PTS_REPEAT_PTR      0x0031      // Percent Theoretical Slope - float
#define SERIAL_NUM_PTR      0x0081      // Serial Number of Sensor   - string
#define SERIAL_NUM_BYTES    16          // 16 CHAR ASCII String

// DS2433 high level function prototypes
int  DS2433_GetVal(ushort ADDR, uchar DATBYTES, void *vp1);
int  DS2433_GetStr(ushort ADDR, ushort DATBYTES, uchar *DATA);
int  LoadDuraFetIIICalVals(void);
int  DumpDuraFetIIIEEPROM(void);
int  PeekDuraFetIIIEEPROM(void);

#endif
