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 "../include/CAENVMELib/CAENVMElib.h"
00022 #include "../include/CAENVMELib/CAENVMEoslib.h"
00023 #include "../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_pos;
00056 
00058 
00065 
00066 typedef struct
00067 {
00068         UINT16  m_base_address;                                         
00069         long    m_vme_handle;                                           
00070         const cvt_reg_table* m_p_reg_table;                     
00071         BOOL (*set_MCST_CBLT)( void* /*p_data*/, UINT8 /*address*/, MCST_CBLT_board_pos /*MCST_CBLT position*/ );               
00072 } cvt_board_data;
00073 
00074 #define CVT_BOARD_EVENT_COUNT_MSK                       0x003fffff      
00076 
00077 // Global variables declaration
00078 
00079 
00081 // Global methods declaration
00083 
00085 //
00086 //     B O A R D S   H A N D L I N G
00087 //
00089 
00091 
00102 
00103 BOOL cvt_board_open( cvt_board_data* p_data, UINT16 base_address, long vme_handle, const cvt_reg_table* p_reg_table);
00104 
00106 
00114 
00115 BOOL cvt_board_close( cvt_board_data* p_data);
00116 
00118 //
00119 //     L E V E L   0   A P I s
00120 //
00122 
00124 
00135 
00136 BOOL cvt_write( cvt_board_data* p_data, UINT16 address, const void* p_value, CVAddressModifier am, CVDataWidth data_size);
00137 
00139 
00150 
00151 BOOL cvt_read( cvt_board_data* p_data, UINT16 address, void* p_value, CVAddressModifier am, CVDataWidth data_size);
00152 
00154 
00165 
00166 BOOL cvt_set_bitmask( cvt_board_data* p_data, UINT16 address, void *p_value, CVAddressModifier am, CVDataWidth data_size);
00167 
00169 
00180 
00181 BOOL cvt_clear_bitmask( cvt_board_data* p_data, UINT16 address, void *p_value, CVAddressModifier am, CVDataWidth data_size);
00182 
00184 
00197 
00198 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);
00199 
00201 
00211 
00212 BOOL cvt_write_reg( cvt_board_data* p_data, UINT16 reg_index, const void* p_value);
00213 
00215 
00225 
00226 BOOL cvt_read_reg( cvt_board_data* p_data, UINT16 reg_index, void* p_value);
00227 
00229 
00239 
00240 BOOL cvt_set_bitmask_reg( cvt_board_data* p_data, UINT16 reg_index, void *p_value);
00241 
00243 
00253 
00254 BOOL cvt_clear_bitmask_reg( cvt_board_data* p_data, UINT16 reg_index, void *p_value);
00255 
00257 
00269 
00270 BOOL cvt_FIFO_BLT_read_reg( cvt_board_data* p_data, UINT16 reg_index, void* p_buffer, UINT32 buffer_size, UINT32 *p_read_bytes);
00271 
00273 //
00274 //     G L O B A L   A P I s
00275 //
00277 
00279 
00288 
00289 BOOL cvt_set_MCST_CBLT( UINT8 address, cvt_board_data** board_array, UINT16 board_array_len);
00290 
00292 //
00293 //     M I S C E L L A N E O U S   A P I s
00294 //
00296 
00298 
00303 
00304 const char* cvt_SW_rev( void);
00305 
00306 #endif                  // __CVT_BOARD_COMMONS_H

Generated on Wed Oct 18 12:36:55 2006 for CAEVMEToolLib by  doxygen 1.4.6-NO