summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-12-28 19:40:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-12-28 19:40:37 +0000
commitcd6fa255927b1c300f6f8a6cea19ade313bb9716 (patch)
tree2932d8d13e61a30319ca9bdb61e8de342dec19a8 /nuttx/include
parentfa9855b072dbd8e8dcb419c8e99fd80109278c0c (diff)
downloadpx4-nuttx-cd6fa255927b1c300f6f8a6cea19ade313bb9716.tar.gz
px4-nuttx-cd6fa255927b1c300f6f8a6cea19ade313bb9716.tar.bz2
px4-nuttx-cd6fa255927b1c300f6f8a6cea19ade313bb9716.zip
A little STM32 logic in the PIC32 USB driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4235 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/usb/usb.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/usb/usb.h b/nuttx/include/nuttx/usb/usb.h
index 786f8d99a..c05f25c50 100644
--- a/nuttx/include/nuttx/usb/usb.h
+++ b/nuttx/include/nuttx/usb/usb.h
@@ -47,6 +47,11 @@
/************************************************************************************
* 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
/* All 16-bit values must be little-endian */
@@ -209,6 +214,14 @@
# define USB_EP_ATTR_USAGE_IMPLICIT (2 << USB_EP_ATTR_USAGE_SHIFT)
#define USB_EP_ATTR_MAX_ADJUSTABLE (1 << 7)
+/* OTG Definitions */
+
+/* OTG SET FEATURE Constants */
+
+#define USBOTG_FEATURE_B_HNP_ENABLE 3 /* Enable B device to perform HNP */
+#define USBOTG_FEATURE_A_HNP_SUPPORT 4 /* A device supports HNP */
+#define USBOTG_FEATURE_A_ALT_HNP_SUPPORT 5 /* Another port on the A device supports HNP */
+
/************************************************************************************
* Public Types
************************************************************************************/