aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/usb.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-06 10:02:08 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-06 10:02:08 +0000
commit18853dba2210eadd2d919da2f17a9b5b553245fd (patch)
tree2e0c36aabe3984926536bb80a02bcad4b9ebb1ba /os/hal/include/usb.h
parent4e68b68d5a799300bcbbfb3fdff0ea584239bcb0 (diff)
downloadChibiOS-18853dba2210eadd2d919da2f17a9b5b553245fd.tar.gz
ChibiOS-18853dba2210eadd2d919da2f17a9b5b553245fd.tar.bz2
ChibiOS-18853dba2210eadd2d919da2f17a9b5b553245fd.zip
Removed some obsolete code from the USB driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2715 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/usb.h')
-rw-r--r--os/hal/include/usb.h58
1 files changed, 11 insertions, 47 deletions
diff --git a/os/hal/include/usb.h b/os/hal/include/usb.h
index e5f309bd3..26c701f52 100644
--- a/os/hal/include/usb.h
+++ b/os/hal/include/usb.h
@@ -222,70 +222,35 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
* @param[in] usbp pointer to the @p USBDriver object
* @return The current frame number.
*
- * @notapi
+ * @api
*/
#define usbGetFrameNumber(usbp) usb_lld_get_frame_number(usbp)
/**
- * @brief Returns the number of bytes readable from the receive packet
- * buffer.
- *
- * @param[in] usbp pointer to the @p USBDriver object
- * @param[in] ep endpoint number
- * @return The number of bytes that are effectively available.
- * @retval 0 Data not yet available.
- *
- * @iclass
- */
-#define usbGetReadableI(usbp, ep) usb_lld_get_readable(usbp, ep)
-
-/**
- * @brief Endpoint read.
- * @details The buffered packet is copied into the user buffer and then
- * the endpoint is brought to the valid state in order to allow
- * reception of more data.
+ * @brief Returns the status of an IN endpoint.
*
* @param[in] usbp pointer to the @p USBDriver object
* @param[in] ep endpoint number
- * @param[out] buf buffer where to copy the endpoint data
- * @param[in] n maximum number of bytes to copy
- * @return The number of bytes that were effectively available.
- * @retval 0 Data not yet available.
+ * @return The operation status.
+ * @retval FALSE Endpoint ready.
+ * @retval TRUE Endpoint busy.
*
* @iclass
*/
-#define usbReadI(usbp, ep, buf, n) usb_lld_read(usbp, ep, buf, n)
+#define usbGetTransmitStatusI(usbp, ep) (usbp)->ep[ep]->transmitting
/**
- * @brief Returns the number of bytes writeable to the transmit packet
- * buffer.
+ * @brief Returns the status of an OUT endpoint.
*
* @param[in] usbp pointer to the @p USBDriver object
* @param[in] ep endpoint number
- * @return The number of bytes that can be written.
- * @retval 0 Endpoint not ready for transmission.
- *
- * @iclass
- */
-#define usbGetWriteableI(usbp, ep) usb_lld_get_readable(usbp, ep)
-
-/**
- * @brief Endpoint write.
- * @details The user data is copied in the packer memory and then
- * the endpoint is brought to the valid state in order to allow
- * transmission.
- *
- * @param[in] usbp pointer to the @p USBDriver object triggering the
- * callback
- * @param[in] ep endpoint number
- * @param[in] buf buffer where to copy the endpoint data
- * @param[in] n maximum number of bytes to copy
- * @return The number of bytes that were effectively written.
- * @retval 0 Endpoint not ready for transmission.
+ * @return The operation status.
+ * @retval FALSE Endpoint ready.
+ * @retval TRUE Endpoint busy.
*
* @iclass
*/
-#define usbWriteI(usbp, ep, buf, n) usb_lld_write(usbp, ep, buf, n)
+#define usbGetReceiveStatusI(usbp, ep) (usbp)->ep[ep]->receiving
/**
* @brief Request transfer setup.
@@ -295,7 +260,6 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
* @param[in] usbp pointer to the @p USBDriver object
* @param[in] buf pointer to a buffer for the transaction data
* @param[in] n number of bytes to be transferred
- * @param[in] endcb transfer complete callback
*
* @api
*/