Skip to content

Commit 5cfc4c8

Browse files
committed
[HID] Added return value to HID SendReport (sam core)
1 parent cf6494b commit 5cfc4c8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libraries/HID/HID.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ void HID_::AppendDescriptor(HIDSubDescriptor *node)
8181
descriptorSize += node->length;
8282
}
8383

84-
void HID_::SendReport(uint8_t id, const void* data, int len)
84+
int HID_::SendReport(uint8_t id, const void* data, int len)
8585
{
8686
uint8_t p[64];
8787
p[0] = id;
8888
memcpy(&p[1], data, len);
89-
USBD_Send(pluggedEndpoint, p, len+1);
89+
return USBD_Send(pluggedEndpoint, p, len+1);
9090
}
9191

9292
bool HID_::setup(USBSetup& setup)

libraries/HID/HID.h

+1-1
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)