Move out the EP_TYPE_* macros to the base USBController.h header, as these are used...
[pub/USBasp.git] / LUFA / Drivers / USB / Core / USBController.h
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2011.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.lufa-lib.org
7 */
8
9 /*
10 Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
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.
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 * \brief Common USB Controller definitions for all architectures.
33 * \copydetails Group_USBManagement
34 *
35 * \note This file should not be included directly. It is automatically included as needed by the USB driver
36 * dispatch header located in LUFA/Drivers/USB/USB.h.
37 */
38
39 /** \ingroup Group_USB
40 * \defgroup Group_USBManagement USB Interface Management
41 * \brief USB Controller definitions for general USB controller management.
42 *
43 * Functions, macros, variables, enums and types related to the setup and management of the USB interface.
44 *
45 * @{
46 */
47
48 #ifndef __USBCONTROLLER_H__
49 #define __USBCONTROLLER_H__
50
51 /* Includes: */
52 #include "../../../Common/Common.h"
53 #include "USBMode.h"
54
55 /* Enable C linkage for C++ Compilers: */
56 #if defined(__cplusplus)
57 extern "C" {
58 #endif
59
60 /* Preprocessor Checks and Defines: */
61 #if !defined(__INCLUDE_FROM_USB_DRIVER)
62 #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
63 #endif
64
65 /* Defines: */
66 /** \name Endpoint/Pipe Type Masks */
67 //@{
68 /** Mask for a CONTROL type endpoint or pipe.
69 *
70 * \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
71 */
72 #define EP_TYPE_CONTROL 0x00
73
74 /** Mask for an ISOCHRONOUS type endpoint or pipe.
75 *
76 * \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
77 */
78 #define EP_TYPE_ISOCHRONOUS 0x01
79
80 /** Mask for a BULK type endpoint or pipe.
81 *
82 * \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
83 */
84 #define EP_TYPE_BULK 0x02
85
86 /** Mask for an INTERRUPT type endpoint or pipe.
87 *
88 * \note See \ref Group_EndpointManagement and \ref Group_PipeManagement for endpoint/pipe functions.
89 */
90 #define EP_TYPE_INTERRUPT 0x03
91 //@}
92
93 /* Architecture Includes: */
94 #if (ARCH == ARCH_AVR8)
95 #include "AVR8/USBController_AVR8.h"
96 #elif (ARCH == ARCH_UC3)
97 #include "UC3/USBController_UC3.h"
98 #elif (ARCH == ARCH_XMEGA)
99 #include "XMEGA/USBController_XMEGA.h"
100 #endif
101
102 /* Disable C linkage for C++ Compilers: */
103 #if defined(__cplusplus)
104 }
105 #endif
106
107 #endif
108
109 /** @} */
110