Skip to content

Commit 2e951a5

Browse files
cmagliemattairtech
authored andcommitted
Update HID API
1 parent 0c7945b commit 2e951a5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libraries/HID/HID.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ void HID_::AppendDescriptor(HIDSubDescriptor *node)
8484
descriptorSize += node->length;
8585
}
8686

87-
void HID_::SendReport(uint8_t id, const void* data, int len)
87+
int HID_::SendReport(uint8_t id, const void* data, int len)
8888
{
8989
uint8_t p[64];
9090
p[0] = id;
9191
memcpy(&p[1], data, len);
92-
USBDevice.send(pluggedEndpoint, p, len+1);
92+
return USBDevice.send(pluggedEndpoint, p, len+1);
9393
}
9494

9595
bool HID_::setup(USBSetup& setup)

libraries/HID/HID.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class HID_ : public PluggableUSBModule
8888
public:
8989
HID_(void);
9090
int begin(void);
91-
void SendReport(uint8_t id, const void* data, int len);
91+
int SendReport(uint8_t id, const void* data, int len);
9292
void AppendDescriptor(HIDSubDescriptor* node);
9393

9494
protected:

0 commit comments

Comments
 (0)