Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/********************\
VMEModule.hh
update: 04/01/28
\********************/
#ifndef VMEMODULE_HH
#define VMEMODULE_HH
#include <stdio.h>
#include <sys/types.h>
#include "pcivme_ni.h"
#define VMEA24 (unsigned short)0x39
#define VMEA32 (unsigned short)0x09
#define VMEA16 (unsigned short)0x29
class VMEModule {
protected:
int m_fd;
int m_vmeptr;
caddr_t m_vmeaddr;
size_t m_size;
unsigned long m_baseaddress;
public:
VMEModule(int device, caddr_t vmeaddr, size_t size);
~VMEModule();
unsigned long getBaseAddress() { return (unsigned long) m_baseaddress; }
caddr_t getVmeAddress() { return m_vmeaddr; }
void write32(unsigned long address, unsigned long value);
unsigned long read32(unsigned long address);
void write16(unsigned long address, unsigned short value);
unsigned short read16(unsigned long address);
};
#endif