From 718dc5084f7719f91eaacfc99e8c7de654eb2ad8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 23 Aug 2011 13:36:25 +0000 Subject: HAL documentation improvements. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3252 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/usb.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'os/hal/include/usb.h') diff --git a/os/hal/include/usb.h b/os/hal/include/usb.h index c4cf68fe2..884b11e8d 100644 --- a/os/hal/include/usb.h +++ b/os/hal/include/usb.h @@ -77,6 +77,10 @@ #define USB_EARLY_SET_ADDRESS 0 #define USB_LATE_SET_ADDRESS 1 +/** + * @name Helper macros for USB descriptors + * @{ + */ /** * @brief Helper macro for index values into descriptor strings. */ @@ -166,12 +170,17 @@ USB_DESC_BYTE(bmAttributes), \ USB_DESC_WORD(wMaxPacketSize), \ USB_DESC_BYTE(bInterval) +/** @} */ /** * @brief Returned by some functions to report a busy endpoint. */ #define USB_ENDPOINT_BUSY ((size_t)0xFFFFFFFF) +/** + * @name Endpoint types and settings + * @{ + */ #define USB_EP_MODE_TYPE 0x0003 /**< Endpoint type mask. */ #define USB_EP_MODE_TYPE_CTRL 0x0000 /**< Control endpoint. */ #define USB_EP_MODE_TYPE_ISOC 0x0001 /**< Isochronous endpoint. */ @@ -179,6 +188,7 @@ #define USB_EP_MODE_TYPE_INTR 0x0003 /**< Interrupt endpoint. */ #define USB_EP_MODE_TRANSACTION 0x0000 /**< Transaction mode. */ #define USB_EP_MODE_PACKET 0x0010 /**< Packet mode enabled. */ +/** @} */ /*===========================================================================*/ /* Driver pre-compile time settings. */ @@ -311,6 +321,11 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp, /*===========================================================================*/ /* Driver macros. */ /*===========================================================================*/ + +/** + * @name Macro Functions + * @{ + */ /** * @brief Returns the current frame number. * @@ -411,7 +426,12 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp, * @special */ #define usbReadSetup(usbp, ep, buf) usb_lld_read_setup(usbp, ep, buf) +/** @} */ +/** + * @name Low Level driver helper macros + * @{ + */ /** * @brief Common ISR code, usb event callback. * @@ -474,6 +494,7 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp, (usbp)->receiving &= ~(1 << (ep)); \ (usbp)->epc[ep]->out_cb(usbp, ep); \ } +/** @} */ /*===========================================================================*/ /* External declarations. */ -- cgit v1.2.3