Subversion Repositories f9daq

Rev

Rev 291 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  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.  
  16. #define EASIROC_MAX_READ_N_WORDS 100
  17.  
  18.  
  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.  
  26. int easiroc_LoadIni(const char *iniFile);
  27.  
  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);
  38.                        
  39. void easiroc_PrintData();
  40.  
  41. int ADCOneCycle_wHeader_ver2(SOCKET socket, FILE* file, int stopping);
  42. void ADCStop(SOCKET socket);
  43. int ContinuousADC_ver2(SOCKET socket, char *file_name, int MaxCycleNum);
  44.  
  45. int easiroc_singleADCstart();
  46. int easiroc_singleADCevent(unsigned int *retData);
  47. int easiroc_singleADCstop();
  48.  
  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
  55.