Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

‎libraries/Keyboard/Keyboard.h‎

Lines changed: 7 additions & 1 deletion
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

‎libraries/Mouse/Mouse.h‎

Lines changed: 7 additions & 1 deletion
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
//================================================================================

‎libraries/MouseAndKeyboard/MouseAndKeyboard.h‎

Lines changed: 7 additions & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /