00001 // 00002 // gefvme.h 00003 // 00004 // Driver for the V7865 tsi148 VME interface 00005 // 00006 00007 // Include standard VME functions 00008 00009 #include "mvmestd.h" 00010 00011 // Define gefvme-specific functions 00012 00013 /// return pointer to memory-mapped VME A16 address space 00014 char* gefvme_get_a16(MVME_INTERFACE* mvme); 00015 00016 /// return pointer to memory-mapped VME A24 address space 00017 char* gefvme_get_a24(MVME_INTERFACE* mvme); 00018 00019 /// return pointer to memory-mapped VME A32 address space. Unlike A16 and A24, all of A32 cannot be all memory-mapped at once, so one has to map it one piece at a time. There is a limited number of available mappings 00020 char* gefvme_get_a32(MVME_INTERFACE* mvme, mvme_addr_t vmeaddr, int size); 00021 00022 /// set gefvme DMA debug level: 0=off, >0=write more and more stuff into the system log 00023 void gefvme_set_dma_debug(int debug); 00024 00025 /// select which one of the 2 tsi148 dma channels to use 00026 void gefvme_set_dma_channel(int channel); 00027 00028 /// run a single dma read operation. (note: data read through the tsi148 will have the wrong endianness and has to be byte-swapped by the user) 00029 int gefvme_read_dma(MVME_INTERFACE *mvme, void *dst, mvme_addr_t vme_addr, int nbytes); 00030 00031 /// run a chained dma read operation: each dma segment has it's own vme source address, length and memory destination address. (note: data read through the tsi148 will have the wrong endianness and has to be byte-swapped by the user) 00032 int gefvme_read_dma_multiple(MVME_INTERFACE* mvme, int nseg, void* dstaddr[], const mvme_addr_t vmeaddr[], int nbytes[]); 00033 00034 // end