diff options
Diffstat (limited to 'LUFA/Drivers/USB')
-rw-r--r-- | LUFA/Drivers/USB/Class/ConfigDescriptor.c | 6 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/HIDParser.h | 15 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/Events.h | 17 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/StdDescriptors.h | 9 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/StdRequestType.h | 9 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/StreamCallbacks.h | 11 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/USBInterrupt.h | 10 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/USBTask.h | 6 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/DevChapter9.h | 8 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Device.h | 9 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Endpoint.h | 9 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Host.h | 9 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/HostChapter9.h | 8 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/LowLevel.h | 6 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/OTG.h | 12 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Pipe.h | 18 | ||||
-rw-r--r-- | LUFA/Drivers/USB/USB.h | 19 |
17 files changed, 64 insertions, 117 deletions
diff --git a/LUFA/Drivers/USB/Class/ConfigDescriptor.c b/LUFA/Drivers/USB/Class/ConfigDescriptor.c index f22426bf0..ecd58791c 100644 --- a/LUFA/Drivers/USB/Class/ConfigDescriptor.c +++ b/LUFA/Drivers/USB/Class/ConfigDescriptor.c @@ -28,6 +28,10 @@ this software.
*/
+#include "../HighLevel/USBMode.h"
+
+#if defined(USB_CAN_BE_HOST)
+
#include "ConfigDescriptor.h"
uint8_t USB_Host_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* BufferPtr)
@@ -138,3 +142,5 @@ uint8_t USB_Host_GetNextDescriptorComp_P(uint16_t* BytesRem, uint8_t** CurrConfi return Descriptor_Search_Comp_EndOfDescriptor;
}
+
+#endif
diff --git a/LUFA/Drivers/USB/Class/HIDParser.h b/LUFA/Drivers/USB/Class/HIDParser.h index ad242fe56..4d9f9db7a 100644 --- a/LUFA/Drivers/USB/Class/HIDParser.h +++ b/LUFA/Drivers/USB/Class/HIDParser.h @@ -33,7 +33,14 @@ * USB Human Interface Device (HID) Class report descriptor processing routines. This file allows for the easy
* parsing of the complex HID report descriptor, which describes the data that the device transmits to the host.
*
- * The processed report is presented back to the user application as a flat structure containing each report
+ */
+
+/** \ingroup Group_USB
+ * @defgroup Group_HIDParser HID Report Parser
+ *
+ * Functions, macros, variables, enums and types related to the parsing of HID class device report descriptors.
+ *
+ * The processed HID report is presented back to the user application as a flat structure containing each report
* item's IN, OUT and FEATURE (if desired) items along with each item's attributes.
*
* This library portion also allows for easy setting and retrieval of data from a HID report, including devices
@@ -43,12 +50,6 @@ * to save on memory. This can be overridden by defining the HID_ENABLE_FEATURE_PROCESSING or
* HID_INCLUDE_CONSTANT_DATA_ITEMS tokens in the user project makefile, passing them to the compiler via the -D
* switch.
- */
-
-/** \ingroup Group_USB
- * @defgroup Group_HIDParser HID Report Parser
- *
- * Functions, macros, variables, enums and types related to the parsing of HID class device report descriptors.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/HighLevel/Events.h b/LUFA/Drivers/USB/HighLevel/Events.h index 480e824a7..9638afee3 100644 --- a/LUFA/Drivers/USB/HighLevel/Events.h +++ b/LUFA/Drivers/USB/HighLevel/Events.h @@ -28,22 +28,19 @@ this software.
*/
-/** Library events module. This module contains macros and functions relating to the management of library
- * events, which are small pieces of code similar to ISRs which are run when a given condition is met. Each
- * event can be fired from multiple places in the user or library code, which may or may not be inside an ISR,
- * thus each handler should be written to be as small and fast as possible to prevent possible problems.
+/** \ingroup Group_USB
+ * @defgroup Group_Events USB Events
+ *
+ * This module contains macros and functions relating to the management of library events, which are small
+ * pieces of code similar to ISRs which are run when a given condition is met. Each event can be fired from
+ * multiple places in the user or library code, which may or may not be inside an ISR, thus each handler
+ * should be written to be as small and fast as possible to prevent possible problems.
*
* Events can be hooked by the user application using the EVENT_HANDLER() and HANDLES_EVENT() macros. If an
* event with no associated handler is fired within the library, it by default fires an internal empty stub
* function. This is achieved through the use of the GCC compiler's "alias" attribute.
*
* Each event must only have one associated event handler, but can be raised by multiple sources.
- */
-
-/** \ingroup Group_USB
- * @defgroup Group_Events USB Events
- *
- * Functions, macros, variables, enums and types related to the management of events from the USB kernel.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h index a1a051824..431080b72 100644 --- a/LUFA/Drivers/USB/HighLevel/StdDescriptors.h +++ b/LUFA/Drivers/USB/HighLevel/StdDescriptors.h @@ -28,7 +28,8 @@ this software.
*/
-/** \file
+/** \ingroup Group_USB
+ * @defgroup Group_Descriptors USB Descriptors
*
* Standard USB device descriptor defines and retrieval routines, for USB devices. This module contains
* structures and macros for the easy creation of standard USB descriptors in USB device projects.
@@ -42,12 +43,6 @@ * descriptors will contain elements named identically to the official USB specification. The alternately
* named descriptor elements are placed in the same order inside the descriptor structures as their officially
* named counterparts, thus they can be correlated easily with the official USB specification.
- */
-
-/** \ingroup Group_USB
- * @defgroup Group_Descriptors USB Descriptors
- *
- * Functions, macros, variables, enums and types related to standard USB descriptors.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/HighLevel/StdRequestType.h b/LUFA/Drivers/USB/HighLevel/StdRequestType.h index bf9ef8aee..27c179497 100644 --- a/LUFA/Drivers/USB/HighLevel/StdRequestType.h +++ b/LUFA/Drivers/USB/HighLevel/StdRequestType.h @@ -28,16 +28,11 @@ this software.
*/
-/** \file
- *
- * Contains definitions for the various control request parameters, so that the request details (such as data
- * direction, request recipient, etc.) can be extracted via masking.
- */
-
/** \ingroup Group_USB
* @defgroup Group_StdRequest Standard USB Requests
*
- * Functions, macros, variables, enums and types related to standard USB requests to USB devices.
+ * This module contains definitions for the various control request parameters, so that the request
+ * details (such as data direction, request recipient, etc.) can be extracted via masking.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/HighLevel/StreamCallbacks.h b/LUFA/Drivers/USB/HighLevel/StreamCallbacks.h index 300a3f217..26f150350 100644 --- a/LUFA/Drivers/USB/HighLevel/StreamCallbacks.h +++ b/LUFA/Drivers/USB/HighLevel/StreamCallbacks.h @@ -27,18 +27,13 @@ arising out of or in connection with the use or performance of
this software.
*/
-
-/** \file
- *
- * Macros and enums for the stream callback routines in Endpoint.h and Pipe.c. This module contains the
- * code required to easily set up stream callback functions which can be used to force early abort of a
- * stream read/write process.
- */
/** \ingroup Group_USB
* @defgroup Group_StreamCallbacks Endpoint and Pipe Stream Callbacks
*
- * Functions, macros, variables, enums and types related to endpoint and pipe stream callback functions.
+ * Macros and enums for the stream callback routines in Endpoint.h and Pipe.c. This module contains the
+ * code required to easily set up stream callback functions which can be used to force early abort of a
+ * stream read/write process.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/HighLevel/USBInterrupt.h b/LUFA/Drivers/USB/HighLevel/USBInterrupt.h index 65e0b5fb1..56297e3d4 100644 --- a/LUFA/Drivers/USB/HighLevel/USBInterrupt.h +++ b/LUFA/Drivers/USB/HighLevel/USBInterrupt.h @@ -28,16 +28,12 @@ this software.
*/
-/** \file
- *
- * Main USB interrupt vector handler. This file manages the main USB interrupt vector, for handling such
- * events as VBUS interrupts (on supported USB AVR models), device connections and disconnections, etc.
- */
-
/** \ingroup Group_USB
* @defgroup Group_USBInterrupt Endpoint and Pipe Interrupts
*
- * Functions, macros, variables, enums and types related to endpoint and pipe interrupts.
+ * Main USB interrupt vector handler. This file manages the main USB interrupt vector, for handling such
+ * events as VBUS interrupts (on supported USB AVR models), device connections and disconnections, etc.
+ * as well as providing easy to use macros for the management of the Endpoint/Pipe interrupt vector.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.h b/LUFA/Drivers/USB/HighLevel/USBTask.h index bcf117ddb..637872291 100644 --- a/LUFA/Drivers/USB/HighLevel/USBTask.h +++ b/LUFA/Drivers/USB/HighLevel/USBTask.h @@ -27,12 +27,6 @@ arising out of or in connection with the use or performance of
this software.
*/
-
-/** \file
- *
- * Main library USB management task for both Host and Device mode operations. This contains the master
- * USB_USBTask task which should be periodically run to service both host and device USB projects.
- */
#ifndef __USBTASK_H__
#define __USBTASK_H__
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.h b/LUFA/Drivers/USB/LowLevel/DevChapter9.h index 6571659c1..23b7b4620 100644 --- a/LUFA/Drivers/USB/LowLevel/DevChapter9.h +++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.h @@ -28,14 +28,6 @@ this software.
*/
-/** \file
- *
- * Module for device mode request processing. This module allows for the processing of standard control
- * requests to the default control endpoint while in device mode.
- *
- * \see Chapter 9 of the USB 2.0 specification.
- */
-
#ifndef __DEVCHAPTER9_H__
#define __DEVCHAPTER9_H__
diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h index 8a2ee00c3..3c2bb3697 100644 --- a/LUFA/Drivers/USB/LowLevel/Device.h +++ b/LUFA/Drivers/USB/LowLevel/Device.h @@ -27,17 +27,12 @@ arising out of or in connection with the use or performance of
this software.
*/
-
-/** \file
- *
- * USB Device mode related macros and enums. This module contains macros and enums which are used when
- * the USB controller is initialized in device mode.
- */
/** \ingroup Group_USB
* @defgroup Group_Device Device Management
*
- * Functions, macros, variables, enums and types related to the management of a USB device when in Device mode.
+ * USB Device mode related macros and enums. This module contains macros and enums which are used when
+ * the USB controller is initialized in device mode.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h index a7a282258..651c0e8e6 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.h +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h @@ -28,17 +28,12 @@ this software.
*/
-/** \file
+/** \ingroup Group_USB
+ * @defgroup Group_EndpointManagement Endpoint Management
*
* Functions, macros and enums related to endpoint management when in USB Device mode. This
* module contains the endpoint management macros, as well as endpoint interrupt and data
* send/recieve functions for various data types.
- */
-
-/** \ingroup Group_USB
- * @defgroup Group_EndpointManagement Endpoint Management
- *
- * Functions, macros, variables, enums and types related to the setup and management of endpoints while in USB Device mode.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h index 1ff2d7ab2..82cceb2c0 100644 --- a/LUFA/Drivers/USB/LowLevel/Host.h +++ b/LUFA/Drivers/USB/LowLevel/Host.h @@ -28,16 +28,11 @@ this software.
*/
-/** \file
- *
- * USB Host mode related macros and enums. This module contains macros and enums which are used when
- * the USB controller is initialized in host mode.
- */
-
/** \ingroup Group_USB
* @defgroup Group_Host Host Management
*
- * Functions, macros, variables, enums and types related to the management of a USB host when in Host mode.
+ * USB Host mode related macros and enums. This module contains macros and enums which are used when
+ * the USB controller is initialized in host mode.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/LowLevel/HostChapter9.h b/LUFA/Drivers/USB/LowLevel/HostChapter9.h index 8e7695b34..c2c4ece7a 100644 --- a/LUFA/Drivers/USB/LowLevel/HostChapter9.h +++ b/LUFA/Drivers/USB/LowLevel/HostChapter9.h @@ -28,14 +28,6 @@ this software.
*/
-/** \file
- *
- * Module for host mode request processing. This module allows for the transmission of standard, class and
- * vendor control requests to the default control endpoint of an attached device while in host mode.
- *
- * \see Chapter 9 of the USB 2.0 specification.
- */
-
#ifndef __HOSTCHAPTER9_H__
#define __HOSTCHAPTER9_H__
diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.h b/LUFA/Drivers/USB/LowLevel/LowLevel.h index a6f506f3b..5c474df70 100644 --- a/LUFA/Drivers/USB/LowLevel/LowLevel.h +++ b/LUFA/Drivers/USB/LowLevel/LowLevel.h @@ -28,12 +28,6 @@ this software.
*/
-/** \file
- *
- * Main low level USB driver. This module manages the low level initialization and shut down of the USB AVR's
- * USB interface in either device or (if supported) host mode.
- */
-
/** \ingroup Group_USB
* @defgroup Group_USBManagement USB Interface Management
*
diff --git a/LUFA/Drivers/USB/LowLevel/OTG.h b/LUFA/Drivers/USB/LowLevel/OTG.h index caef82cb6..da303c909 100644 --- a/LUFA/Drivers/USB/LowLevel/OTG.h +++ b/LUFA/Drivers/USB/LowLevel/OTG.h @@ -27,19 +27,13 @@ arising out of or in connection with the use or performance of
this software.
*/
-
-/** \file
- *
- * Macros for embedded USB hosts with dual role On The Go capabilities, for managing role exchange. OTG
- * is a way for two USB dual role devices to talk to one another directly without fixed device/host roles.
- *
- * \note These macros are only for AVRs which support the OTG protocol, and do not exist for device-only AVRs.
- */
/** \ingroup Group_USB
* @defgroup Group_OTGManagement USB On The Go (OTG) Management
*
- * Functions, macros, variables, enums and types related to the setup and management of dual role devices.
+ * This module contains macros for embedded USB hosts with dual role On The Go capabilities, for managing role
+ * exchange. OTG is a way for two USB dual role devices to talk to one another directly without fixed device/host
+ * roles.
*
* @{
*/
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h index 9d8dded04..15be81e13 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.h +++ b/LUFA/Drivers/USB/LowLevel/Pipe.h @@ -27,18 +27,13 @@ arising out of or in connection with the use or performance of
this software.
*/
-
-/** \file
- *
- * Functions, macros and enums related to pipe management when in USB Host mode. This
- * module contains the pipe management macros, as well as pipe interrupt and data
- * send/recieve functions for various data types.
- */
/** \ingroup Group_USB
* @defgroup Group_PipeManagement Pipe Management
*
- * Functions, macros, variables, enums and types related to the setup and management of pipes while in USB Device mode.
+ * This module contains functions, macros and enums related to pipe management when in USB Host mode. This
+ * module contains the pipe management macros, as well as pipe interrupt and data send/recieve functions
+ * for various data types.
*
* @{
*/
@@ -55,8 +50,11 @@ /** @defgroup Group_PipeControlReq Pipe Control Request Management
*
- * Functions, macros, variables, enums and types related to control request management of pipes.
- */
+ * Module for host mode request processing. This module allows for the transmission of standard, class and
+ * vendor control requests to the default control endpoint of an attached device while in host mode.
+ *
+ * \see Chapter 9 of the USB 2.0 specification.
+ */
#ifndef __PIPE_H__
#define __PIPE_H__
diff --git a/LUFA/Drivers/USB/USB.h b/LUFA/Drivers/USB/USB.h index 4d1408849..e0d812787 100644 --- a/LUFA/Drivers/USB/USB.h +++ b/LUFA/Drivers/USB/USB.h @@ -33,13 +33,26 @@ * Master include file for the library USB functionality. This file should be included in all user projects making
* use of the USB portions of the library, instead of including any headers in the USB/LowLevel or USB/HighLevel
* directories.
- *
- * Class specific utility files in USB/Class/ must still be included manually, as they are not normally part of
- * the USB library unless desired by the library user.
*/
/** @defgroup Group_USB USB - LUFA/Drivers/USB/USB.h
*
+ * \section Sec_Dependencies Module Source Dependencies
+ * The following files must be built with any user project that uses this module:
+ * - LUFA/Drivers/USB/LowLevel/DevChapter9.c
+ * - LUFA/Drivers/USB/LowLevel/Endpoint.c
+ * - LUFA/Drivers/USB/LowLevel/Host.c
+ * - LUFA/Drivers/USB/LowLevel/HostChapter9.c
+ * - LUFA/Drivers/USB/LowLevel/LowLevel.c
+ * - LUFA/Drivers/USB/LowLevel/Pipe.c
+ * - LUFA/Drivers/USB/HighLevel/Events.c
+ * - LUFA/Drivers/USB/HighLevel/StdDescriptors.c
+ * - LUFA/Drivers/USB/HighLevel/USBInterrupt.c
+ * - LUFA/Drivers/USB/HighLevel/USBTask.c
+ * - LUFA/Drivers/USB/Class/ConfigDescriptor.c
+ * - LUFA/Drivers/USB/Class/HIDParser.c
+ *
+ * \section Module Description
* Functions, macros, variables, enums and types related to the management of USB communications.
*/
|