Subversion Repositories f9daq

Rev

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

#ifndef VMUSBSTACK_H
#define VMUSBSTACK_H
#define CMD_WRITE 0x000
#define CMD_READ  0x100
#define CMD_A24   0x039
#define CMD_A32   0x009
#define CMD_HM    0x80000
#define CMD_HD    0x20000
#define CMD_MRK   0x2000
#define CMD_DLY   0x8000
#define CMD_BLT   0xFF000000

#define CMD_D16   1
#define CMD_D32   0

#include <vector>
class VmUsbStack {
 public:
        VmUsbStack();
        ~VmUsbStack();
        std::vector<int> fStack;
        void Append(int cmd, int marker);
        void Append(int cmd, int addr, int data);

        void Marker(int marker);
        void WriteA32D16(int addr, int data);
        void ReadA32D16(int addr );
        void WriteA32D32(int addr, int data);
        void ReadA32D32(int addr );

        void WriteA24D16(int addr, int data);
        void ReadA24D16(int addr );
        void WriteA24D32(int addr, int data);
        void ReadA24D32(int addr );

        void ConditionalRead(int am ,int d16d32,int addr, int data);
        void RepeatRead(int addr_modifier,int d16d32, int baseaddr, int n, int increment);
  void RepeatWrite(int addr_modifier,int d16d32, int baseaddr, int n, int increment, int data);

        int Get(int maxn, int *stack);
  void Print();
};


#endif