• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

beamtime/cern-oct11/mbs/v550lib.h (r4864/r1935)

Go to the documentation of this file.
00001 #ifndef V550LIB_H
00002 #define V550LIB_H
00003 
00004 
00005 /* reworked for CBM - DE - 29.09.10 */
00006 /* V550 Address map - AA - 19.07.00 */
00007 
00008 #define V550__SEG_NAME    "v550"
00009 //#define V550__VME_BASE    0xe8000000   // DE - rio2 - 2010 setup
00010 //#define V550__VME_LENGTH  0x00010000
00011 #define V550__NCHAN       0x28    //no. of readout channels (x32,1280=28)
00012 
00013 #define V550__STATREG     0x0002 /* R/W */
00014 #define V550__NRCHAN      0x0004 /* R/W */
00015 #define V550__CLEAR       0x0006 /* R/W */
00016 #define V550__FIFO0       0x0008 /* R   */
00017 #define V550__FIFO1       0x000C /* R   */
00018 #define V550__WCOUNT0     0x0010 /* R   */
00019 #define V550__WCOUNT1     0x0012 /* R   */
00020 #define V550__TEST0       0x0014 /* W   */
00021 #define V550__TEST1       0x0016 /* W   */
00022 
00023 #define V550__PED0        0x2000 /* R/W (up to 3FFC) */
00024 #define V550__PED1        0x4000 /* R/W (up to 5FFC) */
00025 
00026 #define V550__CODE        0x00FA /* R */
00027 #define V550__TYPE        0x00FC /* R */
00028 #define V550__SERIE       0x00FE /* R */
00029 
00030 typedef struct
00031 {
00032   short volatile *pw_statreg;
00033   short volatile *pw_nrchan;
00034   short volatile *pw_clear;
00035   short volatile *pw_wcount0;
00036   short volatile *pw_wcount1;
00037   short volatile *pw_test0;
00038   short volatile *pw_test1;
00039 
00040   long volatile  *pl_fifo0;
00041   long volatile  *pl_fifo1;
00042   long volatile  *pl_ped0;
00043   long volatile  *pl_ped1;
00044 
00045   short volatile *pw_code;
00046   short volatile *pw_type;
00047   short volatile *pw_serie;
00048 } s_v550;
00049 
00050 int f_get_v550_ptr (long ph_v550_seg, s_v550 *ps_v550);
00051 
00052 void v550_init(s_v550 *ps_v550);
00053 
00054 void v550_clear(s_v550 *ps_v550);
00055 
00056 int v550_check_ready(s_v550 *ps_v550, int fifo);
00057 
00058 int V550_DataAreInBuffer (s_v550 *ps_v550, int adc);
00059 
00060 long v550_read_red(long *pl_dat, s_v550 *ps_v550);
00061 
00062 #endif

Generated on Tue Dec 10 2013 04:52:18 for ROCsoft by  doxygen 1.7.1