3 Copyright (C) Dean Camera, 2010.
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
10 Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
12 Permission to use, copy, modify, distribute, and sell this
13 software and its documentation for any purpose is hereby granted
14 without fee, provided that the above copyright notice appear in
15 all copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
33 * Master include file for the library USB functionality. This file should be included in all user projects making
34 * use of the USB portions of the library, instead of including any headers in the USB/LowLevel or USB/HighLevel
38 /** @defgroup Group_USB USB - LUFA/Drivers/USB/USB.h
40 * \section Sec_Dependencies Module Source Dependencies
41 * The following files must be built with any user project that uses this module:
42 * - LUFA/Drivers/USB/LowLevel/DevChapter9.c
43 * - LUFA/Drivers/USB/LowLevel/Endpoint.c
44 * - LUFA/Drivers/USB/LowLevel/Host.c
45 * - LUFA/Drivers/USB/LowLevel/HostChapter9.c
46 * - LUFA/Drivers/USB/LowLevel/LowLevel.c
47 * - LUFA/Drivers/USB/LowLevel/Pipe.c
48 * - LUFA/Drivers/USB/HighLevel/Events.c
49 * - LUFA/Drivers/USB/HighLevel/USBInterrupt.c
50 * - LUFA/Drivers/USB/HighLevel/USBTask.c
51 * - LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
53 * \section Module Description
54 * Driver and framework for the USB controller hardware on the USB series of AVR microcontrollers. This module
55 * consists of many submodules, and is designed to provide an easy way to configure and control USB host, device
56 * or OTG mode USB applications.
58 * The USB stack requires the sole control over the USB controller in the microcontroller only; i.e. it does not
59 * require any additional AVR timers, etc. to operate. This ensures that the USB stack requires as few resources
62 * The USB stack can be used in Device Mode for connections to USB Hosts (see \ref Group_Device), in Host mode for
63 * hosting of other USB devices (see \ref Group_Host), or as a dual role device which can either act as a USB host
64 * or device depending on what peripheral is connected (see \ref Group_OTG). Both modes also require a common set
65 * of USB management functions found \ref Group_USBManagement.
68 /** \ingroup Group_USB
69 * @defgroup Group_USBClassDrivers USB Class Drivers
71 * Drivers for both host and device mode of the standard USB classes, for rapid application development.
72 * Class drivers give a framework which sits on top of the low level library API, allowing for standard
73 * USB classes to be implemented in a project with minimal user code. These drivers can be used in
74 * conjunction with the library low level APIs to implement interfaces both via the class drivers and via
75 * the standard library APIs.
77 * Multiple device mode class drivers can be used within a project, including multiple instances of the
78 * same class driver. In this way, USB Hosts and Devices can be made quickly using the internal class drivers
79 * so that more time and effort can be put into the end application instead of the USB protocol.
81 * The available class drivers and their modes are listed below.
85 * <th width="100px">USB Class</th>
86 * <th width="90px">Device Mode</th>
87 * <th width="90px">Host Mode</th>
91 * <td bgcolor="#00EE00">Yes</td>
92 * <td bgcolor="#EE0000">No</td>
96 * <td bgcolor="#00EE00">Yes</td>
97 * <td bgcolor="#00EE00">Yes</td>
101 * <td bgcolor="#00EE00">Yes</td>
102 * <td bgcolor="#00EE00">Yes</td>
106 * <td bgcolor="#00EE00">Yes</td>
107 * <td bgcolor="#00EE00">Yes</td>
110 * <td>Mass Storage</td>
111 * <td bgcolor="#00EE00">Yes</td>
112 * <td bgcolor="#00EE00">Yes</td>
116 * <td bgcolor="#EE0000">No</td>
117 * <td bgcolor="#00EE00">Yes</td>
121 * <td bgcolor="#00EE00">Yes</td>
122 * <td bgcolor="#00EE00">Yes</td>
125 * <td>Still Image</td>
126 * <td bgcolor="#EE0000">No</td>
127 * <td bgcolor="#00EE00">Yes</td>
136 #include "HighLevel/USBMode.h"
138 /* Preprocessor Checks: */
139 #if (!defined(USB_SERIES_2_AVR) && !defined(USB_SERIES_4_AVR) && \
140 !defined(USB_SERIES_6_AVR) && !defined(USB_SERIES_7_AVR))
141 #error The currently selected AVR model is not supported under the USB component of the LUFA library.
145 #include "HighLevel/USBTask.h"
146 #include "HighLevel/USBInterrupt.h"
147 #include "HighLevel/Events.h"
148 #include "HighLevel/StdDescriptors.h"
150 #include "LowLevel/LowLevel.h"
152 #if defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__)
153 #include "LowLevel/Host.h"
154 #include "LowLevel/HostChapter9.h"
155 #include "LowLevel/Pipe.h"
158 #if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
159 #include "LowLevel/Device.h"
160 #include "LowLevel/DevChapter9.h"
161 #include "LowLevel/Endpoint.h"
164 #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
165 #include "LowLevel/OTG.h"
168 #include "HighLevel/ConfigDescriptor.h"