New HID report item macros (with HID_RI_ prefix) to allow for easy creation and editi...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / USBController.h
index 950a42b..5511fa5 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2010.
+     Copyright (C) Dean Camera, 2011.
 
   dean [at] fourwalledcubicle [dot] com
 
   dean [at] fourwalledcubicle [dot] com
-      www.fourwalledcubicle.com
+           www.lufa-lib.org
 */
 
 /*
 */
 
 /*
-  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
        /* Public Interface - May be used in end-application: */
                /* Macros: */
 
        /* Public Interface - May be used in end-application: */
                /* Macros: */
+                       /** \name USB Controller Option Masks */
+                       //@{
                        /** Regulator disable option mask for \ref USB_Init(). This indicates that the internal 3.3V USB data pad
                         *  regulator should be enabled to regulate the data pin voltages to within the USB standard.
                         *
                        /** Regulator disable option mask for \ref USB_Init(). This indicates that the internal 3.3V USB data pad
                         *  regulator should be enabled to regulate the data pin voltages to within the USB standard.
                         *
                         *  that the USB controller requires) and ensuring that it is locked at the correct frequency for USB operations.
                         */
                        #define USB_OPT_AUTO_PLL                   (0 << 2)
                         *  that the USB controller requires) and ensuring that it is locked at the correct frequency for USB operations.
                         */
                        #define USB_OPT_AUTO_PLL                   (0 << 2)
-
+                       //@}
+                       
+                       /** \name Endpoint/Pipe Type Masks */
+                       //@{
                        /** Mask for a CONTROL type endpoint or pipe.
                         *
                         *  \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
                        /** Mask for a CONTROL type endpoint or pipe.
                         *
                         *  \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
                         *  \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
                         */
                        #define EP_TYPE_INTERRUPT                  0x03
                         *  \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
                         */
                        #define EP_TYPE_INTERRUPT                  0x03
+                       //@}
 
                        #if !defined(USB_STREAM_TIMEOUT_MS) || defined(__DOXYGEN__)
                                /** Constant for the maximum software timeout period of the USB data stream transfer functions
 
                        #if !defined(USB_STREAM_TIMEOUT_MS) || defined(__DOXYGEN__)
                                /** Constant for the maximum software timeout period of the USB data stream transfer functions
 
                /* Inline Functions: */
                        #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__)
 
                /* Inline Functions: */
                        #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__)
-                               /** Returns boolean true if the VBUS line is currently high (i.e. the USB host is supplying power),
-                                *  otherwise returns false.
+                               /** Determines if the VBUS line is currently high (i.e. the USB host is supplying power).
                                 *
                                 *  \note This function is not available on some AVR models which do not support hardware VBUS monitoring.
                                 *
                                 *  \note This function is not available on some AVR models which do not support hardware VBUS monitoring.
+                                *
+                                *  \return Boolean \c true if the VBUS line is currently detecting power from a host, \c false otherwise.
                                 */
                                static inline bool USB_VBUS_GetStatus(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
                                static inline bool USB_VBUS_GetStatus(void)
                                 */
                                static inline bool USB_VBUS_GetStatus(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
                                static inline bool USB_VBUS_GetStatus(void)
                         *
                         *  \param[in] Options  Mask indicating the options which should be used when initializing the USB
                         *                      interface to control the USB interface's behaviour. This should be comprised of
                         *
                         *  \param[in] Options  Mask indicating the options which should be used when initializing the USB
                         *                      interface to control the USB interface's behaviour. This should be comprised of
-                        *                      a USB_OPT_REG_* mask to control the regulator, a USB_OPT_*_PLL mask to control the
-                        *                      PLL, and a USB_DEVICE_OPT_* mask (when the device mode is enabled) to set the device
+                        *                      a \c USB_OPT_REG_* mask to control the regulator, a \c USB_OPT_*_PLL mask to control the
+                        *                      PLL, and a \c USB_DEVICE_OPT_* mask (when the device mode is enabled) to set the device
                         *                      mode speed.
                         *
                         *  \note To reduce the FLASH requirements of the library if only device or host mode is required,
                         *                      mode speed.
                         *
                         *  \note To reduce the FLASH requirements of the library if only device or host mode is required,
-                        *        the mode can be statically set in the project makefile by defining the token USB_DEVICE_ONLY
-                        *        (for device mode) or USB_HOST_ONLY (for host mode), passing the token to the compiler
+                        *        the mode can be statically set in the project makefile by defining the token \c USB_DEVICE_ONLY
+                        *        (for device mode) or \c USB_HOST_ONLY (for host mode), passing the token to the compiler
                         *        via the -D switch. If the mode is statically set, this parameter does not exist in the
                         *        function prototype.
                         *        \n\n
                         *
                         *  \note To reduce the FLASH requirements of the library if only fixed settings are are required,
                         *        the options may be set statically in the same manner as the mode (see the Mode parameter of
                         *        via the -D switch. If the mode is statically set, this parameter does not exist in the
                         *        function prototype.
                         *        \n\n
                         *
                         *  \note To reduce the FLASH requirements of the library if only fixed settings are are required,
                         *        the options may be set statically in the same manner as the mode (see the Mode parameter of
-                        *        this function). To statically set the USB options, pass in the USE_STATIC_OPTIONS token,
+                        *        this function). To statically set the USB options, pass in the \c USE_STATIC_OPTIONS token,
                         *        defined to the appropriate options masks. When the options are statically set, this
                         *        parameter does not exist in the function prototype.
                         *        \n\n
                         *        defined to the appropriate options masks. When the options are statically set, this
                         *        parameter does not exist in the function prototype.
                         *        \n\n
                         *  \note The mode parameter does not exist on devices where only one mode is possible, such as USB
                         *        AVR models which only implement the USB device mode in hardware.
                         *
                         *  \note The mode parameter does not exist on devices where only one mode is possible, such as USB
                         *        AVR models which only implement the USB device mode in hardware.
                         *
-                        *  \see Device.h for the USB_DEVICE_OPT_* masks.
+                        *  \see \ref Group_Device for the \c USB_DEVICE_OPT_* masks.
                         */
                        void USB_Init(
                                       #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
                         */
                        void USB_Init(
                                       #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
                                 *        changed in value.
                                 *        \n\n
                                 *
                                 *        changed in value.
                                 *        \n\n
                                 *
-                                *  \note When the controller is initialized into UID autodetection mode, this variable will hold the
+                                *  \note When the controller is initialized into UID auto-detection mode, this variable will hold the
                                 *        currently selected USB mode (i.e. \ref USB_MODE_Device or \ref USB_MODE_Host). If the controller
                                 *        currently selected USB mode (i.e. \ref USB_MODE_Device or \ref USB_MODE_Host). If the controller
-                                *        is fixed into a specific mode (either through the USB_DEVICE_ONLY or USB_HOST_ONLY compile time
+                                *        is fixed into a specific mode (either through the \c USB_DEVICE_ONLY or \c USB_HOST_ONLY compile time
                                 *        options, or a limitation of the USB controller in the chosen device model) this will evaluate to
                                 *        a constant of the appropriate value and will never evaluate to \ref USB_MODE_None even when the
                                 *        USB interface is not initialized.
                                 *        options, or a limitation of the USB controller in the chosen device model) this will evaluate to
                                 *        a constant of the appropriate value and will never evaluate to \ref USB_MODE_None even when the
                                 *        USB interface is not initialized.
 
                        #if !defined(USE_STATIC_OPTIONS) || defined(__DOXYGEN__)
                                /** Indicates the current USB options that the USB interface was initialized with when \ref USB_Init()
 
                        #if !defined(USE_STATIC_OPTIONS) || defined(__DOXYGEN__)
                                /** Indicates the current USB options that the USB interface was initialized with when \ref USB_Init()
-                                *  was called. This value will be one of the USB_MODE_* masks defined elsewhere in this module.
+                                *  was called. This value will be one of the \c USB_MODE_* masks defined elsewhere in this module.
                                 *
                                 *  \note This variable should be treated as read-only in the user application, and never manually
                                 *        changed in value.
                                 *
                                 *  \note This variable should be treated as read-only in the user application, and never manually
                                 *        changed in value.