mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Added return value to HID SendReport
This commit is contained in:
parent
0e0c50d3bc
commit
cf4d7e1ffb
@ -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)
|
||||
|
@ -88,7 +88,7 @@ class HID_ : public PluggableUSBModule
|
||||
public:
|
||||
HID_(void);
|
||||
int begin(void);
|
||||
void SendReport(uint8_t id, const void* data, int len);
|
||||
int SendReport(uint8_t id, const void* data, int len);
|
||||
void AppendDescriptor(HIDSubDescriptor* node);
|
||||
|
||||
protected:
|
||||
|
Loading…
x
Reference in New Issue
Block a user