mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
#217 Include endpoint in ParseHIDData
This commit is contained in:
parent
1fe606aa22
commit
a3b8e8d00b
3 changed files with 4 additions and 5 deletions
|
@ -13,7 +13,7 @@ public:
|
||||||
HIDSelector(USB *p) : HIDComposite(p) {};
|
HIDSelector(USB *p) : HIDComposite(p) {};
|
||||||
|
|
||||||
protected:
|
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);
|
bool SelectInterface(uint8_t iface, uint8_t proto);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ bool HIDSelector::SelectInterface(uint8_t iface, uint8_t proto)
|
||||||
return false;
|
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 1
|
||||||
if (len && buf) {
|
if (len && buf) {
|
||||||
Notify(PSTR("\r\n"), 0x80);
|
Notify(PSTR("\r\n"), 0x80);
|
||||||
|
@ -65,4 +65,3 @@ void loop()
|
||||||
{
|
{
|
||||||
Usb.Task();
|
Usb.Task();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -399,7 +399,7 @@ uint8_t HIDComposite::Poll() {
|
||||||
|
|
||||||
Notify(PSTR("\r\n"), 0x80);
|
Notify(PSTR("\r\n"), 0x80);
|
||||||
#endif
|
#endif
|
||||||
ParseHIDData(this, bHasReportId, (uint8_t)read, buf);
|
ParseHIDData(this, bHasReportId, epInfo[index].epAddr, (uint8_t)read, buf);
|
||||||
|
|
||||||
HIDReportParser *prs = GetReportParser(((bHasReportId) ? *buf : 0));
|
HIDReportParser *prs = GetReportParser(((bHasReportId) ? *buf : 0));
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ protected:
|
||||||
return 0;
|
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;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue