diff --git a/hardware/arduino/avr/cores/arduino/USBCore.h b/hardware/arduino/avr/cores/arduino/USBCore.h index c19d68a42..66f8c05f1 100644 --- a/hardware/arduino/avr/cores/arduino/USBCore.h +++ b/hardware/arduino/avr/cores/arduino/USBCore.h @@ -61,13 +61,6 @@ #define MSC_RESET 0xFF #define MSC_GET_MAX_LUN 0xFE -#define HID_GET_REPORT 0x01 -#define HID_GET_IDLE 0x02 -#define HID_GET_PROTOCOL 0x03 -#define HID_SET_REPORT 0x09 -#define HID_SET_IDLE 0x0A -#define HID_SET_PROTOCOL 0x0B - // Descriptors #define USB_DEVICE_DESC_SIZE 18 @@ -131,11 +124,6 @@ #define MSC_SUBCLASS_SCSI 0x06 #define MSC_PROTOCOL_BULK_ONLY 0x50 -#define HID_HID_DESCRIPTOR_TYPE 0x21 -#define HID_REPORT_DESCRIPTOR_TYPE 0x22 -#define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23 - - // Device typedef struct { u8 len; // 18 diff --git a/hardware/arduino/avr/libraries/HID/HID.h b/hardware/arduino/avr/libraries/HID/HID.h index fe8ee092a..5bd137cd6 100644 --- a/hardware/arduino/avr/libraries/HID/HID.h +++ b/hardware/arduino/avr/libraries/HID/HID.h @@ -31,6 +31,17 @@ //================================================================================ // HID 'Driver' +#define HID_GET_REPORT 0x01 +#define HID_GET_IDLE 0x02 +#define HID_GET_PROTOCOL 0x03 +#define HID_SET_REPORT 0x09 +#define HID_SET_IDLE 0x0A +#define HID_SET_PROTOCOL 0x0B + +#define HID_HID_DESCRIPTOR_TYPE 0x21 +#define HID_REPORT_DESCRIPTOR_TYPE 0x22 +#define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23 + class HID_ { public: diff --git a/libraries/CompleteHID/CompleteHID.cpp b/libraries/CompleteHID/CompleteHID.cpp index 7c427ad95..b177adebe 100644 --- a/libraries/CompleteHID/CompleteHID.cpp +++ b/libraries/CompleteHID/CompleteHID.cpp @@ -1,7 +1,6 @@ #if 1 //defined(USBCON) #include "CompleteHID.h" -#include "HIDTables.h" #include "HID.h" #define HID_MOUSE_ABS_ENABLED diff --git a/libraries/CompleteHID/CompleteHID.h b/libraries/CompleteHID/CompleteHID.h index bc6c94985..fc55747ca 100644 --- a/libraries/CompleteHID/CompleteHID.h +++ b/libraries/CompleteHID/CompleteHID.h @@ -1,4 +1,5 @@ -#ifndef MOUSEANDKEYBOARD_h +#ifndef COMPLETEHID_h +#define COMPLETEHID_h #if defined(_USING_HID) diff --git a/libraries/CompleteHID/HIDTables.h b/libraries/CompleteHID/HIDTables.h index a00de5faf..2e62c3d2e 100644 --- a/libraries/CompleteHID/HIDTables.h +++ b/libraries/CompleteHID/HIDTables.h @@ -1,5 +1,5 @@ #ifndef __HIDTables__ -#define HID___HIDTables__ +#define __HIDTables__ // These mappings were extracted and transcribed from @@ -453,9 +453,9 @@ #define HID_CONSUMER_CHANNEL_TOP 0x169 // HID type CL #define HID_CONSUMER_CHANNEL_UNKNOWN 0x16A // HID type CL // Reserved 0x16B-16F -#define HID_CONSUMER_SUB-CHANNEL 0x170 // HID type LC -#define HID_CONSUMER_SUB-CHANNEL_INCREMENT 0x171 // HID type OSC -#define HID_CONSUMER_SUB-CHANNEL_DECREMENT 0x172 // HID type OSC +#define HID_CONSUMER_SUB_CHANNEL 0x170 // HID type LC +#define HID_CONSUMER_SUB_CHANNEL_INCREMENT 0x171 // HID type OSC +#define HID_CONSUMER_SUB_CHANNEL_DECREMENT 0x172 // HID type OSC #define HID_CONSUMER_ALTERNATE_AUDIO_INCREMENT 0x173 // HID type OSC #define HID_CONSUMER_ALTERNATE_AUDIO_DECREMENT 0x174 // HID type OSC // Reserved 0x175-17F diff --git a/libraries/Keyboard/Keyboard.h b/libraries/Keyboard/Keyboard.h index 6bfa0b853..475b3c168 100644 --- a/libraries/Keyboard/Keyboard.h +++ b/libraries/Keyboard/Keyboard.h @@ -19,6 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef KEYBOARD_h +#define KEYBOARD_h + #if defined(_USING_HID) #error "Can only attach one submodule to HID module"