mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Merge pull request #517 from fraca7/control-report-callback
Add a ParseBTHIDControlData virtual method similar to ParseBTHIDData,
This commit is contained in:
commit
23ba34da47
2 changed files with 11 additions and 0 deletions
|
@ -366,6 +366,10 @@ void BTHID::ACLData(uint8_t* l2capinbuf) {
|
|||
Notify(PSTR(" "), 0x80);
|
||||
}
|
||||
#endif
|
||||
if(l2capinbuf[8] == 0xA3) {
|
||||
uint16_t length = ((uint16_t)l2capinbuf[5] << 8 | l2capinbuf[4]);
|
||||
ParseBTHIDControlData((uint8_t)(length - 1), &l2capinbuf[9]);
|
||||
}
|
||||
}
|
||||
#ifdef EXTRADEBUG
|
||||
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))) {
|
||||
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 */
|
||||
virtual void OnInitBTHID() {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue