Functions | |
int EXPRT | mvme_open (MVME_INTERFACE **vme, int index) |
int EXPRT | mvme_close (MVME_INTERFACE *vme) |
int EXPRT | mvme_sysreset (MVME_INTERFACE *vme) |
int EXPRT | mvme_read (MVME_INTERFACE *vme, void *dst, mvme_addr_t vme_addr, mvme_size_t n_bytes) |
DWORD EXPRT | mvme_read_value (MVME_INTERFACE *vme, mvme_addr_t vme_addr) |
int EXPRT | mvme_write (MVME_INTERFACE *vme, mvme_addr_t vme_addr, void *src, mvme_size_t n_bytes) |
int EXPRT | mvme_write_value (MVME_INTERFACE *vme, mvme_addr_t vme_addr, DWORD value) |
int EXPRT | mvme_set_am (MVME_INTERFACE *vme, int am) |
int EXPRT | mvme_get_am (MVME_INTERFACE *vme, int *am) |
int EXPRT | mvme_set_dmode (MVME_INTERFACE *vme, int dmode) |
int EXPRT | mvme_get_dmode (MVME_INTERFACE *vme, int *dmode) |
int EXPRT | mvme_set_blt (MVME_INTERFACE *vme, int mode) |
int EXPRT | mvme_get_blt (MVME_INTERFACE *vme, int *mode) |
|
Close and release ALL the opened VME channel. See example in mvme_open()
|
|
Get Address Modifier.
|
|
Get current Data mode.
|
|
Get current Data mode.
|
|
|
|
|
|
|
|
|
|
|
|
VME open The code below summarize the use of most of the mvme calls included in this interface. #include "vmicvme.h" // or other VME interface driver. int main () { int i, status, vmeio_status, data; MVME_INTERFACE *myvme; // Open VME channel status = mvme_open(&myvme, 0); // Reset VME // Under VMIC reboot CPU!! // status = mvme_sysreset(myvme); // Setup AM status = mvme_set_am(myvme, MVME_AM_A24_ND); // Setup Data size status = mvme_set_dmode(myvme, MVME_DMODE_D32); // Read VMEIO status status = mvme_read(myvme, &vmeio_status, 0x78001C, 4); printf("VMEIO status : 0x%x\n", vmeio_status); // Write Single value mvme_write_value(myvme, 0x780010, 0x3); // Read Single Value printf("Value : 0x%x\n", mvme_read_value(myvme, 0x780018)); // Write to the VMEIO in latch mode for (i=0;i<10000;i++) { data = 0xF; status = mvme_write(myvme, 0x780010, &data, 4); data = 0x0; status = mvme_write(myvme, 0x780010, &data, 4); } // Close VME channel status = mvme_close(myvme); return 1; }
|
|
Read from VME bus. Implementation of the read can include automatic DMA transfer based on the size of the data. See example in mvme_open()
|
|
Read single data from VME bus. Useful for register access. See example in mvme_open()
|
|
Set Address Modifier.
|
|
Set Block Transfer mode.
|
|
Set Data mode.
|
|
VME bus reset. Effect of the VME bus reset is dependent of the type of VME interface used. See example in mvme_open()
|
|
Write data to VME bus. Implementation of the write can include automatic DMA transfer based on the size of the data. See example in mvme_open()
|
|
Write single data to VME bus. Useful for register access. See example in mvme_open()
|