#ifndef ADC_H
#define ADC_H

// <<< Use Configuration Wizard in Context Menu >>>
// <h> Set ADCCONT 
// <o.3> ADCCKS <0=> 24MHz <1=> 12MHz
// <i> ADC conversion clock select
// <o.4> ADCDS <0=> ADCD2 MSB <1=> ADCD2 LSB
// <o.5..6> ADCSH <0=> 1 clock <1=> 2 clock <2=> 3 clock <3=> 4 clock
// <o.7> ADCPD <0=> Normal <1=> Power Down
// </h>
#define ADCCONT_REGS 0x10

// <h> Set ADCSTR
// <o.6..7> SHCKS <0=> 1MHz <1=> 500KHz <2=> 400KHz <3=> 333KHz
// </h>
#define ADCSTR_REGS 0x00
// <<< end of configuration section >>>

extern xdata	signed int OPA_Offset;
extern xdata	signed int OPA_OffsetTemp;
extern xdata	signed long OPA_Offset_C;
extern xdata	unsigned int OffsetCount;

extern void Adc_Init (void);
extern signed int Adc_Channel (unsigned char Channel);
extern void Correction_Current_AD_offset(void);

// extern	idata	signed int	ia_values;
// extern	idata	signed int	ib_values;
// extern	idata	signed int	ia_values1;
// extern	idata	signed int	ib_values1;
#endif