#ifndef _SMAPLE_PROCESS_H
#define _SMAPLE_PROCESS_H


#define CMD_NORMAL_READ  1
#define CMD_READ_SAMPLE  2
#define CMD_CLR_DATA     3
#define CMD_START_SAMPLE 4
#define CMD_STOP_SAMPLE  5
#define CMD_READ_CO2     6
#define CMD_CLR_CO2      7
#define CMD_SYS_RESET    8

#define SUCCESSFULL 0x5A  
#define FAILURE 0xA5  

#define SEGMENT_LENGTH  500

typedef struct
{
unsigned short len;
unsigned short intval;
unsigned short offs;
unsigned short co2_pos;
unsigned short co2_len;	
}SAMPLE_PARA_TYPE;

extern unsigned int clear_sample_data(void);
extern int start_sample_data(unsigned int ch,SAMPLE_PARA_TYPE *sample_para);
extern int start_sample_heat(unsigned char ch,unsigned char flg);
extern unsigned int read_sample_data(unsigned int total_len);
extern int save_sample_data(unsigned int len);
extern unsigned int query_sample_data(unsigned char *ret_data,int len);
extern unsigned int clear_co2_data(void);
extern unsigned int read_co2_data(unsigned int total_len);
extern int save_co2_data(unsigned int len);


#endif



