Project

General

Profile

Download (851 Bytes) Statistics
| Branch: | Tag: | Revision:
1
#ifndef SIMTRACE_USB_H
2
#define SIMTRACE_USB_H
3

    
4
//#include <stdint.h>
5

    
6
/* this is kept compatible with OpenPCD protocol */
7
struct simtrace_hdr {
8
	uint8_t cmd;
9
	uint8_t flags;
10
	uint8_t res[2];
11
	uint8_t data[0];
12
} __attribute__ ((packed));
13

    
14
enum simtrace_usb_msgt {
15
	SIMTRACE_MSGT_NULL,
16
	SIMTRACE_MSGT_DATA,
17
	SIMTRACE_MSGT_RESET,		/* reset was asserted, no more data */
18
	SIMTRACE_MSGT_STATS,		/* statistics */
19
};
20

    
21
/* flags for MSGT_DATA */
22
#define SIMTRACE_FLAG_ATR		0x01	/* ATR immediately after reset */
23
#define SIMTRACE_FLAG_WTIME_EXP		0x04	/* work waiting time expired */
24
#define SIMTRACE_FLAG_PPS_FIDI		0x08	/* Fi/Di values in res[2] */
25

    
26
struct simtrace_stats {
27
	uint32_t no_rctx;
28
	uint32_t rctx_sent;
29
	uint32_t rst;
30
	uint32_t pps;
31
	uint32_t bytes;
32
	uint32_t parity_err;
33
	uint32_t frame_err;
34
	uint32_t overrun;
35
} stats;
36

    
37
#endif /* SIMTRACE_USB_H */
(8-8/11)
Add picture from clipboard (Maximum size: 48.8 MB)