#include using namespace std; #include #include #include #include #define VS4_BASE_ADDR 0x8000 // VME A16 address handles for GEF library GEF_VME_MASTER_HDL a16_hdl; GEF_MAP_HDL a16map_hdl; GEF_VME_ADDR addr_A16; void *a16p; typedef struct { unsigned char data; unsigned char _unused1; unsigned char done; unsigned char _unused2; unsigned char control; unsigned char _unused3; unsigned char status; unsigned char _unused4; unsigned char interrupt; unsigned char _unused5; }vs4_register_t; volatile vs4_register_t *vs4_register; enum done_register_t{ XAXIS, YAXIS, ZAXIS, TAXIS }; //---------------------- // main //---------------------- int main(int narg, char *argv[]) { GEF_VME_BUS_HDL hdl; GEF_STATUS status; GEF_UINT16 id = 0, sdata = 0; GEF_VERSION drv_version, lib_version; // Open the driver cout<<"Opening VME driver ... "; status = gefVmeOpen(&hdl); if (status != GEF_STATUS_SUCCESS) { cout<<"gefVmeOpen failed: 0x"<