diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-02-11 04:05:02 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-02-11 04:05:02 +0000 |
commit | d49cc0f7830319e701294e19937fae4de26ae8e2 (patch) | |
tree | a6353899c8cc6940a6540832b36891345483c474 /LUFA/Drivers/Peripheral | |
parent | 3a2c1db6751979ae3e5d7a6fa51026f9c44c71c0 (diff) | |
download | lufa-d49cc0f7830319e701294e19937fae4de26ae8e2.tar.gz lufa-d49cc0f7830319e701294e19937fae4de26ae8e2.tar.bz2 lufa-d49cc0f7830319e701294e19937fae4de26ae8e2.zip |
Add more include protection macros to give the user warnings when they try to manually include private driver header files, instead of the public driver headers.
Diffstat (limited to 'LUFA/Drivers/Peripheral')
-rw-r--r-- | LUFA/Drivers/Peripheral/ADC.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/Peripheral/SerialStream.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/Peripheral/SerialStream.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/Peripheral/TWI.h | 3 |
6 files changed, 6 insertions, 8 deletions
diff --git a/LUFA/Drivers/Peripheral/ADC.h b/LUFA/Drivers/Peripheral/ADC.h index 1a111697b..982364368 100644 --- a/LUFA/Drivers/Peripheral/ADC.h +++ b/LUFA/Drivers/Peripheral/ADC.h @@ -54,8 +54,7 @@ /* Macros: */
#if !defined(__DOXYGEN__)
- #define INCLUDE_FROM_ADC_H
- #define INCLUDE_FROM_CHIP_DRIVER
+ #define __INCLUDE_FROM_ADC_H
#endif
/* Includes: */
diff --git a/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h b/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h index a7414ec31..8b1b47df2 100644 --- a/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h +++ b/LUFA/Drivers/Peripheral/AVRU4U6U7/ADC.h @@ -62,7 +62,7 @@ #endif
/* Preprocessor Checks: */
- #if !defined(INCLUDE_FROM_ADC_H)
+ #if !defined(__INCLUDE_FROM_ADC_H)
#error Do not include this file directly. Include LUFA/Drivers/Peripheral/ADC.h instead.
#endif
diff --git a/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h b/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h index be905fe4e..13db86e69 100644 --- a/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h +++ b/LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h @@ -63,7 +63,7 @@ #endif
/* Preprocessor Checks: */
- #if !defined(INCLUDE_FROM_TWI_H)
+ #if !defined(__INCLUDE_FROM_TWI_H)
#error Do not include this file directly. Include LUFA/Drivers/Peripheral/TWI.h instead.
#endif
diff --git a/LUFA/Drivers/Peripheral/SerialStream.c b/LUFA/Drivers/Peripheral/SerialStream.c index c23d4e16a..867160a3e 100644 --- a/LUFA/Drivers/Peripheral/SerialStream.c +++ b/LUFA/Drivers/Peripheral/SerialStream.c @@ -28,7 +28,7 @@ this software.
*/
-#define INCLUDE_FROM_SERIALSTREAM_C
+#define __INCLUDE_FROM_SERIALSTREAM_C
#include "SerialStream.h"
FILE USARTStream = FDEV_SETUP_STREAM(SerialStream_TxByte, SerialStream_RxByte, _FDEV_SETUP_RW);
diff --git a/LUFA/Drivers/Peripheral/SerialStream.h b/LUFA/Drivers/Peripheral/SerialStream.h index e03ce4128..feadd0a0f 100644 --- a/LUFA/Drivers/Peripheral/SerialStream.h +++ b/LUFA/Drivers/Peripheral/SerialStream.h @@ -70,7 +70,7 @@ extern FILE USARTStream;
/* Function Prototypes: */
- #if defined(INCLUDE_FROM_SERIALSTREAM_C)
+ #if defined(__INCLUDE_FROM_SERIALSTREAM_C)
static int SerialStream_TxByte(char DataByte, FILE *Stream) ATTR_NON_NULL_PTR_ARG(2);
static int SerialStream_RxByte(FILE *Stream) ATTR_NON_NULL_PTR_ARG(1);
#endif
diff --git a/LUFA/Drivers/Peripheral/TWI.h b/LUFA/Drivers/Peripheral/TWI.h index 7432a1691..29c0afe40 100644 --- a/LUFA/Drivers/Peripheral/TWI.h +++ b/LUFA/Drivers/Peripheral/TWI.h @@ -53,8 +53,7 @@ /* Macros: */
#if !defined(__DOXYGEN__)
- #define INCLUDE_FROM_TWI_H
- #define INCLUDE_FROM_CHIP_DRIVER
+ #define __INCLUDE_FROM_TWI_H
#endif
/* Includes: */
|