cvt_board_commons.h

Go to the documentation of this file.
00001 
00002 
00011 
00012 #ifndef __CVT_BOARD_COMMONS_H
00013 #define __CVT_BOARD_COMMONS_H
00014 
00016 // File includes
00018 #include <stdio.h>
00019 
00020 #include "cvt_common_defs.h"
00021 #include "CAENVMELib/CAENVMElib.h"
00022 #include "CAENVMELib/CAENVMEoslib.h"
00023 #include "CAENVMELib/CAENVMEtypes.h"
00024 
00026 // Global defines
00028 
00030 
00037 
00038 typedef struct
00039 {
00040         UINT16  m_address;                      
00041         UINT16  m_am;                           
00042         UINT16  m_data_size;            
00043 } cvt_reg_table;
00044 
00046 
00049 
00050 typedef enum
00051 {
00052         MCST_CBLT_board_pos_first= 0,           
00053         MCST_CBLT_board_pos_mid,                        
00054         MCST_CBLT_board_pos_last,                       
00055         MCST_CBLT_board_disabled,                       
00056 } MCST_CBLT_board_pos;
00057 
00059 
00066 
00067 typedef struct
00068 {
00069         UINT16  m_base_address;                                         
00070         long    m_vme_handle;                                           
00071         const cvt_reg_table* m_p_reg_table;                     
00072         BOOL (*set_MCST_CBLT)( void* /*p_data*/, UINT8 /*address*/, MCST_CBLT_board_pos /*MCST_CBLT position*/ );               
00073 } cvt_board_data;
00074 
00075 #define CVT_BOARD_EVENT_COUNT_MSK                       0x003fffff      
00077 
00078 // Global variables declaration
00079 
00080 
00082 // Global methods declaration
00084 
00086 
00093 
00094 UINT8 cvt_ror_bits( UINT8 data, int num_bits);
00095 
00097 
00103 
00104 UINT8 cvt_swap_bits( UINT8 data);
00105 
00107 
00112 
00113 void cvt_delay(int msec);
00114 
00116 //
00117 //     B O A R D S   H A N D L I N G
00118 //
00120 
00122 
00133 
00134 BOOL cvt_board_open( cvt_board_data* p_data, UINT16 base_address, long vme_handle, const cvt_reg_table* p_reg_table);
00135 
00137 
00145 
00146 BOOL cvt_board_close( cvt_board_data* p_data);
00147 
00149 //
00150 //     L E V E L   0   A P I s
00151 //
00153 
00155 
00166 
00167 BOOL cvt_write( cvt_board_data* p_data, UINT16 address, const void* p_value, CVAddressModifier am, CVDataWidth data_size);
00168 
00170 
00181 
00182 BOOL cvt_read( cvt_board_data* p_data, UINT16 address, void* p_value, CVAddressModifier am, CVDataWidth data_size);
00183 
00185 
00196 
00197 BOOL cvt_set_bitmask( cvt_board_data* p_data, UINT16 address, void *p_value, CVAddressModifier am, CVDataWidth data_size);
00198 
00200 
00211 
00212 BOOL cvt_clear_bitmask( cvt_board_data* p_data, UINT16 address, void *p_value, CVAddressModifier am, CVDataWidth data_size);
00213 
00215 
00229 
00230 BOOL cvt_FIFO_BLT_read( cvt_board_data* p_data, UINT16 address, void* p_buffer, UINT32 buffer_size, UINT32 *p_read_bytes, CVAddressModifier am, CVDataWidth data_size, BOOL *p_is_berr);
00231 
00233 
00243 
00244 BOOL cvt_write_reg( cvt_board_data* p_data, UINT16 reg_index, const void* p_value);
00245 
00247 
00257 
00258 BOOL cvt_read_reg( cvt_board_data* p_data, UINT16 reg_index, void* p_value);
00259 
00261 
00271 
00272 BOOL cvt_set_bitmask_reg( cvt_board_data* p_data, UINT16 reg_index, void *p_value);
00273 
00275 
00285 
00286 BOOL cvt_clear_bitmask_reg( cvt_board_data* p_data, UINT16 reg_index, void *p_value);
00287 
00289 
00302 
00303 BOOL cvt_FIFO_BLT_read_reg( cvt_board_data* p_data, UINT16 reg_index, void* p_buffer, UINT32 buffer_size, UINT32 *p_read_bytes, BOOL *p_is_berr);
00304 
00306 //
00307 //     G L O B A L   A P I s
00308 //
00310 
00312 
00321 
00322 BOOL cvt_set_MCST_CBLT( UINT8 address, cvt_board_data** board_array, UINT16 board_array_len);
00323 
00325 //
00326 //     M I S C E L L A N E O U S   A P I s
00327 //
00329 
00331 
00336 
00337 const char* cvt_SW_rev( void);
00338 
00339 #endif                  // __CVT_BOARD_COMMONS_H

Generated on Mon Mar 19 17:13:05 2007 for CAEVMEToolLib by  doxygen 1.4.6-NO