mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Add a ParseBTHIDControlData virtual method similar to ParseBTHIDData,
for reports that are sent through the control pipe. This happens for instance in response to a GET_REPORT.
This commit is contained in:
parent
cd87628af4
commit
f075ea3025
2 changed files with 11 additions and 0 deletions
|
@ -215,6 +215,10 @@ void BTHID::ACLData(uint8_t* l2capinbuf) {
|
||||||
Notify(PSTR(" "), 0x80);
|
Notify(PSTR(" "), 0x80);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if(l2capinbuf[8] == 0xA3) {
|
||||||
|
uint16_t length = ((uint16_t)l2capinbuf[5] << 8 | l2capinbuf[4]);
|
||||||
|
ParseBTHIDControlData((uint8_t)(length - 1), &l2capinbuf[9]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef EXTRADEBUG
|
#ifdef EXTRADEBUG
|
||||||
else {
|
else {
|
||||||
|
|
7
BTHID.h
7
BTHID.h
|
@ -125,6 +125,13 @@ protected:
|
||||||
virtual void ParseBTHIDData(uint8_t len __attribute__((unused)), uint8_t *buf __attribute__((unused))) {
|
virtual void ParseBTHIDData(uint8_t len __attribute__((unused)), uint8_t *buf __attribute__((unused))) {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Same as ParseBTHIDData for reports that are sent through the
|
||||||
|
* interrupt pipe (in response to a GET_REPORT).
|
||||||
|
*/
|
||||||
|
virtual void ParseBTHIDControlData(uint8_t len __attribute__((unused)), uint8_t *buf __attribute__((unused))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/** Called when a device is connected */
|
/** Called when a device is connected */
|
||||||
virtual void OnInitBTHID() {
|
virtual void OnInitBTHID() {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue