File tree 2 files changed +10
-19
lines changed
hardware/arduino/avr/libraries/HID/src
2 files changed +10
-19
lines changed Original file line number Diff line number Diff line change @@ -106,17 +106,9 @@ bool HID_::setup(USBSetup& setup)
106
106
107
107
if (requestType == REQUEST_DEVICETOHOST_CLASS_INTERFACE)
108
108
{
109
- if (request == HID_GET_REPORT) {
110
- // TODO: HID_GetReport();
109
+ if (request == HID_GET_REPORT || request == HID_GET_PROTOCOL)
111
110
return true ;
112
111
}
113
- if (request == HID_GET_PROTOCOL) {
114
- // TODO: Send8(protocol);
115
- return true ;
116
- }
117
- if (request == HID_GET_IDLE) {
118
- // TODO: Send8(idle);
119
- }
120
112
}
121
113
122
114
if (requestType == REQUEST_HOSTTODEVICE_CLASS_INTERFACE)
@@ -131,16 +123,6 @@ bool HID_::setup(USBSetup& setup)
131
123
idle = setup.wValueL ;
132
124
return true ;
133
125
}
134
- if (request == HID_SET_REPORT)
135
- {
136
- // uint8_t reportID = setup.wValueL;
137
- // uint16_t length = setup.wLength;
138
- // uint8_t data[length];
139
- // Make sure to not read more data than USB_EP_SIZE.
140
- // You can read multiple times through a loop.
141
- // The first byte (may!) contain the reportID on a multreport.
142
- // USB_RecvControl(data, length);
143
- }
144
126
}
145
127
146
128
return false ;
Original file line number Diff line number Diff line change 23
23
#include < Arduino.h>
24
24
#include " PluggableUSB.h"
25
25
26
+ // The HID class provided in this library is a basic mechanism, designed to let enthusiasts get
27
+ // a quick start with their projects. If you need more than what's implemented here (such as
28
+ // bi-directional communication with the host), then you should investigate other user-contributed
29
+ // libraries. In particular, have a look at: https://github.com/NicoHood/HID/wiki.
30
+ // This library contains a number of implementations for Mice, Keyboards and game controllers,
31
+ // perhaps one will work directly for you. If not, there are also base classes that you can use
32
+ // to get a jump-start on your design.
33
+
26
34
#if defined(USBCON)
27
35
28
36
#define _USING_HID
@@ -88,6 +96,7 @@ class HIDSubDescriptor {
88
96
const uint16_t length;
89
97
};
90
98
99
+
91
100
class HID_ : public PluggableUSBModule
92
101
{
93
102
public:
You can’t perform that action at this time.
0 commit comments