#ifndef __ZKFPI_H__
#define __ZKFPI_H__

#include <errno.h>
#define ETRANSFER_TIMEDOUT	116		//´«Êä³¬Ê±

//#pragma pack(push)
//#pragma pack(1)
//typedef struct _RSHeader_{
//	char Startcode;
//	char Command;
//	int Param;
//	int Size;
//	char Flag;
//	char CheckSum;
//	char Endcode;
//}TRSHeader, *PRSHeader;
//#pragma pack(pop)

#define START_CODE 0x70
#define END_CODE 0x0A

#ifdef __cplusplus
extern "C"
{
#endif
	int ZKFPI_Init(unsigned short VID, unsigned short PID);
	int ZKFPI_Open(int index, void **sensor);
	int ZKFPI_Send(void *sensor, char *buffer, int len);
	int ZKFPI_Read(void *sensor, char *buffer, int len, int timeout);
	int ZKFPI_Write(void *sensor, char *buffer, int len, int timeout);
	int ZKFPI_Close(void *sensor);

#ifdef __cplusplus
}
#endif


#endif