Skip to content

Commit 18a2f2a

Browse files
author
Martino Facchin
committed
enforce single use of HID submodule
1 parent 4210c3d commit 18a2f2a

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

Diff for: libraries/Keyboard/Keyboard.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
#if 1
1+
#if defined(_USING_HID)
2+
3+
#error "Can only attach one submodule to HID module"
4+
5+
#else
6+
7+
#define _USING_HID
28

39
#include "HID.h"
410

Diff for: libraries/Mouse/Mouse.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#ifndef MOUSE_h
22
#define MOUSE_h
33

4-
#if 1 //defined(USBCON)
4+
#if defined(_USING_HID)
5+
6+
#error "Can only attach one submodule to HID module"
7+
8+
#else
9+
10+
#define _USING_HID
511

612
#include "HID.h"
713
//================================================================================

Diff for: libraries/MouseAndKeyboard/MouseAndKeyboard.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#ifndef MOUSEANDKEYBOARD_h
22

3-
#if 1 //defined(USBCON)
3+
#if defined(_USING_HID)
4+
5+
#error "Can only attach one submodule to HID module"
6+
7+
#else
8+
9+
#define _USING_HID
410

511
#include "HID.h"
612
//================================================================================

0 commit comments

Comments
 (0)