summaryrefslogtreecommitdiffstats
path: root/usb/bdt.h
diff options
context:
space:
mode:
Diffstat (limited to 'usb/bdt.h')
-rw-r--r--usb/bdt.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/usb/bdt.h b/usb/bdt.h
new file mode 100644
index 0000000..5f0a123
--- /dev/null
+++ b/usb/bdt.h
@@ -0,0 +1,14 @@
+#ifndef USB_BDT_H
+#define USB_BDT_H
+
+#include <reg/usbotg.h>
+
+extern struct usb0_bd usb_bdt[4 * 16];
+
+#define BDT_ENDPT(n, tx, odd) (usb_bdt[(n) << 2 | (tx & 1) << 1 | (odd & 1)])
+#define BDT_RX 0
+#define BDT_TX 1
+#define BDT_EVEN 0
+#define BDT_ODD 1
+
+#endif /* USB_BDT_H */