aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class/Device
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/USB/Class/Device')
-rw-r--r--LUFA/Drivers/USB/Class/Device/Audio.c2
-rw-r--r--LUFA/Drivers/USB/Class/Device/Audio.h5
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDC.c4
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDC.h7
-rw-r--r--LUFA/Drivers/USB/Class/Device/HID.c2
-rw-r--r--LUFA/Drivers/USB/Class/Device/HID.h5
-rw-r--r--LUFA/Drivers/USB/Class/Device/MIDI.c2
-rw-r--r--LUFA/Drivers/USB/Class/Device/MIDI.h6
-rw-r--r--LUFA/Drivers/USB/Class/Device/MassStorage.c4
-rw-r--r--LUFA/Drivers/USB/Class/Device/MassStorage.h7
-rw-r--r--LUFA/Drivers/USB/Class/Device/RNDIS.c4
-rw-r--r--LUFA/Drivers/USB/Class/Device/RNDIS.h7
12 files changed, 48 insertions, 7 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.c b/LUFA/Drivers/USB/Class/Device/Audio.c
index 89115f2db..d2572e9ab 100644
--- a/LUFA/Drivers/USB/Class/Device/Audio.c
+++ b/LUFA/Drivers/USB/Class/Device/Audio.c
@@ -28,9 +28,11 @@
this software.
*/
+#define __INCLUDE_FROM_USB_DRIVER
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
+#define __INCLUDE_FROM_AUDIO_DRIVER
#include "Audio.h"
void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.h b/LUFA/Drivers/USB/Class/Device/Audio.h
index c6b68b0cb..87fab9889 100644
--- a/LUFA/Drivers/USB/Class/Device/Audio.h
+++ b/LUFA/Drivers/USB/Class/Device/Audio.h
@@ -55,6 +55,11 @@
extern "C" {
#endif
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_AUDIO_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/Class/Audio.h instead.
+ #endif
+
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each Audio interface
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c
index b8a673f03..4cdea9485 100644
--- a/LUFA/Drivers/USB/Class/Device/CDC.c
+++ b/LUFA/Drivers/USB/Class/Device/CDC.c
@@ -28,10 +28,12 @@
this software.
*/
+#define __INCLUDE_FROM_USB_DRIVER
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
-#define INCLUDE_FROM_CDC_CLASS_DEVICE_C
+#define __INCLUDE_FROM_CDC_CLASS_DEVICE_C
+#define __INCLUDE_FROM_CDC_DRIVER
#include "CDC.h"
void CDC_Device_Event_Stub(void)
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h
index e6a2bfd5c..0c214441c 100644
--- a/LUFA/Drivers/USB/Class/Device/CDC.h
+++ b/LUFA/Drivers/USB/Class/Device/CDC.h
@@ -73,6 +73,11 @@
extern "C" {
#endif
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_CDC_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/Class/CDC.h instead.
+ #endif
+
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each CDC interface
@@ -281,7 +286,7 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */
- #if defined(INCLUDE_FROM_CDC_CLASS_DEVICE_C)
+ #if defined(__INCLUDE_FROM_CDC_CLASS_DEVICE_C)
static int CDC_Device_putchar(char c, FILE* Stream);
static int CDC_Device_getchar(FILE* Stream);
static int CDC_Device_getchar_Blocking(FILE* Stream);
diff --git a/LUFA/Drivers/USB/Class/Device/HID.c b/LUFA/Drivers/USB/Class/Device/HID.c
index a5c03f726..cc1ad43b5 100644
--- a/LUFA/Drivers/USB/Class/Device/HID.c
+++ b/LUFA/Drivers/USB/Class/Device/HID.c
@@ -28,9 +28,11 @@
this software.
*/
+#define __INCLUDE_FROM_USB_DRIVER
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
+#define __INCLUDE_FROM_HID_DRIVER
#include "HID.h"
void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
diff --git a/LUFA/Drivers/USB/Class/Device/HID.h b/LUFA/Drivers/USB/Class/Device/HID.h
index f62c08c39..15b428a7b 100644
--- a/LUFA/Drivers/USB/Class/Device/HID.h
+++ b/LUFA/Drivers/USB/Class/Device/HID.h
@@ -55,6 +55,11 @@
extern "C" {
#endif
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_HID_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/Class/HID.h instead.
+ #endif
+
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each HID interface
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.c b/LUFA/Drivers/USB/Class/Device/MIDI.c
index b72c2b027..d3f8f55b6 100644
--- a/LUFA/Drivers/USB/Class/Device/MIDI.c
+++ b/LUFA/Drivers/USB/Class/Device/MIDI.c
@@ -28,9 +28,11 @@
this software.
*/
+#define __INCLUDE_FROM_USB_DRIVER
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
+#define __INCLUDE_FROM_MIDI_DRIVER
#include "MIDI.h"
void MIDI_Device_ProcessControlRequest(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h
index 8517782e2..772456bc1 100644
--- a/LUFA/Drivers/USB/Class/Device/MIDI.h
+++ b/LUFA/Drivers/USB/Class/Device/MIDI.h
@@ -47,7 +47,6 @@
/* Includes: */
#include "../../USB.h"
#include "../Common/MIDI.h"
- #include "Audio.h"
#include <string.h>
@@ -56,6 +55,11 @@
extern "C" {
#endif
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_MIDI_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/Class/MIDI.h instead.
+ #endif
+
/* Public Interface - May be used in end-application: */
/* Type Define: */
/** Class state structure. An instance of this structure should be made for each MIDI interface
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.c b/LUFA/Drivers/USB/Class/Device/MassStorage.c
index 941db6866..a5ebab029 100644
--- a/LUFA/Drivers/USB/Class/Device/MassStorage.c
+++ b/LUFA/Drivers/USB/Class/Device/MassStorage.c
@@ -28,10 +28,12 @@
this software.
*/
+#define __INCLUDE_FROM_USB_DRIVER
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
-#define INCLUDE_FROM_MS_CLASS_DEVICE_C
+#define __INCLUDE_FROM_MS_CLASS_DEVICE_C
+#define __INCLUDE_FROM_MS_DRIVER
#include "MassStorage.h"
static volatile bool* CallbackIsResetSource;
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.h b/LUFA/Drivers/USB/Class/Device/MassStorage.h
index 7091dca74..87dcfb232 100644
--- a/LUFA/Drivers/USB/Class/Device/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/Device/MassStorage.h
@@ -55,6 +55,11 @@
extern "C" {
#endif
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_MS_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/Class/MassStorage.h instead.
+ #endif
+
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each Mass Storage interface
@@ -134,7 +139,7 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */
- #if defined(INCLUDE_FROM_MS_CLASS_DEVICE_C)
+ #if defined(__INCLUDE_FROM_MS_CLASS_DEVICE_C)
static void MS_Device_ReturnCommandStatus(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t StreamCallback_MS_Device_AbortOnMassStoreReset(void);
diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.c b/LUFA/Drivers/USB/Class/Device/RNDIS.c
index 0dc385942..1961e7e84 100644
--- a/LUFA/Drivers/USB/Class/Device/RNDIS.c
+++ b/LUFA/Drivers/USB/Class/Device/RNDIS.c
@@ -28,10 +28,12 @@
this software.
*/
+#define __INCLUDE_FROM_USB_DRIVER
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
-#define INCLUDE_FROM_RNDIS_CLASS_DEVICE_C
+#define __INCLUDE_FROM_RNDIS_CLASS_DEVICE_C
+#define __INCLUDE_FROM_RNDIS_DRIVER
#include "RNDIS.h"
static const uint32_t PROGMEM AdapterSupportedOIDList[] =
diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.h b/LUFA/Drivers/USB/Class/Device/RNDIS.h
index 91ec79868..7d6b3a882 100644
--- a/LUFA/Drivers/USB/Class/Device/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/Device/RNDIS.h
@@ -55,6 +55,11 @@
extern "C" {
#endif
+ /* Preprocessor Checks: */
+ #if !defined(__INCLUDE_FROM_RNDIS_DRIVER)
+ #error Do not include this file directly. Include LUFA/Drivers/Class/RNDIS.h instead.
+ #endif
+
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** Class state structure. An instance of this structure should be made for each RNDIS interface
@@ -131,7 +136,7 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */
- #if defined(INCLUDE_FROM_RNDIS_CLASS_DEVICE_C)
+ #if defined(__INCLUDE_FROM_RNDIS_CLASS_DEVICE_C)
static void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo)
ATTR_NON_NULL_PTR_ARG(1);
static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo,