summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntonio Vázquez Blanco <[email protected]>2023-10-11 10:15:52 +0200
committerAntonio Vázquez Blanco <[email protected]>2023-11-07 17:38:26 +0100
commit8bac68db84ccbf4f9fbd0d6075b6a1b0253c081a (patch)
tree29547768feada6e302fc6963dd2af9e1a65684f9 /src
parentf84eafcaa2138a360e0baf8271b28f45cf120961 (diff)
Add historical EP compatibility to bth class
Diffstat (limited to 'src')
-rwxr-xr-xsrc/class/bth/bth_device.c2
-rwxr-xr-xsrc/class/bth/bth_device.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/class/bth/bth_device.c b/src/class/bth/bth_device.c
index c5c74d26a..be36e8c11 100755
--- a/src/class/bth/bth_device.c
+++ b/src/class/bth/bth_device.c
@@ -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)
{
diff --git a/src/class/bth/bth_device.h b/src/class/bth/bth_device.h
index 921bd7a1a..c23e74bfb 100755
--- a/src/class/bth/bth_device.h
+++ b/src/class/bth/bth_device.h
@@ -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
{