diff --git a/libraries/Keyboard/Keyboard.h b/libraries/Keyboard/Keyboard.h index 66bf9b6a1..6bfa0b853 100644 --- a/libraries/Keyboard/Keyboard.h +++ b/libraries/Keyboard/Keyboard.h @@ -19,7 +19,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if 1 +#if defined(_USING_HID) + +#error "Can only attach one submodule to HID module" + +#else + +#define _USING_HID #include "HID.h" diff --git a/libraries/Mouse/Mouse.h b/libraries/Mouse/Mouse.h index 34245662f..50f00a548 100644 --- a/libraries/Mouse/Mouse.h +++ b/libraries/Mouse/Mouse.h @@ -22,7 +22,13 @@ #ifndef MOUSE_h #define MOUSE_h -#if 1 //defined(USBCON) +#if defined(_USING_HID) + +#error "Can only attach one submodule to HID module" + +#else + +#define _USING_HID #include "HID.h" //================================================================================ diff --git a/libraries/MouseAndKeyboard/MouseAndKeyboard.h b/libraries/MouseAndKeyboard/MouseAndKeyboard.h index b83382c55..0c67206a2 100644 --- a/libraries/MouseAndKeyboard/MouseAndKeyboard.h +++ b/libraries/MouseAndKeyboard/MouseAndKeyboard.h @@ -1,6 +1,12 @@ #ifndef MOUSEANDKEYBOARD_h -#if 1 //defined(USBCON) +#if defined(_USING_HID) + +#error "Can only attach one submodule to HID module" + +#else + +#define _USING_HID #include "HID.h" //================================================================================