75fff2fcdbf6377510f857548c298ed6e4a61b6c
[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 * Class specific utility files in USB/Class/ must still be included manually, as they are not normally part of
38 * the USB library unless desired by the library user.
39 */
40
41 /** @defgroup Group_USB USB - LUFA/Drivers/USB/USB.h
42 *
43 * Functions, macros, variables, enums and types related to the management of USB communications.
44 */
45
46 #ifndef __USB_H__
47 #define __USB_H__
48
49 /* Preprocessor Checks: */
50 #if (!(defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__)) && defined(USB_HOST_ONLY))
51 #error USB_HOST_ONLY is not available for the currently selected USB AVR model.
52 #endif
53
54 #if (!(defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
55 defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
56 defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__) || \
57 defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \
58 defined(__AVR_ATmega32U6__)))
59 #error The currently selected AVR model is not supported under the USB component of the LUFA library.
60 #endif
61
62 /* Includes: */
63 #include "Highlevel/USBMode.h"
64 #include "HighLevel/USBTask.h"
65 #include "HighLevel/USBInterrupt.h"
66 #include "HighLevel/Events.h"
67 #include "HighLevel/StdDescriptors.h"
68
69 #include "LowLevel/LowLevel.h"
70
71 #if defined(USB_CAN_BE_HOST) || defined(__DOXYGEN__)
72 #include "LowLevel/Host.h"
73 #include "LowLevel/HostChapter9.h"
74 #include "LowLevel/Pipe.h"
75 #endif
76
77 #if defined(USB_CAN_BE_DEVICE) || defined(__DOXYGEN__)
78 #include "LowLevel/Device.h"
79 #include "LowLevel/DevChapter9.h"
80 #include "LowLevel/Endpoint.h"
81 #endif
82
83 #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
84 #include "LowLevel/OTG.h"
85 #endif
86
87 #include "Class/ConfigDescriptor.h"
88 #include "Class/HIDParser.h"
89
90 #endif
91