aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-12 19:52:43 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-12 19:52:43 +0000
commiteb3355b5589b499e0d36e23f282bf8544cde0bbf (patch)
tree7727990b80520ec66fd759a3cc3739d1381b4e1f /os/hal/include
parent95d128420a70587ce2845df383ed9b6a165e58dc (diff)
downloadChibiOS-eb3355b5589b499e0d36e23f282bf8544cde0bbf.tar.gz
ChibiOS-eb3355b5589b499e0d36e23f282bf8544cde0bbf.tar.bz2
ChibiOS-eb3355b5589b499e0d36e23f282bf8544cde0bbf.zip
Simplified USB endpoints configuration.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2734 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/usb.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/os/hal/include/usb.h b/os/hal/include/usb.h
index 7f46e46f5..82ff59d03 100644
--- a/os/hal/include/usb.h
+++ b/os/hal/include/usb.h
@@ -81,6 +81,14 @@
*/
#define USB_ENDPOINT_BUSY ((size_t)0xFFFFFFFF)
+#define USB_EP_MODE_TYPE 0x0003 /**< Endpoint type mask. */
+#define USB_EP_MODE_TYPE_CTRL 0x0000 /**< Control endpoint. */
+#define USB_EP_MODE_TYPE_ISOC 0x0001 /**< Isochronous endpoint. */
+#define USB_EP_MODE_TYPE_BULK 0x0002 /**< Bulk endpoint. */
+#define USB_EP_MODE_TYPE_INTR 0x0003 /**< Interrupt endpoint. */
+#define USB_EP_MODE_TRANSACTION 0x0000 /**< Transaction mode. */
+#define USB_EP_MODE_PACKET 0x0010 /**< Packet mode enabled. */
+
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
@@ -115,20 +123,10 @@ typedef enum {
} usbstate_t;
/**
- * @brief Type of an endpoint type.
- */
-typedef enum {
- EP_TYPE_CTRL = 0, /**< Control endpoint. */
- EP_TYPE_ISOC = 1, /**< Isochronous endpoint. */
- EP_TYPE_BULK = 2, /**< Bulk endpoint. */
- EP_TYPE_INTR = 3 /**< Interrupt endpoint. */
-} usbeptype_t;
-
-/**
* @brief Type of an endpoint status.
*/
typedef enum {
- EP_STATUS_DISABLED = 0, /**< Endpoint not opened. */
+ EP_STATUS_DISABLED = 0, /**< Endpoint not active. */
EP_STATUS_STALLED = 1, /**< Endpoint opened but stalled. */
EP_STATUS_ACTIVE = 2 /**< Active endpoint. */
} usbepstatus_t;