Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 f9daq 1
#ifndef VMUSBSTACK_H
2
#define VMUSBSTACK_H
3
#define CMD_WRITE 0x000
4
#define CMD_READ  0x100
5
#define CMD_A24   0x039
6
#define CMD_A32   0x009
7
#define CMD_HM    0x80000
8
#define CMD_HD    0x20000
9
#define CMD_MRK   0x2000
10
#define CMD_DLY   0x8000
11
#define CMD_BLT   0xFF000000
12
 
13
#define CMD_D16   1
14
#define CMD_D32   0
15
 
16
#include <vector>
17
class VmUsbStack {
18
 public:
19
        VmUsbStack();
20
        ~VmUsbStack();
21
        std::vector<int> fStack;
22
        void Append(int cmd, int marker);
23
        void Append(int cmd, int addr, int data);
24
 
25
        void Marker(int marker);
26
        void WriteA32D16(int addr, int data);
27
        void ReadA32D16(int addr );
28
        void WriteA32D32(int addr, int data);
29
        void ReadA32D32(int addr );
30
 
31
        void WriteA24D16(int addr, int data);
32
        void ReadA24D16(int addr );
33
        void WriteA24D32(int addr, int data);
34
        void ReadA24D32(int addr );
35
 
36
        void ConditionalRead(int am ,int d16d32,int addr, int data);
37
        void RepeatRead(int addr_modifier,int d16d32, int baseaddr, int n, int increment);
38
  void RepeatWrite(int addr_modifier,int d16d32, int baseaddr, int n, int increment, int data);
39
 
40
        int Get(int maxn, int *stack);
41
  void Print();
42
};
43
 
44
 
45
#endif