#ifndef easiroc_H
#define easiroc_H
#include<stdio.h>
#include<stdlib.h>
#include<errno.h>
#include <Winsock2.h>
#define sizeByte_SC 15
#define sizeByte_PSC 5
#define sizeByte_RSC 1
#define sizeByte_PIN 2
#define WRITEDATA_DELAY 40
#define EASIROC_MAX_READ_N_WORDS 100
//------------------------------------------------------------------------------------------------------
int easiroc_Init(const char* SiTCP_MASTER_IP, unsigned int daq_mode) ;
void easiroc_Close();
int WriteData(SOCKET sock, unsigned int data);
int easiroc_LoadIni(const char *iniFile);
void PrepareFPGA();
int DebugFPGA(SOCKET socket);
void PrepareSC(int chipNo);
int TransmitSC(SOCKET socket);
void PrepareReadSC(int chipNo);
int TransmitReadSC(SOCKET socket);
int PreparePSC(int CurrentCh, int CurrentProbeType);
void easiroc_PrintData();
int ADCOneCycle_wHeader_ver2(SOCKET socket, FILE* file, int stopping);
void ADCStop(SOCKET socket);
int ContinuousADC_ver2(SOCKET socket, char *file_name, int MaxCycleNum);
int easiroc_singleADCstart();
int easiroc_singleADCevent(unsigned int *retData);
int easiroc_singleADCstop();
int easiroc_fTransmitSC();
int easiroc_fTransmitReadSC();
int easiroc_fAsicInitialize();
int easiroc_fTransmitProbe(int CurrentCh, int CurrentProbe);
int easiroc_fDAQ(char *file_name, int MaxCycleNum);
#endif