aboutsummaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-12-29 12:52:15 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-12-29 12:52:15 +0000
commite136368c1f2ee43476e597014900392023f3737d (patch)
tree39a24c0f788e5439a598b20bce102bcf471d44f2 /nuttx/include
parent67c0262d13cb87fa0898cf6d8aacc09c2c8b21db (diff)
downloadpx4-firmware-e136368c1f2ee43476e597014900392023f3737d.tar.gz
px4-firmware-e136368c1f2ee43476e597014900392023f3737d.tar.bz2
px4-firmware-e136368c1f2ee43476e597014900392023f3737d.zip
Correct last set of changes to configuration logic
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4237 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/usb/usb.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/nuttx/include/nuttx/usb/usb.h b/nuttx/include/nuttx/usb/usb.h
index c05f25c50..2c20c69fc 100644
--- a/nuttx/include/nuttx/usb/usb.h
+++ b/nuttx/include/nuttx/usb/usb.h
@@ -47,11 +47,31 @@
/************************************************************************************
* Preprocessor Definitions
************************************************************************************/
-/* USB Tokens (See chapter 8 in the USB specification) */
-
-#define USB_SETUP_TOKEN 0x0d
-#define USB_OUT_TOKEN 0x01
-#define USB_IN_TOKEN 0x09
+/* A packet identifier (PID) immediately follows the SYNC field of every USB packet.
+ * A PID consists of a four-bit packet type field followed by a four-bit check field
+ * USB Tokens (See Table 8-1 in the USB specification)
+ */
+
+#define USB_PID_OUT_TOKEN (0x01) /* Tokens */
+#define USB_PID_IN_TOKEN (0x09)
+#define USB_PID_SOF_TOKEN (0x05)
+#define USB_PID_SETUP_TOKEN (0x0d)
+
+#define USB_PID_DATA0 (0x03) /* Data */
+#define USB_PID_DATA1 (0x0b)
+#define USB_PID_DATA2 (0x07)
+#define USB_PID_MDATA (0x0f)
+
+#define USB_PID_ACK (0x02) /* Handshake */
+#define USB_PID_NAK (0x0a)
+#define USB_PID_STALL (0x0e)
+#define USB_PID_NYET (0x06)
+
+#define USB_PID_PRE_TOKEN (0x0c) /* Special */
+#define USB_PID_ERR (0x0c)
+#define USB_PID_SPLIT_TOKEN (0x08)
+#define USB_PID_PING_TOKEN (0x04)
+#define USB_PID_RESERVED (0x00)
/* All 16-bit values must be little-endian */