Subversion Repositories f9daq

Rev

Rev 5 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef _WIENVME_DLL_H
#define _WIENVME_DLL_H

#include "libxxusb.h"

extern usb_dev_handle *udev;



int VME_start (char*);
int VME_close (int);
int VME_stop (void);
int VME_reset (void);


int VME_read16 (Uint32_t, void*);
int VME_read32 (Uint32_t, void*);

int VME_write16 ( Uint32_t, void*);
int VME_write32 ( Uint32_t, void*);

#define VME_START(NODE) VME_start((NODE))
#define VME_STOP() VME_stop()
#define VME_RESET() VME_reset()

#define VME_A24D16_R(VME,DATA) VME_read16( (VME), (DATA))
#define VME_A24D32_R(VME,DATA) VME_read32( (VME), (DATA))

#define VME_A24D16_W(VME,DATA) VME_write16( (VME), (DATA))
#define VME_A24D32_W(VME,DATA) VME_write32( (VME), (DATA))

#define VME_A32D16_R(VME,DATA) VME_read16( (VME), (DATA))
#define VME_A32D32_R(VME,DATA) VME_read32( (VME), (DATA))

#define VME_A32D16_W(VME,DATA) VME_write16( (VME), (DATA))
#define VME_A32D32_W(VME,DATA) VME_write32( (VME), (DATA))

typedef unsigned short ADDRESS_MODIFIER;

#define Std_Sup_Data        (ADDRESS_MODIFIER)0x3d
#define Std_Sup_Prog        (ADDRESS_MODIFIER)0x3e
#define Std_NoPriv_Data     (ADDRESS_MODIFIER)0x39
#define Std_NoPriv_Prog     (ADDRESS_MODIFIER)0x3a

#define Short_Sup           (ADDRESS_MODIFIER)0x2d
#define Short_NoPriv        (ADDRESS_MODIFIER)0x29

#define Ext_Sup_Data        (ADDRESS_MODIFIER)0x0d
#define Ext_Sup_Prog        (ADDRESS_MODIFIER)0x0e
#define Ext_NoPriv_Data     (ADDRESS_MODIFIER)0x09
#define Ext_NoPriv_Prog     (ADDRESS_MODIFIER)0x0a

#endif