File tree Expand file tree Collapse file tree 6 files changed +21
-18
lines changed Expand file tree Collapse file tree 6 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 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
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
140128typedef struct {
141129 u8 len ; // 18
Original file line number Diff line number Diff line change 2929// ================================================================================
3030// HID 'Driver'
3131
32+ #define HID_GET_REPORT 0x01
33+ #define HID_GET_IDLE 0x02
34+ #define HID_GET_PROTOCOL 0x03
35+ #define HID_SET_REPORT 0x09
36+ #define HID_SET_IDLE 0x0A
37+ #define HID_SET_PROTOCOL 0x0B
38+
39+ #define HID_HID_DESCRIPTOR_TYPE 0x21
40+ #define HID_REPORT_DESCRIPTOR_TYPE 0x22
41+ #define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
42+
3243class HID_
3344{
3445public:
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1- #ifndef MOUSEANDKEYBOARD_h
1+ #ifndef COMPLETEHID_h
2+ #define COMPLETEHID_h
23
34#if defined(_USING_HID)
45
Original file line number Diff line number Diff line change 11#ifndef __HIDTables__
2- #define HID___HIDTables__
2+ #define __HIDTables__
33
44
55// These mappings were extracted and transcribed from
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
Original file line number Diff line number Diff line change 1+ #ifndef KEYBOARD_h
2+ #define KEYBOARD_h
3+
14#if defined(_USING_HID)
25
36#error "Can only attach one submodule to HID module"
@@ -73,4 +76,5 @@ class Keyboard_ : public Print
7376};
7477extern Keyboard_ Keyboard;
7578
79+ #endif
7680#endif
You can’t perform that action at this time.
0 commit comments