summaryrefslogtreecommitdiff
path: root/firmware/include/simtrace_usb.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-07-30 19:04:55 +0200
committerHarald Welte <laforge@gnumonks.org>2011-07-30 19:04:55 +0200
commita3de0a4ac29118c3ada946a0c8f7f602c9066ec1 (patch)
tree8408d463a3ea6910d7336e24d60611da8a50b77d /firmware/include/simtrace_usb.h
parentdd88fde8d2b78243c01871cabca37c9e46ebd03d (diff)
parentffbce3ea2cda51214be0bb7a107954f890f99b0d (diff)
Merge branch 'simtrace'
Diffstat (limited to 'firmware/include/simtrace_usb.h')
-rw-r--r--firmware/include/simtrace_usb.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/firmware/include/simtrace_usb.h b/firmware/include/simtrace_usb.h
new file mode 100644
index 0000000..c020093
--- /dev/null
+++ b/firmware/include/simtrace_usb.h
@@ -0,0 +1,24 @@
+#ifndef SIMTRACE_USB_H
+#define SIMTRACE_USB_H
+
+//#include <stdint.h>
+
+/* this is kept compatible with OpenPCD protocol */
+struct simtrace_hdr {
+ u_int8_t cmd;
+ u_int8_t flags;
+ u_int8_t res[2];
+ u_int8_t data[0];
+} __attribute__ ((packed));
+
+enum simtrace_usb_msgt {
+ SIMTRACE_MSGT_NULL,
+ SIMTRACE_MSGT_DATA,
+ SIMTRACE_MSGT_RESET, /* reset was asserted, no more data */
+};
+
+/* flags for MSGT_DATA */
+#define SIMTRACE_FLAG_ATR 0x01 /* ATR immediately after reset */
+#define SIMTRACE_FLAG_WTIME_EXP 0x04 /* work waiting time expired */
+
+#endif /* SIMTRACE_USB_H */
personal git repositories of Harald Welte. Your mileage may vary