aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/usb/usb_ch9.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/usb/usb_ch9.h')
-rw-r--r--src/drivers/usb/usb_ch9.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/drivers/usb/usb_ch9.h b/src/drivers/usb/usb_ch9.h
index a609bdb207..a4a3722ee8 100644
--- a/src/drivers/usb/usb_ch9.h
+++ b/src/drivers/usb/usb_ch9.h
@@ -81,6 +81,34 @@
#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */
+/*
+ * USB Packet IDs (PIDs)
+ */
+
+/* token */
+#define USB_PID_OUT 0xe1
+#define USB_PID_IN 0x69
+#define USB_PID_SOF 0xa5
+#define USB_PID_SETUP 0x2d
+/* handshake */
+#define USB_PID_ACK 0xd2
+#define USB_PID_NAK 0x5a
+#define USB_PID_STALL 0x1e
+#define USB_PID_NYET 0x96
+/* data */
+#define USB_PID_DATA0 0xc3
+#define USB_PID_DATA1 0x4b
+#define USB_PID_DATA2 0x87
+#define USB_PID_MDATA 0x0f
+/* Special */
+#define USB_PID_PREAMBLE 0x3c
+#define USB_PID_ERR 0x3c
+#define USB_PID_SPLIT 0x78
+#define USB_PID_PING 0xb4
+#define USB_PID_UNDEF_0 0xf0
+
+#define USB_PID_DATA_TOGGLE 0x88
+
struct usb_ctrlrequest {
u8 bRequestType;
u8 bRequest;