aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-27 18:03:31 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-27 18:03:31 +0000
commit38ac197ecd9ac41cf77f239b39d36f4c56cf8bb8 (patch)
tree8b6a6622808347ff637956f42d8aed5478836e03 /os/hal/include
parent9492ff4976cb9e8af40c9a6715b7d9f7ef5f9428 (diff)
downloadChibiOS-38ac197ecd9ac41cf77f239b39d36f4c56cf8bb8.tar.gz
ChibiOS-38ac197ecd9ac41cf77f239b39d36f4c56cf8bb8.tar.bz2
ChibiOS-38ac197ecd9ac41cf77f239b39d36f4c56cf8bb8.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4350 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/io_block.h2
-rw-r--r--os/hal/include/usb.h15
2 files changed, 13 insertions, 4 deletions
diff --git a/os/hal/include/io_block.h b/os/hal/include/io_block.h
index acd20ebca..90b17be13 100644
--- a/os/hal/include/io_block.h
+++ b/os/hal/include/io_block.h
@@ -49,7 +49,7 @@ typedef enum {
BLK_DISCONNECTING = 4, /**< Disconnection in progress. */
BLK_READY = 5, /**< Device ready. */
BLK_READING = 6, /**< Read operation in progress. */
- BLK_WRITING = 7, /**< Write operation in progress. */
+ BLK_WRITING = 7 /**< Write operation in progress. */
} blkstate_t;
/**
diff --git a/os/hal/include/usb.h b/os/hal/include/usb.h
index a0a7298e0..9cb933b2d 100644
--- a/os/hal/include/usb.h
+++ b/os/hal/include/usb.h
@@ -215,7 +215,7 @@ typedef enum {
USB_STOP = 1, /**< Stopped. */
USB_READY = 2, /**< Ready, after bus reset. */
USB_SELECTED = 3, /**< Address assigned. */
- USB_ACTIVE = 4, /**< Active, configuration selected.*/
+ USB_ACTIVE = 4 /**< Active, configuration selected.*/
} usbstate_t;
/**
@@ -248,7 +248,7 @@ typedef enum {
USB_EVENT_CONFIGURED = 2, /**< Configuration selected. */
USB_EVENT_SUSPEND = 3, /**< Entering suspend mode. */
USB_EVENT_WAKEUP = 4, /**< Leaving suspend mode. */
- USB_EVENT_STALLED = 5, /**< Endpoint 0 error, stalled. */
+ USB_EVENT_STALLED = 5 /**< Endpoint 0 error, stalled. */
} usbevent_t;
/**
@@ -322,7 +322,7 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
* @{
*/
/**
- * @brief Returns the sriver state.
+ * @brief Returns the driver state.
*
* @param[in] usbp pointer to the @p USBDriver object
* @return The driver state.
@@ -332,6 +332,15 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
#define usbGetDriverStateI(usbp) ((usbp)->state)
/**
+ * @brief Fetches a 16 bits word value from an USB message.
+ *
+ * @param[in] p pointer to the 16 bits word
+ *
+ * @notapi
+ */
+#define usbFetchWord(p) ((uint16_t)*(p) | ((uint16_t)*((p) + 1) << 8))
+
+/**
* @brief Connects the USB device.
*
* @param[in] usbp pointer to the @p USBDriver object