Skip to content

Commit

Permalink
enforce single use of HID submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Martino Facchin committed Jun 23, 2015
1 parent 4210c3d commit 18a2f2a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion libraries/Keyboard/Keyboard.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#if 1
#if defined(_USING_HID)

#error "Can only attach one submodule to HID module"

#else

#define _USING_HID

#include "HID.h"

Expand Down
8 changes: 7 additions & 1 deletion libraries/Mouse/Mouse.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,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"
//================================================================================
Expand Down
8 changes: 7 additions & 1 deletion libraries/MouseAndKeyboard/MouseAndKeyboard.h
Original file line number Diff line number Diff line change
@@ -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"
//================================================================================
Expand Down

0 comments on commit 18a2f2a

Please sign in to comment.