diff --git a/examples/HID/USBHIDMultimediaKbd/USBHIDMultimediaKbd.ino b/examples/HID/USBHIDMultimediaKbd/USBHIDMultimediaKbd.ino index ed293b76..23a4f3d7 100644 --- a/examples/HID/USBHIDMultimediaKbd/USBHIDMultimediaKbd.ino +++ b/examples/HID/USBHIDMultimediaKbd/USBHIDMultimediaKbd.ino @@ -13,7 +13,7 @@ public: HIDSelector(USB *p) : HIDComposite(p) {}; protected: - void ParseHIDData(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); // Called by the HIDComposite library + void ParseHIDData(USBHID *hid, uint8_t ep, bool is_rpt_id, uint8_t len, uint8_t *buf); // Called by the HIDComposite library bool SelectInterface(uint8_t iface, uint8_t proto); }; @@ -25,7 +25,7 @@ bool HIDSelector::SelectInterface(uint8_t iface, uint8_t proto) return false; } -void HIDSelector::ParseHIDData(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) { +void HIDSelector::ParseHIDData(USBHID *hid, uint8_t ep, bool is_rpt_id, uint8_t len, uint8_t *buf) { #if 1 if (len && buf) { Notify(PSTR("\r\n"), 0x80); @@ -65,4 +65,3 @@ void loop() { Usb.Task(); } - diff --git a/hidcomposite.cpp b/hidcomposite.cpp index 31822bc0..266610ec 100644 --- a/hidcomposite.cpp +++ b/hidcomposite.cpp @@ -399,7 +399,7 @@ uint8_t HIDComposite::Poll() { Notify(PSTR("\r\n"), 0x80); #endif - ParseHIDData(this, bHasReportId, (uint8_t)read, buf); + ParseHIDData(this, bHasReportId, epInfo[index].epAddr, (uint8_t)read, buf); HIDReportParser *prs = GetReportParser(((bHasReportId) ? *buf : 0)); diff --git a/hidcomposite.h b/hidcomposite.h index 8c8400db..6abd7933 100644 --- a/hidcomposite.h +++ b/hidcomposite.h @@ -72,7 +72,7 @@ protected: return 0; }; - virtual void ParseHIDData(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) { + virtual void ParseHIDData(USBHID *hid, uint8_t ep, bool is_rpt_id, uint8_t len, uint8_t *buf) { return; };