forked from Palatis/Arduino-Lufa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLUFA.c.inc
129 lines (116 loc) · 4.73 KB
/
LUFA.c.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*
* Include this file in one of your project's c source file.
* For example, create a file named "LUFA.c" and include this.
* === LUFA.c ===
* #include "LUFAConfig.h"
* #include <LUFA.c.inc>
* ==============
*/
#ifndef __LUFA_C__
#define __LUFA_C__
#define __INCLUDE_FROM_USB_DRIVER
#define __INCLUDE_FROM_DEVICESTDREQ_C
#define __INCLUDE_FROM_EVENTS_C
#define __INCLUDE_FROM_HOSTSTDREQ_C
#define __INCLUDE_FROM_USBTASK_C
#define __INCLUDE_FROM_USB_CONTROLLER_C
#include <LUFA/LUFA/Drivers/USB/Core/USBMode.h>
#if defined(USB_CAN_BE_DEVICE)
# define __INCLUDE_FROM_AUDIO_DEVICE_C
# define __INCLUDE_FROM_CDC_DEVICE_C
# define __INCLUDE_FROM_MASSSTORAGE_DEVICE_C
# define __INCLUDE_FROM_PRINTER_DEVICE_C
# define __INCLUDE_FROM_RNDIS_DEVICE_C
#endif
#if defined(USB_CAN_BE_HOST)
# define __INCLUDE_FROM_ANDROIDACCESSORY_HOST_C
# define __INCLUDE_FROM_AUDIO_HOST_C
# define __INCLUDE_FROM_CDC_HOST_C
# define __INCLUDE_FROM_HID_HOST_C
# define __INCLUDE_FROM_MASSSTORAGE_HOST_C
# define __INCLUDE_FROM_MIDI_HOST_C
# define __INCLUDE_FROM_PRINTER_HOST_C
# define __INCLUDE_FROM_RNDIS_HOST_C
# define __INCLUDE_FROM_STILLIMAGE_HOST_C
#endif
#include <LUFA/LUFA/Drivers/USB/USB.h>
#include <LUFA/LUFA/Drivers/USB/Core/ConfigDescriptors.c>
#include <LUFA/LUFA/Drivers/USB/Core/Events.c>
#include <LUFA/LUFA/Drivers/USB/Core/USBTask.c>
#include <LUFA/LUFA/Drivers/USB/Class/Common/HIDParser.c>
#if defined(USB_CAN_BE_DEVICE)
# include <LUFA/LUFA/Drivers/USB/Core/DeviceStandardReq.c>
# include <LUFA/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c>
# include <LUFA/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c>
# include <LUFA/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c>
# include <LUFA/LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.c>
# include <LUFA/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.c>
# include <LUFA/LUFA/Drivers/USB/Class/Device/PrinterClassDevice.c>
# include <LUFA/LUFA/Drivers/USB/Class/Device/RNDISClassDevice.c>
#endif
#if defined(USB_CAN_BE_HOST)
# include <LUFA/LUFA/Drivers/USB/Core/HostStandardReq.c>
# include <LUFA/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c>
# include <LUFA/LUFA/Drivers/USB/Class/Host/AudioClassHost.c>
# include <LUFA/LUFA/Drivers/USB/Class/Host/CDCClassHost.c>
# include <LUFA/LUFA/Drivers/USB/Class/Host/HIDClassHost.c>
# include <LUFA/LUFA/Drivers/USB/Class/Host/MassStorageClassHost.c>
# include <LUFA/LUFA/Drivers/USB/Class/Host/MIDIClassHost.c>
# include <LUFA/LUFA/Drivers/USB/Class/Host/PrinterClassHost.c>
# include <LUFA/LUFA/Drivers/USB/Class/Host/RNDISClassHost.c>
# include <LUFA/LUFA/Drivers/USB/Class/Host/StillImageClassHost.c>
#endif
#if defined(USB_CAN_BE_BOTH)
# include <LUFA/LUFA/Drivers/USB/Core/OTG.c>
#endif
#if (ARCH == ARCH_AVR8)
# if defined(USB_CAN_BE_DEVICE)
# include<LUFA/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c>
# include <LUFA/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c>
# include <LUFA/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c>
# endif
# if defined(USB_CAN_BE_HOST)
# include <LUFA/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c>
# include <LUFA/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c>
# include <LUFA/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c>
# endif
# if defined(USB_CAN_BE_BOTH)
# include <LUFA/LUFA/Drivers/USB/Core/OTG_AVR8.c>
# endif
# include <LUFA/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c>
# include <LUFA/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c>
#elif (ARCH == ARCH_XMEGA)
# if defined(USB_CAN_BE_DEVICE)
# include <LUFA/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c>
# include <LUFA/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c>
# include <LUFA/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c>
# endif
# if defined(USB_CAN_BE_HOST)
# include <LUFA/LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c>
# include <LUFA/LUFA/Drivers/USB/Core/XMEGA/Pipe_XMEGA.c>
# include <LUFA/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c>
# endif
# if defined(USB_CAN_BE_BOTH)
# include <LUFA/LUFA/Drivers/USB/Core/OTG_XMEGA.c>
# endif
# include <LUFA/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c>
# include <LUFA/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c>
#elif (ARCH == ARCH_UC3)
# if defined(USB_CAN_BE_DEVICE)
# include <LUFA/LUFA/Drivers/USB/Core/UC3/Device_UC3.c>
# include <LUFA/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c>
# include <LUFA/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c>
# endif
# if defined(USB_CAN_BE_HOST)
# include <LUFA/LUFA/Drivers/USB/Core/UC3/Host_UC3.c>
# include <LUFA/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c>
# include <LUFA/LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.c>
# endif
# if defined(USB_CAN_BE_BOTH)
# include <LUFA/LUFA/Drivers/USB/Core/OTG_UC3.c>
# endif
# include <LUFA/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c>
# include <LUFA/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c>
# include <LUFA/LUFA/Platform/UC3/InterruptManagement.c>
#endif
#endif