From 77934792d53efe99678286bab123c42c546478a7 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 9 Feb 2011 16:36:49 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2722 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/usb.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'os/hal/include/usb.h') 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, -- cgit v1.2.3