hci: add ENABLE_LE_ENHANCED_CONNECTION_COMPLETE_EVENT

This commit is contained in:
Matthias Ringwald 2023-11-23 15:06:40 +01:00
parent 028ead5ee6
commit 5d6688b0c0
2 changed files with 6 additions and 1 deletions

View File

@ -98,11 +98,12 @@ BTstack properties:
| ENABLE_LE_PERIPHERAL | Enable support for LE Peripheral Role in HCI and Security Manager |
| ENABLE_LE_CENTRAL | Enable support for LE Central Role in HCI and Security Manager |
| ENABLE_LE_SECURE_CONNECTIONS | Enable LE Secure Connections |
| ENABLE_LE_SECURE_CONNECTIONS_DEBUG_KEY | Enable support for LE Secure Connection debug keys for testing |
| ENABLE_LE_SECURE_CONNECTIONS_DEBUG_KEY | Enable support for LE Secure Connection debug keys for testing |
| ENABLE_LE_PROACTIVE_AUTHENTICATION | Enable automatic encryption for bonded devices on re-connect |
| ENABLE_GATT_CLIENT_PAIRING | Enable GATT Client to start pairing and retry operation on security error |
| ENABLE_MICRO_ECC_FOR_LE_SECURE_CONNECTIONS | Use [micro-ecc library](https://github.com/kmackay/micro-ecc) for ECC operations |
| ENABLE_LE_DATA_LENGTH_EXTENSION | Enable LE Data Length Extension support |
| ENABLE_LE_ENHANCED_CONNECTION_COMPLETE_EVENT | Enable LE Enhanced Connection Complete Event v1 & v2 |
| ENABLE_LE_EXTENDED_ADVERTISING | Enable extended advertising and scanning |
| ENABLE_LE_PERIODIC_ADVERTISING | Enable periodic advertising and scanning |
| ENABLE_LE_SIGNED_WRITE | Enable LE Signed Writes in ATT/GATT |

View File

@ -2272,7 +2272,11 @@ static void hci_initializing_run(void){
case HCI_INIT_LE_SET_EVENT_MASK:
if (hci_le_supported()){
hci_stack->substate = HCI_INIT_W4_LE_SET_EVENT_MASK;
#ifdef ENABLE_LE_ENHANCED_CONNECTION_COMPLETE_EVENT
hci_send_cmd(&hci_le_set_event_mask, 0xffffffff, 0x07); // all events from core v5.3
#else
hci_send_cmd(&hci_le_set_event_mask, 0xfffffdff, 0x07); // all events from core v5.3 without LE Enhanced Connection Complete
#endif
break;
}
#endif