Commit d49cc0f7 authored by Dean Camera's avatar Dean Camera
Browse files

Add more include protection macros to give the user warnings when they try to...

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.
parent 3a2c1db6
...@@ -636,8 +636,7 @@ EXCLUDE_PATTERNS = ...@@ -636,8 +636,7 @@ EXCLUDE_PATTERNS =
# wildcard * is used, a substring. Examples: ANamespace, AClass, # wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test # AClass::ANamespace, ANamespace::*Test
EXCLUDE_SYMBOLS = __* \ EXCLUDE_SYMBOLS = __*
INCLUDE_FROM_*
# The EXAMPLE_PATH tag can be used to specify one or more files or # The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see # directories that contain example code fragments that are included (see
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_BUTTONS_H) #if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif #endif
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
// TODO: Add any required includes here // TODO: Add any required includes here
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_DATAFLASH_H) #if !defined(__INCLUDE_FROM_DATAFLASH_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Dataflash.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Dataflash.h instead.
#endif #endif
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_JOYSTICK_H) #if !defined(__INCLUDE_FROM_JOYSTICK_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Joystick.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Joystick.h instead.
#endif #endif
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_LEDS_H) #if !defined(__INCLUDE_FROM_LEDS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
#endif #endif
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_BUTTONS_H) #if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif #endif
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_LEDS_H) #if !defined(__INCLUDE_FROM_LEDS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
#endif #endif
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_BUTTONS_H) #if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif #endif
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_JOYSTICK_H) #if !defined(__INCLUDE_FROM_JOYSTICK_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Joystick.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Joystick.h instead.
#endif #endif
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_LEDS_H) #if !defined(__INCLUDE_FROM_LEDS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
#endif #endif
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
/* Macros: */ /* Macros: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
#define __INCLUDE_FROM_BUTTONS_H
#define INCLUDE_FROM_BUTTONS_H #define INCLUDE_FROM_BUTTONS_H
#endif #endif
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
/* Macros: */ /* Macros: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
#define __INCLUDE_FROM_DATAFLASH_H
#define INCLUDE_FROM_DATAFLASH_H #define INCLUDE_FROM_DATAFLASH_H
#endif #endif
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_BUTTONS_H) #if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif #endif
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "AT45DB321C.h" #include "AT45DB321C.h"
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_DATAFLASH_H) #if !defined(__INCLUDE_FROM_DATAFLASH_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Dataflash.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Dataflash.h instead.
#endif #endif
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_JOYSTICK_H) #if !defined(__INCLUDE_FROM_JOYSTICK_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Joystick.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Joystick.h instead.
#endif #endif
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_LEDS_H) #if !defined(__INCLUDE_FROM_LEDS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
#endif #endif
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
/* Macros: */ /* Macros: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
#define __INCLUDE_FROM_JOYSTICK_H
#define INCLUDE_FROM_JOYSTICK_H #define INCLUDE_FROM_JOYSTICK_H
#endif #endif
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
/* Macros: */ /* Macros: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
#define __INCLUDE_FROM_LEDS_H
#define INCLUDE_FROM_LEDS_H #define INCLUDE_FROM_LEDS_H
#endif #endif
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_LEDS_H) #if !defined(__INCLUDE_FROM_LEDS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
#endif #endif
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(INCLUDE_FROM_BUTTONS_H) #if !defined(__INCLUDE_FROM_BUTTONS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment