diff options
author | NicoHood <NicoHood@users.noreply.github.com> | 2015-10-25 08:24:55 +0100 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-10-30 12:58:14 +0100 |
commit | 1f318b08d4caf73f2b31faa42ef54de33b046f8e (patch) | |
tree | eba4766a1cdf40dbea94efe0bb46597e9a7b3920 /libraries/HID/HID.cpp | |
parent | 8364a0c1a37a4f6f24632f359b7ee161bafa6730 (diff) |
Added return value to HID SendReport
Diffstat (limited to 'libraries/HID/HID.cpp')
-rw-r--r-- | libraries/HID/HID.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp index ce9a6a0..3a42699 100644 --- a/libraries/HID/HID.cpp +++ b/libraries/HID/HID.cpp @@ -86,10 +86,12 @@ void HID_::AppendDescriptor(HIDSubDescriptor *node) descriptorSize += node->length; } -void HID_::SendReport(uint8_t id, const void* data, int len) +int HID_::SendReport(uint8_t id, const void* data, int len) { - USB_Send(pluggedEndpoint, &id, 1); - USB_Send(pluggedEndpoint | TRANSFER_RELEASE, data, len); + int ret = 0; + ret += USB_Send(pluggedEndpoint, &id, 1); + ret += USB_Send(pluggedEndpoint | TRANSFER_RELEASE, data, len); + return ret; } bool HID_::setup(USBSetup& setup) |