Skip to content

Commit dee43a1

Browse files
facchinmcmaglie
authored andcommitted
fix HID headers
1 parent 9074b1e commit dee43a1

File tree

6 files changed

+20
-18
lines changed

6 files changed

+20
-18
lines changed

hardware/arduino/avr/cores/arduino/USBCore.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@
6161
#define MSC_RESET 0xFF
6262
#define MSC_GET_MAX_LUN 0xFE
6363

64-
#define HID_GET_REPORT 0x01
65-
#define HID_GET_IDLE 0x02
66-
#define HID_GET_PROTOCOL 0x03
67-
#define HID_SET_REPORT 0x09
68-
#define HID_SET_IDLE 0x0A
69-
#define HID_SET_PROTOCOL 0x0B
70-
7164
// Descriptors
7265

7366
#define USB_DEVICE_DESC_SIZE 18
@@ -131,11 +124,6 @@
131124
#define MSC_SUBCLASS_SCSI 0x06
132125
#define MSC_PROTOCOL_BULK_ONLY 0x50
133126

134-
#define HID_HID_DESCRIPTOR_TYPE 0x21
135-
#define HID_REPORT_DESCRIPTOR_TYPE 0x22
136-
#define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
137-
138-
139127
// Device
140128
typedef struct {
141129
u8 len; // 18

hardware/arduino/avr/libraries/HID/HID.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@
3131
//================================================================================
3232
// HID 'Driver'
3333

34+
#define HID_GET_REPORT 0x01
35+
#define HID_GET_IDLE 0x02
36+
#define HID_GET_PROTOCOL 0x03
37+
#define HID_SET_REPORT 0x09
38+
#define HID_SET_IDLE 0x0A
39+
#define HID_SET_PROTOCOL 0x0B
40+
41+
#define HID_HID_DESCRIPTOR_TYPE 0x21
42+
#define HID_REPORT_DESCRIPTOR_TYPE 0x22
43+
#define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
44+
3445
class HID_
3546
{
3647
public:

libraries/CompleteHID/CompleteHID.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#if 1 //defined(USBCON)
22

33
#include "CompleteHID.h"
4-
#include "HIDTables.h"
54
#include "HID.h"
65

76
#define HID_MOUSE_ABS_ENABLED

libraries/CompleteHID/CompleteHID.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#ifndef MOUSEANDKEYBOARD_h
1+
#ifndef COMPLETEHID_h
2+
#define COMPLETEHID_h
23

34
#if defined(_USING_HID)
45

libraries/CompleteHID/HIDTables.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef __HIDTables__
2-
#define HID___HIDTables__
2+
#define __HIDTables__
33

44

55
// These mappings were extracted and transcribed from
@@ -453,9 +453,9 @@
453453
#define HID_CONSUMER_CHANNEL_TOP 0x169 // HID type CL
454454
#define HID_CONSUMER_CHANNEL_UNKNOWN 0x16A // HID type CL
455455
// Reserved 0x16B-16F
456-
#define HID_CONSUMER_SUB-CHANNEL 0x170 // HID type LC
457-
#define HID_CONSUMER_SUB-CHANNEL_INCREMENT 0x171 // HID type OSC
458-
#define HID_CONSUMER_SUB-CHANNEL_DECREMENT 0x172 // HID type OSC
456+
#define HID_CONSUMER_SUB_CHANNEL 0x170 // HID type LC
457+
#define HID_CONSUMER_SUB_CHANNEL_INCREMENT 0x171 // HID type OSC
458+
#define HID_CONSUMER_SUB_CHANNEL_DECREMENT 0x172 // HID type OSC
459459
#define HID_CONSUMER_ALTERNATE_AUDIO_INCREMENT 0x173 // HID type OSC
460460
#define HID_CONSUMER_ALTERNATE_AUDIO_DECREMENT 0x174 // HID type OSC
461461
// Reserved 0x175-17F

libraries/Keyboard/Keyboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2020
*/
2121

22+
#ifndef KEYBOARD_h
23+
#define KEYBOARD_h
24+
2225
#if defined(_USING_HID)
2326

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

0 commit comments

Comments
 (0)