Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
62 | 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 | void VmUsbStackInit(); |
||
17 | void VmUsbStackClear(); |
||
18 | |||
19 | |||
20 | #define VmUsbStackReadA24D16( ADDR ) VmUsbStackAppend(CMD_READ | CMD_A24 , CMD_D16 | (ADDR) ) |
||
21 | #define VmUsbStackReadA24D32( ADDR ) VmUsbStackAppend(CMD_READ | CMD_A24 , CMD_D32 | (ADDR) ) |
||
22 | #define VmUsbStackReadA32D16( ADDR ) VmUsbStackAppend(CMD_READ | CMD_A32 , CMD_D16 | (ADDR) ) |
||
23 | #define VmUsbStackReadA32D32( ADDR ) VmUsbStackAppend(CMD_READ | CMD_A32 , CMD_D32 | (ADDR) ) |
||
24 | |||
25 | #define VmUsbStackWriteA24D16( ADDR, DATA) VmUsbStackAppendData(CMD_WRITE | CMD_A24,CMD_D16 | (ADDR), (DATA)) |
||
26 | #define VmUsbStackWriteA24D32( ADDR, DATA) VmUsbStackAppendData(CMD_WRITE | CMD_A24,CMD_D32 | (ADDR), (DATA)) |
||
27 | #define VmUsbStackWriteA32D16( ADDR, DATA) VmUsbStackAppendData(CMD_WRITE | CMD_A32,CMD_D16 | (ADDR), (DATA)) |
||
28 | #define VmUsbStackWriteA32D32( ADDR, DATA) VmUsbStackAppendData(CMD_WRITE | CMD_A32,CMD_D32 | (ADDR), (DATA)) |
||
29 | |||
30 | #define VmUsbStackMarker(MRK) VmUsbStackAppend(CMD_MRK, (MRK)) |
||
31 | |||
32 | void VmUsbStackAppend(int cmd, int marker); |
||
33 | void VmUsbStackAppendData(int cmd, int addr, int data); |
||
34 | |||
35 | void VmUsbStackConditionalRead(int am ,int d16d32,int addr, int data); |
||
36 | void VmUsbStackMultiRead(int addr_modifier,int d16d32, int baseaddr, int n, int increment); |
||
37 | void VmUsbStackMultiWrite(int addr_modifier,int d16d32, int baseaddr, int n, int increment, int data); |
||
38 | |||
39 | int VmUsbStackGet(int maxn, int *stack); |
||
40 | void VmUsbStackPrint(); |
||
41 | |||
42 | |||
43 | #endif |