aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/usb.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-09 16:36:49 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-09 16:36:49 +0000
commit77934792d53efe99678286bab123c42c546478a7 (patch)
tree19ff302d365627261bf60802d78669e31bda1b76 /os/hal/include/usb.h
parent9ab9d1b44b1dfc11094faf3da939d35061b53bed (diff)
downloadChibiOS-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.h13
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,