Update UC3 platform driver support to use the bitmasks defined in the header files...
[pub/USBasp.git] / LUFA / Drivers / USB / Core / XMEGA / USBInterrupt_XMEGA.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 USB Controller Interrupt definitions for the AVR XMEGA microcontrollers.
33 *
34 * This file contains definitions required for the correct handling of low level USB service routine interrupts
35 * from the USB controller.
36 *
37 * \note This file should not be included directly. It is automatically included as needed by the USB driver
38 * dispatch header located in LUFA/Drivers/USB/USB.h.
39 */
40
41 #ifndef __USBINTERRUPT_XMEGA_H__
42 #define __USBINTERRUPT_XMEGA_H__
43
44 /* Includes: */
45 #include "../../../../Common/Common.h"
46
47 /* Enable C linkage for C++ Compilers: */
48 #if defined(__cplusplus)
49 extern "C" {
50 #endif
51
52 /* Preprocessor Checks: */
53 #if !defined(__INCLUDE_FROM_USB_DRIVER)
54 #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
55 #endif
56
57 /* Private Interface - For use in library only: */
58 #if !defined(__DOXYGEN__)
59 /* Enums: */
60 enum USB_Interrupts_t
61 {
62 USB_INT_NONE = 0, // TODO
63 };
64
65 /* Inline Functions: */
66 static inline void USB_INT_Enable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
67 static inline void USB_INT_Enable(const uint8_t Interrupt)
68 {
69 // TODO
70 }
71
72 static inline void USB_INT_Disable(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
73 static inline void USB_INT_Disable(const uint8_t Interrupt)
74 {
75 // TODO
76 }
77
78 static inline void USB_INT_Clear(const uint8_t Interrupt) ATTR_ALWAYS_INLINE;
79 static inline void USB_INT_Clear(const uint8_t Interrupt)
80 {
81 // TODO
82 }
83
84 static inline bool USB_INT_IsEnabled(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
85 static inline bool USB_INT_IsEnabled(const uint8_t Interrupt)
86 {
87 return false; // TODO
88 }
89
90 static inline bool USB_INT_HasOccurred(const uint8_t Interrupt) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
91 static inline bool USB_INT_HasOccurred(const uint8_t Interrupt)
92 {
93 return false; // TODO
94 }
95
96 /* Includes: */
97 #include "../USBMode.h"
98 #include "../Events.h"
99 #include "../USBController.h"
100
101 /* Function Prototypes: */
102 void USB_INT_ClearAllInterrupts(void);
103 void USB_INT_DisableAllInterrupts(void);
104 #endif
105
106 /* Disable C linkage for C++ Compilers: */
107 #if defined(__cplusplus)
108 }
109 #endif
110
111 #endif
112