Commit for the 090810 release.
[pub/USBasp.git] / LUFA / Drivers / USB / USB.h
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2009.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
7 */
8
9 /*
10 Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
12 Permission to use, copy, modify, and distribute this software
13 and its documentation for any purpose and without fee is hereby
14 granted, provided that the above copyright notice appear in all
15 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.
20
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
28 this software.
29 */
30
31 /** \file
32 *
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
35 * directories.
36 */
37
38 /** @defgroup Group_USB USB - LUFA/Drivers/USB/USB.h
39 *
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
52 *
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.
57 */
58
59 /** \ingroup Group_USB
60 * @defgroup Group_USBClassDrivers USB Class Drivers
61 *
62 * Drivers for both host and device mode of the standard USB classes, for rapid application development.
63 * Class drivers give a framework which sits on top of the low level library API, allowing for standard
64 * USB classes to be implemented in a project with minimal user code. These drivers can be used in
65 * conjunction with the library low level APIs to implement interfaces both via the class drivers and via
66 * the standard library APIs.
67 *
68 * Multiple device mode class drivers can be used within a project, including multiple instances of the
69 * same class driver. In this way, USB Hosts and Devices can be made quickly using the internal class drivers
70 * so that more time and effort can be put into the end application instead of the USB protocol.
71 *
72 * \warning The Host mode Class Drivers are currently incomplete and are included for preview purposes only. The Host
73 * mode class drivers should not be used in any user project until they have been completed in a later revision.
74 */
75
76 #ifndef __USB_H__
77 #define __USB_H__
78
79 /* Preprocessor Checks: */
80 #if (!(defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
81 defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
82 defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__) || \
83 defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || \
84 defined(__AVR_ATmega8U2__) || \
85 defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \
86 defined(__AVR_ATmega32U6__)))
87 #error The currently selected AVR model is not supported under the USB component of the LUFA library.
88 #endif
89
90 /* Includes: */
91 #include "HighLevel/USBMode.h"
92 #include "HighLevel/USBTask.h"
93 #include "HighLevel/USBInterrupt.h"
94 #include "HighLevel/Events.h"
95 #include "HighLevel/StdDescriptors.h"
96
97 #include "LowLevel/LowLevel.h"
98
99 #if defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__)
100 #include "LowLevel/Host.h"
101 #include "LowLevel/HostChapter9.h"
102 #include "LowLevel/Pipe.h"
103 #endif
104
105 #if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
106 #include "LowLevel/Device.h"
107 #include "LowLevel/DevChapter9.h"
108 #include "LowLevel/Endpoint.h"
109 #endif
110
111 #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
112 #include "LowLevel/OTG.h"
113 #endif
114
115 #include "HighLevel/ConfigDescriptor.h"
116
117 #endif
118