Rev 291 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 291 | f9daq | 1 | #ifndef easiroc_H |
| 2 | #define easiroc_H |
||
| 3 | |||
| 4 | #include<stdio.h> |
||
| 5 | #include<stdlib.h> |
||
| 6 | #include<errno.h> |
||
| 7 | #include <Winsock2.h> |
||
| 8 | |||
| 9 | #define sizeByte_SC 15 |
||
| 10 | #define sizeByte_PSC 5 |
||
| 11 | #define sizeByte_RSC 1 |
||
| 12 | #define sizeByte_PIN 2 |
||
| 13 | |||
| 14 | #define WRITEDATA_DELAY 40 |
||
| 15 | |||
| 299 | f9daq | 16 | #define EASIROC_MAX_READ_N_WORDS 100 |
| 291 | f9daq | 17 | |
| 299 | f9daq | 18 | |
| 291 | f9daq | 19 | //------------------------------------------------------------------------------------------------------ |
| 20 | |||
| 21 | int easiroc_Init(const char* SiTCP_MASTER_IP, unsigned int daq_mode) ; |
||
| 22 | void easiroc_Close(); |
||
| 23 | |||
| 24 | int WriteData(SOCKET sock, unsigned int data); |
||
| 25 | |||
| 299 | f9daq | 26 | int easiroc_LoadIni(const char *iniFile); |
| 27 | |||
| 291 | f9daq | 28 | void PrepareFPGA(); |
| 29 | int DebugFPGA(SOCKET socket); |
||
| 30 | |||
| 31 | void PrepareSC(int chipNo); |
||
| 32 | int TransmitSC(SOCKET socket); |
||
| 33 | |||
| 34 | void PrepareReadSC(int chipNo); |
||
| 35 | int TransmitReadSC(SOCKET socket); |
||
| 36 | |||
| 37 | int PreparePSC(int CurrentCh, int CurrentProbeType); |
||
| 299 | f9daq | 38 | |
| 39 | void easiroc_PrintData(); |
||
| 291 | f9daq | 40 | |
| 299 | f9daq | 41 | int ADCOneCycle_wHeader_ver2(SOCKET socket, FILE* file, int stopping); |
| 291 | f9daq | 42 | void ADCStop(SOCKET socket); |
| 43 | int ContinuousADC_ver2(SOCKET socket, char *file_name, int MaxCycleNum); |
||
| 44 | |||
| 299 | f9daq | 45 | int easiroc_singleADCstart(); |
| 46 | int easiroc_singleADCevent(unsigned int *retData); |
||
| 47 | int easiroc_singleADCstop(); |
||
| 48 | |||
| 291 | f9daq | 49 | int easiroc_fTransmitSC(); |
| 50 | int easiroc_fTransmitReadSC(); |
||
| 51 | int easiroc_fAsicInitialize(); |
||
| 52 | int easiroc_fTransmitProbe(int CurrentCh, int CurrentProbe); |
||
| 53 | int easiroc_fDAQ(char *file_name, int MaxCycleNum); |
||
| 54 | #endif |