Skip to content

Commit

Permalink
Add historical EP compatibility to bth class
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniovazquezblanco committed Nov 7, 2023
1 parent f84eafc commit 8bac68d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/class/bth/bth_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ bool btd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t c
request->bmRequestType_bit.recipient == TUSB_REQ_RCPT_DEVICE)
{
// HCI command packet addressing for single function Primary Controllers
TU_VERIFY(request->bRequest == 0 && request->wValue == 0 && request->wIndex == 0);
TU_VERIFY((CFG_TUD_BTH_HISTORICAL_COMPAT && request->bRequest == 0xe0) || (request->bRequest == 0 && request->wValue == 0 && request->wIndex == 0));
}
else if (request->bmRequestType_bit.recipient == TUSB_REQ_RCPT_INTERFACE)
{
Expand Down
7 changes: 7 additions & 0 deletions src/class/bth/bth_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
#ifndef CFG_TUD_BTH_DATA_EPSIZE
#define CFG_TUD_BTH_DATA_EPSIZE 64
#endif
#ifndef CFG_TUD_BTH_HISTORICAL_COMPAT
#define CFG_TUD_BTH_HISTORICAL_COMPAT 0
#endif
#ifndef CFG_TUD_BTH_ISO_ALT_COUNT
// See Bluetooth Core v5.3, Vol. 4, Part B, Section 2.1
#error You must tell the driver the number of ISO endpoints to use
#endif

typedef struct TU_ATTR_PACKED
{
Expand Down

0 comments on commit 8bac68d

Please sign in to comment.