rename to CFG_TUD_BTH_HISTORICAL_COMPATIBLE, move CFG_TUD_BTH_ISO_ALT_COUNT to tusb_option.h and mandatory for BTH driver
This commit is contained in:
@@ -204,7 +204,9 @@ 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((CFG_TUD_BTH_HISTORICAL_COMPAT && request->bRequest == 0xe0) || (request->bRequest == 0 && request->wValue == 0 && request->wIndex == 0));
|
||||
// also compatible with historical mode if enabled
|
||||
TU_VERIFY((request->bRequest == 0 && request->wValue == 0 && request->wIndex == 0) ||
|
||||
(CFG_TUD_BTH_HISTORICAL_COMPATIBLE && request->bRequest == 0xe0));
|
||||
}
|
||||
else if (request->bmRequestType_bit.recipient == TUSB_REQ_RCPT_INTERFACE)
|
||||
{
|
||||
|
||||
@@ -36,15 +36,15 @@
|
||||
#ifndef CFG_TUD_BTH_EVENT_EPSIZE
|
||||
#define CFG_TUD_BTH_EVENT_EPSIZE 16
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
// Allow BTH class to work in historically compatibility mode where the bRequest is always 0xe0.
|
||||
// See Bluetooth Core v5.3, Vol. 4, Part B, Section 2.2
|
||||
#ifndef CFG_TUD_BTH_HISTORICAL_COMPATIBLE
|
||||
#define CFG_TUD_BTH_HISTORICAL_COMPATIBLE 0
|
||||
#endif
|
||||
|
||||
typedef struct TU_ATTR_PACKED
|
||||
|
||||
Reference in New Issue
Block a user