diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-09 16:36:49 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-09 16:36:49 +0000 |
commit | 77934792d53efe99678286bab123c42c546478a7 (patch) | |
tree | 19ff302d365627261bf60802d78669e31bda1b76 /os/hal/include/usb.h | |
parent | 9ab9d1b44b1dfc11094faf3da939d35061b53bed (diff) | |
download | ChibiOS-77934792d53efe99678286bab123c42c546478a7.tar.gz ChibiOS-77934792d53efe99678286bab123c42c546478a7.tar.bz2 ChibiOS-77934792d53efe99678286bab123c42c546478a7.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2722 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/usb.h')
-rw-r--r-- | os/hal/include/usb.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/os/hal/include/usb.h b/os/hal/include/usb.h index 26c701f52..c6c5d57cf 100644 --- a/os/hal/include/usb.h +++ b/os/hal/include/usb.h @@ -76,6 +76,11 @@ #define USB_EARLY_SET_ADDRESS 0
#define USB_LATE_SET_ADDRESS 1
+/**
+ * @brief Returned by some functions to report a busy endpoint.
+ */
+#define USB_ENDPOINT_BUSY ((size_t)0xFFFFFFFF)
+
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
@@ -233,7 +238,7 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp, * @param[in] ep endpoint number
* @return The operation status.
* @retval FALSE Endpoint ready.
- * @retval TRUE Endpoint busy.
+ * @retval TRUE Endpoint transmitting.
*
* @iclass
*/
@@ -246,7 +251,7 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp, * @param[in] ep endpoint number
* @return The operation status.
* @retval FALSE Endpoint ready.
- * @retval TRUE Endpoint busy.
+ * @retval TRUE Endpoint receiving.
*
* @iclass
*/
@@ -282,6 +287,10 @@ extern "C" { void usbInitEndpointI(USBDriver *usbp, usbep_t ep, USBEndpointState *epp,
const USBEndpointConfig *epcp);
void usbDisableEndpointsI(USBDriver *usbp);
+ size_t usbReadPacketI(USBDriver *usbp, usbep_t ep,
+ uint8_t *buf, size_t n);
+ size_t usbWritePacketI(USBDriver *usbp, usbep_t ep,
+ const uint8_t *buf, size_t n);
bool_t usbStartReceiveI(USBDriver *usbp, usbep_t ep,
uint8_t *buf, size_t n);
bool_t usbStartTransmitI(USBDriver *usbp, usbep_t ep,
|