summaryrefslogtreecommitdiff
path: root/host/opcd_usb.h
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-12 17:37:00 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-12 17:37:00 +0000
commit8bd3d51b23e328e91c209dbebe8cfe002b0b0042 (patch)
tree5145facfb2f864519fd9e4914929f5da6d8be1fa /host/opcd_usb.h
parent5fdccde69e5288b147c7c3ed81c412c18c5d5d54 (diff)
move to new directory
git-svn-id: https://svn.openpcd.org:2342/trunk@193 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'host/opcd_usb.h')
-rw-r--r--host/opcd_usb.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/host/opcd_usb.h b/host/opcd_usb.h
new file mode 100644
index 0000000..e9698f0
--- /dev/null
+++ b/host/opcd_usb.h
@@ -0,0 +1,24 @@
+#ifndef _OPCD_USB_H
+#define _OPCD_USB_H
+
+#include "ausb/ausb.h"
+
+#define OPCD_INTBUF_SIZE 64
+struct opcd_handle {
+ struct ausb_dev_handle *hdl;
+ struct usbdevfs_urb int_urb;
+ u_int8_t int_buf[OPCD_INTBUF_SIZE];
+};
+
+extern const char *opcd_hexdump(const void *data, unsigned int len);
+
+extern struct opcd_handle *opcd_init(void);
+extern void opcd_fini(struct opcd_handle *od);
+
+extern int opcd_recv_reply(struct opcd_handle *od, char *buf, int len);
+extern int opcd_send_command(struct opcd_handle *od, u_int8_t cmd,
+ u_int8_t reg, u_int8_t val, u_int16_t len,
+ const unsigned char *data);
+extern int opcd_usbperf(struct opcd_handle *od, unsigned int frames);
+
+#endif
personal git repositories of Harald Welte. Your mileage may vary