1 // Copyright 2023 The Pigweed Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14
15 #pragma once
16 #include <pw_bluetooth/hci_common.emb.h>
17 #include <pw_bluetooth/hci_events.emb.h>
18
19 #include <array>
20 #include <cstdint>
21
22 #include "pw_bluetooth_sapphire/internal/host/common/device_address.h"
23 #include "pw_bluetooth_sapphire/internal/host/common/device_class.h"
24 #include "pw_bluetooth_sapphire/internal/host/common/macros.h"
25 #include "pw_bluetooth_sapphire/internal/host/common/uint128.h"
26 #include "pw_bluetooth_sapphire/internal/host/hci-spec/constants.h"
27
28 // This file contains general opcode/number and static packet definitions for
29 // the Bluetooth Host-Controller Interface. Each packet payload structure
30 // contains parameter descriptions based on their respective documentation in
31 // the Bluetooth Core Specification version 5.0
32 //
33 // NOTE: Avoid casting raw buffer pointers to the packet payload structure types
34 // below; use as template parameter to PacketView::payload(), or
35 // MutableBufferView::mutable_payload() instead. Take extra care when accessing
36 // flexible array members.
37
38 namespace bt::hci_spec {
39
40 using pw::bluetooth::emboss::ConnectionRole;
41 using pw::bluetooth::emboss::GenericEnableParam;
42 using pw::bluetooth::emboss::StatusCode;
43
44 // HCI opcode as used in command packets.
45 using OpCode = uint16_t;
46
47 // HCI event code as used in event packets.
48 using EventCode = uint8_t;
49
50 // Data Connection Handle used for ACL and SCO logical link connections.
51 using ConnectionHandle = uint16_t;
52
53 // Handle used to identify an advertising set used in the 5.0 Extended
54 // Advertising feature.
55 using AdvertisingHandle = uint8_t;
56
57 // Handle used to identify a periodic advertiser used in the 5.0 Periodic
58 // Advertising feature.
59 using PeriodicAdvertiserHandle = uint16_t;
60
61 // Uniquely identifies a CIG (Connected Isochronous Group) in the context of an
62 // LE connection.
63 using CigIdentifier = uint8_t;
64
65 // Uniquely identifies a CIS (Connected Isochronous Stream) in the context of a
66 // CIG and an LE connection.
67 using CisIdentifier = uint8_t;
68
69 // Returns the OGF (OpCode Group Field) which occupies the upper 6-bits of the
70 // opcode.
GetOGF(const OpCode opcode)71 inline uint8_t GetOGF(const OpCode opcode) { return opcode >> 10; }
72
73 // Returns the OCF (OpCode Command Field) which occupies the lower 10-bits of
74 // the opcode.
GetOCF(const OpCode opcode)75 inline uint16_t GetOCF(const OpCode opcode) { return opcode & 0x3FF; }
76
77 // Returns the opcode based on the given OGF and OCF fields.
DefineOpCode(const uint8_t ogf,const uint16_t ocf)78 constexpr OpCode DefineOpCode(const uint8_t ogf, const uint16_t ocf) {
79 return static_cast<uint16_t>(((ogf & 0x3F) << 10) | (ocf & 0x03FF));
80 }
81
82 // ========================= HCI packet headers ==========================
83 // NOTE(armansito): The definitions below are incomplete since they get added as
84 // needed. This list will grow as we support more features.
85
86 struct CommandHeader {
87 uint16_t opcode;
88 uint8_t parameter_total_size;
89 } __attribute__((packed));
90
91 struct EventHeader {
92 uint8_t event_code;
93 uint8_t parameter_total_size;
94 } __attribute__((packed));
95
96 struct ACLDataHeader {
97 // The first 16-bits contain the following fields, in order:
98 // - 12-bits: Connection Handle
99 // - 2-bits: Packet Boundary Flags
100 // - 2-bits: Broadcast Flags
101 uint16_t handle_and_flags;
102
103 // Length of data following the header.
104 uint16_t data_total_length;
105 } __attribute__((packed));
106
107 struct IsoDataHeader {
108 // The first 16-bits contain the following fields, in order:
109 // - 12-bits: Connection Handle
110 // - 2-bits: Packet Boundary Flags
111 // - 1-bit: Timestamp Flag
112 uint16_t handle_and_flags;
113
114 // Length of data following the header.
115 uint16_t data_total_length;
116 } __attribute__((packed));
117
118 struct SynchronousDataHeader {
119 // The first 16-bits contain the following fields, in order:
120 // - 12-bits: Connection Handle
121 // - 2-bits: Packet Status Flag
122 // - 2-bits: RFU
123 uint16_t handle_and_flags;
124
125 // Length of the data following the header.
126 uint8_t data_total_length;
127 } __attribute__((packed));
128
129 // ============= HCI Command and Event (op)code and payloads =============
130
131 // No-Op
132 constexpr OpCode kNoOp = 0x0000;
133
134 // The following is a list of HCI command and event declarations sorted by OGF
135 // category. Within each category the commands are sorted by their OCF. Each
136 // declaration is preceded by the name of the command or event followed by the
137 // Bluetooth Core Specification version in which it was introduced. Commands
138 // that apply to a specific Bluetooth sub-technology
139 // (e.g. BR/EDR, LE, AMP) will also contain that definition.
140 //
141 // NOTE(armansito): This list is incomplete. Entries will be added as needed.
142
143 // ======= Link Control Commands =======
144 // Core Spec v5.0, Vol 2, Part E, Section 7.1
145 constexpr uint8_t kLinkControlOGF = 0x01;
LinkControlOpCode(const uint16_t ocf)146 constexpr OpCode LinkControlOpCode(const uint16_t ocf) {
147 return DefineOpCode(kLinkControlOGF, ocf);
148 }
149
150 // ===============================
151 // Inquiry Command (v1.1) (BR/EDR)
152 constexpr OpCode kInquiry = LinkControlOpCode(0x0001);
153
154 // ======================================
155 // Inquiry Cancel Command (v1.1) (BR/EDR)
156 constexpr OpCode kInquiryCancel = LinkControlOpCode(0x0002);
157
158 // Inquiry Cancel Command has no command parameters.
159
160 // =================================
161 // Create Connection (v1.1) (BR/EDR)
162 constexpr OpCode kCreateConnection = LinkControlOpCode(0x0005);
163
164 // =======================================
165 // Disconnect Command (v1.1) (BR/EDR & LE)
166 constexpr OpCode kDisconnect = LinkControlOpCode(0x0006);
167
168 // ========================================
169 // Create Connection Cancel (v1.1) (BR/EDR)
170 constexpr OpCode kCreateConnectionCancel = LinkControlOpCode(0x0008);
171
172 // =========================================
173 // Accept Connection Request (v1.1) (BR/EDR)
174 constexpr OpCode kAcceptConnectionRequest = LinkControlOpCode(0x0009);
175
176 // =========================================
177 // Reject Connection Request (v1.1) (BR/EDR)
178 constexpr OpCode kRejectConnectionRequest = LinkControlOpCode(0x000A);
179
180 // ==============================================
181 // Link Key Request Reply Command (v1.1) (BR/EDR)
182 constexpr OpCode kLinkKeyRequestReply = LinkControlOpCode(0x000B);
183
184 constexpr size_t kBrEdrLinkKeySize = 16;
185
186 // =======================================================
187 // Link Key Request Negative Reply Command (v1.1) (BR/EDR)
188 constexpr OpCode kLinkKeyRequestNegativeReply = LinkControlOpCode(0x000C);
189
190 // =======================================================
191 // PIN Code Request Reply Command (v1.1) (BR/EDR)
192 constexpr OpCode kPinCodeRequestReply = LinkControlOpCode(0x000D);
193
194 // =======================================================
195 // PIN Code Request Negative Reply Command (v1.1) (BR/EDR)
196 constexpr OpCode kPinCodeRequestNegativeReply = LinkControlOpCode(0x000E);
197
198 // ================================================
199 // Authentication Requested Command (v1.1) (BR/EDR)
200 constexpr OpCode kAuthenticationRequested = LinkControlOpCode(0x0011);
201
202 // =================================================
203 // Set Connection Encryption Command (v1.1) (BR/EDR)
204 constexpr OpCode kSetConnectionEncryption = LinkControlOpCode(0x0013);
205
206 // ============================================================
207 // Remote Name Request Command (v1.1) (BR/EDR)
208 constexpr OpCode kRemoteNameRequest = LinkControlOpCode(0x0019);
209
210 // ======================================================
211 // Read Remote Supported Features Command (v1.1) (BR/EDR)
212 constexpr OpCode kReadRemoteSupportedFeatures = LinkControlOpCode(0x001B);
213
214 // =====================================================
215 // Read Remote Extended Features Command (v1.2) (BR/EDR)
216 constexpr OpCode kReadRemoteExtendedFeatures = LinkControlOpCode(0x001C);
217
218 // ============================================================
219 // Read Remote Version Information Command (v1.1) (BR/EDR & LE)
220 constexpr OpCode kReadRemoteVersionInfo = LinkControlOpCode(0x001D);
221
222 // =============================================
223 // Reject Synchronous Connection Command (BR/EDR)
224 constexpr OpCode kRejectSynchronousConnectionRequest =
225 LinkControlOpCode(0x002A);
226
227 // =========================================================
228 // IO Capability Request Reply Command (v2.1 + EDR) (BR/EDR)
229 constexpr OpCode kIOCapabilityRequestReply = LinkControlOpCode(0x002B);
230
231 // =============================================================
232 // User Confirmation Request Reply Command (v2.1 + EDR) (BR/EDR)
233 constexpr OpCode kUserConfirmationRequestReply = LinkControlOpCode(0x002C);
234
235 // ======================================================================
236 // User Confirmation Request Negative Reply Command (v2.1 + EDR) (BR/EDR)
237 constexpr OpCode kUserConfirmationRequestNegativeReply =
238 LinkControlOpCode(0x002D);
239
240 // ========================================================
241 // User Passkey Request Reply Command (v2.1 + EDR) (BR/EDR)
242 constexpr OpCode kUserPasskeyRequestReply = LinkControlOpCode(0x002E);
243
244 // =================================================================
245 // User Passkey Request Negative Reply Command (v2.1 + EDR) (BR/EDR)
246 constexpr OpCode kUserPasskeyRequestNegativeReply = LinkControlOpCode(0x002F);
247
248 // ==================================================================
249 // IO Capability Request Negative Reply Command (v2.1 + EDR) (BR/EDR)
250 constexpr OpCode kIOCapabilityRequestNegativeReply = LinkControlOpCode(0x0034);
251
252 // ======================================================
253 // Enhanced Setup Synchronous Connection Command (BR/EDR)
254 constexpr OpCode kEnhancedSetupSynchronousConnection =
255 LinkControlOpCode(0x003D);
256
257 // ===============================================================
258 // Enhanced Accept Synchronous Connection Request Command (BR/EDR)
259 constexpr OpCode kEnhancedAcceptSynchronousConnectionRequest =
260 LinkControlOpCode(0x003E);
261
262 // ======= Controller & Baseband Commands =======
263 // Core Spec v5.0 Vol 2, Part E, Section 7.3
264 constexpr uint8_t kControllerAndBasebandOGF = 0x03;
ControllerAndBasebandOpCode(const uint16_t ocf)265 constexpr OpCode ControllerAndBasebandOpCode(const uint16_t ocf) {
266 return DefineOpCode(kControllerAndBasebandOGF, ocf);
267 }
268
269 // =============================
270 // Set Event Mask Command (v1.1)
271 constexpr OpCode kSetEventMask = ControllerAndBasebandOpCode(0x0001);
272
273 // ====================
274 // Reset Command (v1.1)
275 constexpr OpCode kReset = ControllerAndBasebandOpCode(0x0003);
276
277 // ========================================
278 // Read PIN Type Command (v1.1) (BR/EDR)
279 constexpr OpCode kReadPinType = ControllerAndBasebandOpCode(0x0009);
280
281 // ========================================
282 // Write PIN Type Command (v1.1) (BR/EDR)
283 constexpr OpCode kWritePinType = ControllerAndBasebandOpCode(0x000A);
284
285 // ========================================
286 // Write Local Name Command (v1.1) (BR/EDR)
287 constexpr OpCode kWriteLocalName = ControllerAndBasebandOpCode(0x0013);
288
289 // =======================================
290 // Read Local Name Command (v1.1) (BR/EDR)
291 constexpr OpCode kReadLocalName = ControllerAndBasebandOpCode(0x0014);
292
293 // ==========================================
294 // Write Page Timeout Command (v1.1) (BR/EDR)
295 constexpr OpCode kWritePageTimeout = ControllerAndBasebandOpCode(0x0018);
296
297 // ========================================
298 // Read Scan Enable Command (v1.1) (BR/EDR)
299 constexpr OpCode kReadScanEnable = ControllerAndBasebandOpCode(0x0019);
300
301 // =========================================
302 // Write Scan Enable Command (v1.1) (BR/EDR)
303 constexpr OpCode kWriteScanEnable = ControllerAndBasebandOpCode(0x001A);
304
305 // ===============================================
306 // Read Page Scan Activity Command (v1.1) (BR/EDR)
307 constexpr OpCode kReadPageScanActivity = ControllerAndBasebandOpCode(0x001B);
308
309 // ================================================
310 // Write Page Scan Activity Command (v1.1) (BR/EDR)
311 constexpr OpCode kWritePageScanActivity = ControllerAndBasebandOpCode(0x001C);
312
313 // ===============================================
314 // Read Inquiry Scan Activity Command (v1.1) (BR/EDR)
315 constexpr OpCode kReadInquiryScanActivity = ControllerAndBasebandOpCode(0x001D);
316
317 // ================================================
318 // Write Inquiry Scan Activity Command (v1.1) (BR/EDR)
319 constexpr OpCode kWriteInquiryScanActivity =
320 ControllerAndBasebandOpCode(0x001E);
321
322 // ============================================
323 // Read Class of Device Command (v1.1) (BR/EDR)
324 constexpr OpCode kReadClassOfDevice = ControllerAndBasebandOpCode(0x0023);
325
326 // =============================================
327 // Write Class Of Device Command (v1.1) (BR/EDR)
328 constexpr OpCode kWriteClassOfDevice = ControllerAndBasebandOpCode(0x0024);
329
330 // =============================================
331 // Write Automatic Flush Timeout Command (v1.1) (BR/EDR)
332 constexpr OpCode kWriteAutomaticFlushTimeout =
333 ControllerAndBasebandOpCode(0x0028);
334
335 // ===============================================================
336 // Read Transmit Transmit Power Level Command (v1.1) (BR/EDR & LE)
337 constexpr OpCode kReadTransmitPowerLevel = ControllerAndBasebandOpCode(0x002D);
338
339 // ===============================================================
340 // Write Synchonous Flow Control Enable Command (BR/EDR)
341 constexpr OpCode kWriteSynchronousFlowControlEnable =
342 ControllerAndBasebandOpCode(0x002F);
343
344 // ===================================
345 // Read Inquiry Scan Type (v1.2) (BR/EDR)
346 constexpr OpCode kReadInquiryScanType = ControllerAndBasebandOpCode(0x0042);
347
348 // ====================================
349 // Write Inquiry Scan Type (v1.2) (BR/EDR)
350 constexpr OpCode kWriteInquiryScanType = ControllerAndBasebandOpCode(0x0043);
351
352 // =================================
353 // Read Inquiry Mode (v1.2) (BR/EDR)
354 constexpr OpCode kReadInquiryMode = ControllerAndBasebandOpCode(0x0044);
355
356 // ==================================
357 // Write Inquiry Mode (v1.2) (BR/EDR)
358 constexpr OpCode kWriteInquiryMode = ControllerAndBasebandOpCode(0x0045);
359
360 // ===================================
361 // Read Page Scan Type (v1.2) (BR/EDR)
362 constexpr OpCode kReadPageScanType = ControllerAndBasebandOpCode(0x0046);
363
364 // ====================================
365 // Write Page Scan Type (v1.2) (BR/EDR)
366 constexpr OpCode kWritePageScanType = ControllerAndBasebandOpCode(0x0047);
367
368 // =================================
369 // Write Extended Inquiry Response (v1.2) (BR/EDR)
370 constexpr OpCode kWriteExtendedInquiryResponse =
371 ControllerAndBasebandOpCode(0x0052);
372
373 // ==============================================
374 // Read Simple Pairing Mode (v2.1 + EDR) (BR/EDR)
375 constexpr OpCode kReadSimplePairingMode = ControllerAndBasebandOpCode(0x0055);
376
377 // ===============================================
378 // Write Simple Pairing Mode (v2.1 + EDR) (BR/EDR)
379 constexpr OpCode kWriteSimplePairingMode = ControllerAndBasebandOpCode(0x0056);
380
381 // =========================================
382 // Set Event Mask Page 2 Command (v3.0 + HS)
383 constexpr OpCode kSetEventMaskPage2 = ControllerAndBasebandOpCode(0x0063);
384
385 // =========================================================
386 // Read Flow Control Mode Command (v3.0 + HS) (BR/EDR & AMP)
387 constexpr OpCode kReadFlowControlMode = ControllerAndBasebandOpCode(0x0066);
388
389 // ==========================================================
390 // Write Flow Control Mode Command (v3.0 + HS) (BR/EDR & AMP)
391 constexpr OpCode kWriteFlowControlMode = ControllerAndBasebandOpCode(0x0067);
392
393 // ============================================
394 // Read LE Host Support Command (v4.0) (BR/EDR)
395 constexpr OpCode kReadLEHostSupport = ControllerAndBasebandOpCode(0x006C);
396
397 // =============================================
398 // Write LE Host Support Command (v4.0) (BR/EDR)
399 constexpr OpCode kWriteLEHostSupport = ControllerAndBasebandOpCode(0x006D);
400
401 // =============================================
402 // Write Secure Connections Host Support Command (v4.1) (BR/EDR)
403 constexpr OpCode kWriteSecureConnectionsHostSupport =
404 ControllerAndBasebandOpCode(0x007A);
405
406 // ===============================================================
407 // Read Authenticated Payload Timeout Command (v4.1) (BR/EDR & LE)
408 constexpr OpCode kReadAuthenticatedPayloadTimeout =
409 ControllerAndBasebandOpCode(0x007B);
410
411 // ================================================================
412 // Write Authenticated Payload Timeout Command (v4.1) (BR/EDR & LE)
413 constexpr OpCode kWriteAuthenticatedPayloadTimeout =
414 ControllerAndBasebandOpCode(0x007C);
415
416 // ======= Informational Parameters =======
417 // Core Spec v5.0 Vol 2, Part E, Section 7.4
418 constexpr uint8_t kInformationalParamsOGF = 0x04;
InformationalParamsOpCode(const uint16_t ocf)419 constexpr OpCode InformationalParamsOpCode(const uint16_t ocf) {
420 return DefineOpCode(kInformationalParamsOGF, ocf);
421 }
422
423 // =============================================
424 // Read Local Version Information Command (v1.1)
425 constexpr OpCode kReadLocalVersionInfo = InformationalParamsOpCode(0x0001);
426
427 // ============================================
428 // Read Local Supported Commands Command (v1.2)
429 constexpr OpCode kReadLocalSupportedCommands =
430 InformationalParamsOpCode(0x0002);
431
432 // ============================================
433 // Read Local Supported Features Command (v1.1)
434 constexpr OpCode kReadLocalSupportedFeatures =
435 InformationalParamsOpCode(0x0003);
436
437 // ====================================================
438 // Read Local Extended Features Command (v1.2) (BR/EDR)
439 constexpr OpCode kReadLocalExtendedFeatures = InformationalParamsOpCode(0x0004);
440
441 // ===============================
442 // Read Buffer Size Command (v1.1)
443 constexpr OpCode kReadBufferSize = InformationalParamsOpCode(0x0005);
444
445 // ========================================
446 // Read BD_ADDR Command (v1.1) (BR/EDR, LE)
447 constexpr OpCode kReadBDADDR = InformationalParamsOpCode(0x0009);
448
449 // =======================================================
450 // Read Data Block Size Command (v3.0 + HS) (BR/EDR & AMP)
451 constexpr OpCode kReadDataBlockSize = InformationalParamsOpCode(0x000A);
452
453 // ====================================================
454 // Read Local Supported Controller Delay Command (v5.2)
455 constexpr OpCode kReadLocalSupportedControllerDelay =
456 InformationalParamsOpCode(0x000F);
457
458 // ======= Events =======
459 // Core Spec v5.0 Vol 2, Part E, Section 7.7
460
461 // Reserved for vendor-specific debug events
462 // (Vol 2, Part E, Section 5.4.4)
463 constexpr EventCode kVendorDebugEventCode = 0xFF;
464
465 // ======================================
466 // Inquiry Complete Event (v1.1) (BR/EDR)
467 constexpr EventCode kInquiryCompleteEventCode = 0x01;
468
469 // ====================================
470 // Inquiry Result Event (v1.1) (BR/EDR)
471 constexpr EventCode kInquiryResultEventCode = 0x02;
472
473 // =========================================
474 // Connection Complete Event (v1.1) (BR/EDR)
475 constexpr EventCode kConnectionCompleteEventCode = 0x03;
476
477 // ========================================
478 // Connection Request Event (v1.1) (BR/EDR)
479 constexpr EventCode kConnectionRequestEventCode = 0x04;
480
481 // =================================================
482 // Disconnection Complete Event (v1.1) (BR/EDR & LE)
483 constexpr EventCode kDisconnectionCompleteEventCode = 0x05;
484
485 // =============================================
486 // Authentication Complete Event (v1.1) (BR/EDR)
487 constexpr EventCode kAuthenticationCompleteEventCode = 0x06;
488
489 // ==================================================
490 // Remote Name Request Complete Event (v1.1) (BR/EDR)
491 constexpr EventCode kRemoteNameRequestCompleteEventCode = 0x07;
492
493 // ============================================
494 // Encryption Change Event (v1.1) (BR/EDR & LE)
495 constexpr EventCode kEncryptionChangeEventCode = 0x08;
496
497 // =========================================================
498 // Change Connection Link Key Complete Event (v1.1) (BR/EDR)
499 constexpr EventCode kChangeConnectionLinkKeyCompleteEventCode = 0x09;
500
501 // =============================================================
502 // Read Remote Supported Features Complete Event (v1.1) (BR/EDR)
503 constexpr EventCode kReadRemoteSupportedFeaturesCompleteEventCode = 0x0B;
504
505 // ===================================================================
506 // Read Remote Version Information Complete Event (v1.1) (BR/EDR & LE)
507 constexpr EventCode kReadRemoteVersionInfoCompleteEventCode = 0x0C;
508
509 // =============================
510 // Command Complete Event (v1.1)
511 constexpr EventCode kCommandCompleteEventCode = 0x0E;
512
513 // ===========================
514 // Command Status Event (v1.1)
515 constexpr EventCode kCommandStatusEventCode = 0x0F;
516 constexpr uint8_t kCommandStatusPending = 0x00;
517
518 // ===========================
519 // Hardware Error Event (v1.1)
520 constexpr EventCode kHardwareErrorEventCode = 0x10;
521
522 // ========================================
523 // Role Change Event (BR/EDR) (v1.1)
524 constexpr EventCode kRoleChangeEventCode = 0x12;
525
526 // ========================================
527 // Number Of Completed Packets Event (v1.1)
528 constexpr EventCode kNumberOfCompletedPacketsEventCode = 0x13;
529
530 // ======================================
531 // PIN Code Request Event (v1.1) (BR/EDR)
532 constexpr EventCode kPinCodeRequestEventCode = 0x16;
533
534 // ======================================
535 // Link Key Request Event (v1.1) (BR/EDR)
536 constexpr EventCode kLinkKeyRequestEventCode = 0x17;
537
538 // ===========================================
539 // Link Key Notification Event (v1.1) (BR/EDR)
540 constexpr EventCode kLinkKeyNotificationEventCode = 0x18;
541
542 // ===========================================
543 // Data Buffer Overflow Event (v1.1) (BR/EDR & LE)
544 constexpr EventCode kDataBufferOverflowEventCode = 0x1A;
545
546 // ==============================================
547 // Inquiry Result with RSSI Event (v1.2) (BR/EDR)
548 constexpr EventCode kInquiryResultWithRSSIEventCode = 0x22;
549
550 // ============================================================
551 // Read Remote Extended Features Complete Event (v1.1) (BR/EDR)
552 constexpr EventCode kReadRemoteExtendedFeaturesCompleteEventCode = 0x23;
553
554 // ============================================================
555 // Synchronous Connection Complete Event (BR/EDR)
556 constexpr EventCode kSynchronousConnectionCompleteEventCode = 0x2C;
557
558 // =============================================
559 // Extended Inquiry Result Event (v1.2) (BR/EDR)
560 constexpr EventCode kExtendedInquiryResultEventCode = 0x2F;
561
562 // ================================================================
563 // Encryption Key Refresh Complete Event (v2.1 + EDR) (BR/EDR & LE)
564 constexpr EventCode kEncryptionKeyRefreshCompleteEventCode = 0x30;
565
566 // =================================================
567 // IO Capability Request Event (v2.1 + EDR) (BR/EDR)
568 constexpr EventCode kIOCapabilityRequestEventCode = 0x31;
569
570 // ==================================================
571 // IO Capability Response Event (v2.1 + EDR) (BR/EDR)
572 constexpr EventCode kIOCapabilityResponseEventCode = 0x32;
573
574 // =====================================================
575 // User Confirmation Request Event (v2.1 + EDR) (BR/EDR)
576 constexpr EventCode kUserConfirmationRequestEventCode = 0x33;
577
578 // ================================================
579 // User Passkey Request Event (v2.1 + EDR) (BR/EDR)
580 constexpr EventCode kUserPasskeyRequestEventCode = 0x34;
581
582 // ===================================================
583 // Simple Pairing Complete Event (v2.1 + EDR) (BR/EDR)
584 constexpr EventCode kSimplePairingCompleteEventCode = 0x36;
585
586 // =====================================================
587 // User Passkey Notification Event (v2.1 + EDR) (BR/EDR)
588 constexpr EventCode kUserPasskeyNotificationEventCode = 0x3B;
589
590 // =========================
591 // LE Meta Event (v4.0) (LE)
592 constexpr EventCode kLEMetaEventCode = 0x3E;
593
594 // LE Connection Complete Event (v4.0) (LE)
595 constexpr EventCode kLEConnectionCompleteSubeventCode = 0x01;
596
597 // LE Advertising Report Event (v4.0) (LE)
598 constexpr EventCode kLEAdvertisingReportSubeventCode = 0x02;
599
600 // LE Connection Update Complete Event (v4.0) (LE)
601 constexpr EventCode kLEConnectionUpdateCompleteSubeventCode = 0x03;
602
603 // LE Read Remote Features Complete Event (v4.0) (LE)
604 constexpr EventCode kLEReadRemoteFeaturesCompleteSubeventCode = 0x04;
605
606 // LE Long Term Key Request Event (v4.0) (LE)
607 constexpr EventCode kLELongTermKeyRequestSubeventCode = 0x05;
608
609 // LE Remote Connection Parameter Request Event (v4.1) (LE)
610 constexpr EventCode kLERemoteConnectionParameterRequestSubeventCode = 0x06;
611
612 // LE Data Length Change Event (v4.2) (LE)
613 constexpr EventCode kLEDataLengthChangeSubeventCode = 0x07;
614
615 // LE Read Local P-256 Public Key Complete Event (v4.2) (LE)
616 constexpr EventCode kLEReadLocalP256PublicKeyCompleteSubeventCode = 0x08;
617
618 // LE Generate DHKey Complete Event (v4.2) (LE)
619 constexpr EventCode kLEGenerateDHKeyCompleteSubeventCode = 0x09;
620
621 // LE Enhanced Connection Complete Event (v4.2) (LE)
622 constexpr EventCode kLEEnhancedConnectionCompleteSubeventCode = 0x0A;
623
624 // LE Directed Advertising Report Event (v4.2) (LE)
625 constexpr EventCode kLEDirectedAdvertisingReportSubeventCode = 0x0B;
626
627 // LE PHY Update Complete Event (v5.0) (LE)
628 constexpr EventCode kLEPHYUpdateCompleteSubeventCode = 0x0C;
629
630 // LE Extended Advertising Report Event (v5.0) (LE)
631 constexpr EventCode kLEExtendedAdvertisingReportSubeventCode = 0x0D;
632
633 // LE Periodic Advertising Sync Established Event (v5.0) (LE)
634 constexpr EventCode kLEPeriodicAdvertisingSyncEstablishedSubeventCode = 0x0E;
635
636 // LE Periodic Advertising Report Event (v5.0) (LE)
637 constexpr EventCode kLEPeriodicAdvertisingReportSubeventCode = 0x0F;
638
639 // LE Periodic Advertising Sync Lost Event (v5.0) (LE)
640 constexpr EventCode kLEPeriodicAdvertisingSyncLostSubeventCode = 0x10;
641
642 // LE Scan Timeout Event (v5.0) (LE)
643 constexpr EventCode kLEScanTimeoutSubeventCode = 0x11;
644
645 // LE Advertising Set Terminated Event (v5.0) (LE)
646 constexpr EventCode kLEAdvertisingSetTerminatedSubeventCode = 0x012;
647
648 // LE Scan Request Received Event (v5.0) (LE)
649 constexpr EventCode kLEScanRequestReceivedSubeventCode = 0x13;
650
651 // LE Channel Selection Algorithm Event (v5.0) (LE)
652 constexpr EventCode kLEChannelSelectionAlgorithmSubeventCode = 0x014;
653
654 // LE Request Peer SCA Complete Event (v5.2) (LE)
655 constexpr EventCode kLERequestPeerSCACompleteSubeventCode = 0x1F;
656
657 // LE CIS Established Event (v5.2) (LE)
658 constexpr EventCode kLECISEstablishedSubeventCode = 0x019;
659
660 // LE CIS Request Event (v5.2) (LE)
661 constexpr EventCode kLECISRequestSubeventCode = 0x01A;
662
663 // ================================================================
664 // Number Of Completed Data Blocks Event (v3.0 + HS) (BR/EDR & AMP)
665 constexpr EventCode kNumberOfCompletedDataBlocksEventCode = 0x48;
666
667 // ================================================================
668 // Authenticated Payload Timeout Expired Event (v4.1) (BR/EDR & LE)
669 constexpr EventCode kAuthenticatedPayloadTimeoutExpiredEventCode = 0x57;
670
671 // ======= Status Parameters =======
672 // Core Spec v5.0, Vol 2, Part E, Section 7.5
673 constexpr uint8_t kStatusParamsOGF = 0x05;
StatusParamsOpCode(const uint16_t ocf)674 constexpr OpCode StatusParamsOpCode(const uint16_t ocf) {
675 return DefineOpCode(kStatusParamsOGF, ocf);
676 }
677
678 // ========================
679 // Read RSSI Command (v1.1)
680 constexpr OpCode kReadRSSI = StatusParamsOpCode(0x0005);
681
682 // ========================================
683 // Read Encryption Key Size (v1.1) (BR/EDR)
684 constexpr OpCode kReadEncryptionKeySize = StatusParamsOpCode(0x0008);
685
686 // ======= LE Controller Commands =======
687 // Core Spec v5.0 Vol 2, Part E, Section 7.8
688 constexpr uint8_t kLEControllerCommandsOGF = 0x08;
LEControllerCommandOpCode(const uint16_t ocf)689 constexpr OpCode LEControllerCommandOpCode(const uint16_t ocf) {
690 return DefineOpCode(kLEControllerCommandsOGF, ocf);
691 }
692
693 // Returns true if the given |opcode| corresponds to a LE controller command.
IsLECommand(OpCode opcode)694 inline bool IsLECommand(OpCode opcode) {
695 return GetOGF(opcode) == kLEControllerCommandsOGF;
696 }
697
698 // =====================================
699 // LE Set Event Mask Command (v4.0) (LE)
700 constexpr OpCode kLESetEventMask = LEControllerCommandOpCode(0x0001);
701
702 // =======================================
703 // LE Read Buffer Size [v1] Command (v4.0) (LE)
704 constexpr OpCode kLEReadBufferSizeV1 = LEControllerCommandOpCode(0x0002);
705
706 // ====================================================
707 // LE Read Local Supported Features Command (v4.0) (LE)
708 constexpr OpCode kLEReadLocalSupportedFeatures =
709 LEControllerCommandOpCode(0x0003);
710
711 // =========================================
712 // LE Set Random Address Command (v4.0) (LE)
713 constexpr OpCode kLESetRandomAddress = LEControllerCommandOpCode(0x0005);
714
715 // =================================================
716 // LE Set Advertising Parameters Command (v4.0) (LE)
717 constexpr OpCode kLESetAdvertisingParameters =
718 LEControllerCommandOpCode(0x0006);
719
720 // ========================================================
721 // LE Read Advertising Channel Tx Power Command (v4.0) (LE)
722 constexpr OpCode kLEReadAdvertisingChannelTxPower =
723 LEControllerCommandOpCode(0x0007);
724
725 // ===========================================
726 // LE Set Advertising Data Command (v4.0) (LE)
727 constexpr OpCode kLESetAdvertisingData = LEControllerCommandOpCode(0x0008);
728
729 // =============================================
730 // LE Set Scan Response Data Command (v4.0) (LE)
731 constexpr OpCode kLESetScanResponseData = LEControllerCommandOpCode(0x0009);
732
733 // =============================================
734 // LE Set Advertising Enable Command (v4.0) (LE)
735 constexpr OpCode kLESetAdvertisingEnable = LEControllerCommandOpCode(0x000A);
736
737 // ==========================================
738 // LE Set Scan Parameters Command (v4.0) (LE)
739 constexpr OpCode kLESetScanParameters = LEControllerCommandOpCode(0x000B);
740
741 // ======================================
742 // LE Set Scan Enable Command (v4.0) (LE)
743 constexpr OpCode kLESetScanEnable = LEControllerCommandOpCode(0x000C);
744
745 // ========================================
746 // LE Create Connection Command (v4.0) (LE)
747 constexpr OpCode kLECreateConnection = LEControllerCommandOpCode(0x000D);
748
749 // ===============================================
750 // LE Create Connection Cancel Command (v4.0) (LE)
751 constexpr OpCode kLECreateConnectionCancel = LEControllerCommandOpCode(0x000E);
752
753 // ===========================================
754 // LE Read Filter Accept List Size Command (v4.0) (LE)
755 constexpr OpCode kLEReadFilterAcceptListSize =
756 LEControllerCommandOpCode(0x000F);
757
758 // =======================================
759 // LE Clear Filter Accept List Command (v4.0) (LE)
760 constexpr OpCode kLEClearFilterAcceptList = LEControllerCommandOpCode(0x0010);
761
762 // ===============================================
763 // LE Add Device To Filter Accept List Command (v4.0) (LE)
764 constexpr OpCode kLEAddDeviceToFilterAcceptList =
765 LEControllerCommandOpCode(0x0011);
766
767 // ====================================================
768 // LE Remove Device From Filter Accept List Command (v4.0) (LE)
769 constexpr OpCode kLERemoveDeviceFromFilterAcceptList =
770 LEControllerCommandOpCode(0x0012);
771
772 // ========================================
773 // LE Connection Update Command (v4.0) (LE)
774 constexpr OpCode kLEConnectionUpdate = LEControllerCommandOpCode(0x0013);
775
776 // ======================================================
777 // LE Set Host Channel Classification Command (v4.0) (LE)
778 constexpr OpCode kLESetHostChannelClassification =
779 LEControllerCommandOpCode(0x0014);
780
781 // =======================================
782 // LE Read Channel Map Command (v4.0) (LE)
783 constexpr OpCode kLEReadChannelMap = LEControllerCommandOpCode(0x0015);
784
785 // ===========================================
786 // LE Read Remote Features Command (v4.0) (LE)
787 constexpr OpCode kLEReadRemoteFeatures = LEControllerCommandOpCode(0x0016);
788
789 // ==============================
790 // LE Encrypt Command (v4.0) (LE)
791 constexpr OpCode kLEEncrypt = LEControllerCommandOpCode(0x0017);
792
793 // ===========================
794 // LE Rand Command (v4.0) (LE)
795 constexpr OpCode kLERand = LEControllerCommandOpCode(0x0018);
796
797 // =======================================
798 // LE Start Encryption Command (v4.0) (LE)
799 constexpr OpCode kLEStartEncryption = LEControllerCommandOpCode(0x0019);
800
801 // ==================================================
802 // LE Long Term Key Request Reply Command (v4.0) (LE)
803 constexpr OpCode kLELongTermKeyRequestReply = LEControllerCommandOpCode(0x001A);
804
805 // ===========================================================
806 // LE Long Term Key Request Negative Reply Command (v4.0) (LE)
807 constexpr OpCode kLELongTermKeyRequestNegativeReply =
808 LEControllerCommandOpCode(0x001B);
809
810 // ============================================
811 // LE Read Supported States Command (v4.0) (LE)
812 constexpr OpCode kLEReadSupportedStates = LEControllerCommandOpCode(0x001C);
813
814 // ====================================
815 // LE Receiver Test Command (v4.0) (LE)
816 constexpr OpCode kLEReceiverTest = LEControllerCommandOpCode(0x001D);
817
818 // ======================================
819 // LE Transmitter Test Command (v4.0) (LE)
820 constexpr OpCode kLETransmitterTest = LEControllerCommandOpCode(0x001E);
821
822 // ===============================
823 // LE Test End Command (v4.0) (LE)
824 constexpr OpCode kLETestEnd = LEControllerCommandOpCode(0x001F);
825
826 // ================================================================
827 // LE Remote Connection Parameter Request Reply Command (v4.1) (LE)
828 constexpr OpCode kLERemoteConnectionParameterRequestReply =
829 LEControllerCommandOpCode(0x0020);
830
831 // =========================================================================
832 // LE Remote Connection Parameter Request Negative Reply Command (v4.1) (LE)
833 constexpr OpCode kLERemoteConnectionParameterRequestNegativeReply =
834 LEControllerCommandOpCode(0x0021);
835
836 // ======================================
837 // LE Set Data Length Command (v4.2) (LE)
838 constexpr OpCode kLESetDataLength = LEControllerCommandOpCode(0x0022);
839
840 // =========================================================
841 // LE Read Suggested Default Data Length Command (v4.2) (LE)
842 constexpr OpCode kLEReadSuggestedDefaultDataLength =
843 LEControllerCommandOpCode(0x0023);
844
845 // ==========================================================
846 // LE Write Suggested Default Data Length Command (v4.2) (LE)
847 constexpr OpCode kLEWriteSuggestedDefaultDataLength =
848 LEControllerCommandOpCode(0x0024);
849
850 // ==================================================
851 // LE Read Local P-256 Public Key Command (v4.2) (LE)
852 constexpr OpCode kLEReadLocalP256PublicKey = LEControllerCommandOpCode(0x0025);
853
854 // ======================================
855 // LE Generate DH Key Command (v4.2) (LE)
856 constexpr OpCode kLEGenerateDHKey = LEControllerCommandOpCode(0x0026);
857
858 // ===================================================
859 // LE Add Device To Resolving List Command (v4.2) (LE)
860 constexpr OpCode kLEAddDeviceToResolvingList =
861 LEControllerCommandOpCode(0x0027);
862
863 // ========================================================
864 // LE Remove Device From Resolving List Command (v4.2) (LE)
865 constexpr OpCode kLERemoveDeviceFromResolvingList =
866 LEControllerCommandOpCode(0x0028);
867
868 // ===========================================
869 // LE Clear Resolving List Command (v4.2) (LE)
870 constexpr OpCode kLEClearResolvingList = LEControllerCommandOpCode(0x0029);
871
872 // ===============================================
873 // LE Read Resolving List Size Command (v4.2) (LE)
874 constexpr OpCode kLEReadResolvingListSize = LEControllerCommandOpCode(0x002A);
875
876 // ===================================================
877 // LE Read Peer Resolvable Address Command (v4.2) (LE)
878 constexpr OpCode kLEReadPeerResolvableAddress =
879 LEControllerCommandOpCode(0x002B);
880
881 // ====================================================
882 // LE Read Local Resolvable Address Command (v4.2) (LE)
883 constexpr OpCode kLEReadLocalResolvableAddress =
884 LEControllerCommandOpCode(0x002C);
885
886 // ====================================================
887 // LE Set Address Resolution Enable Command (v4.2) (LE)
888 constexpr OpCode kLESetAddressResolutionEnable =
889 LEControllerCommandOpCode(0x002D);
890
891 // =============================================================
892 // LE Set Resolvable Private Address Timeout Command (v4.2) (LE)
893 constexpr OpCode kLESetResolvablePrivateAddressTimeout =
894 LEControllerCommandOpCode(0x002E);
895
896 // ===============================================
897 // LE Read Maximum Data Length Command (v4.2) (LE)
898 constexpr OpCode kLEReadMaximumDataLength = LEControllerCommandOpCode(0x002F);
899
900 // ===============================
901 // LE Read PHY Command (v5.0) (LE)
902 constexpr OpCode kLEReadPHY = LEControllerCommandOpCode(0x0030);
903
904 // ======================================
905 // LE Set Default PHY Command (v5.0) (LE)
906 constexpr OpCode kLESetDefaultPHY = LEControllerCommandOpCode(0x0031);
907
908 // ==============================
909 // LE Set PHY Command (v5.0) (LE)
910 constexpr OpCode kLESetPHY = LEControllerCommandOpCode(0x0032);
911
912 // =============================================
913 // LE Enhanced Receiver Test Command (v5.0) (LE)
914 constexpr OpCode kLEEnhancedReceiverText = LEControllerCommandOpCode(0x0033);
915
916 // ================================================
917 // LE Enhanced Transmitter Test Command (v5.0) (LE)
918 constexpr OpCode kLEEnhancedTransmitterTest = LEControllerCommandOpCode(0x0034);
919
920 // =========================================================
921 // LE Set Advertising Set Random Address Command (v5.0) (LE)
922 constexpr OpCode kLESetAdvertisingSetRandomAddress =
923 LEControllerCommandOpCode(0x0035);
924
925 // ==========================================================
926 // LE Set Extended Advertising Parameters Command (v5.0) (LE)
927 constexpr OpCode kLESetExtendedAdvertisingParameters =
928 LEControllerCommandOpCode(0x0036);
929
930 // ====================================================
931 // LE Set Extended Advertising Data Command (v5.0) (LE)
932 constexpr OpCode kLESetExtendedAdvertisingData =
933 LEControllerCommandOpCode(0x0037);
934
935 // ======================================================
936 // LE Set Extended Scan Response Data Command (v5.0) (LE)
937 constexpr OpCode kLESetExtendedScanResponseData =
938 LEControllerCommandOpCode(0x0038);
939
940 // ======================================================
941 // LE Set Extended Advertising Enable Command (v5.0) (LE)
942 constexpr OpCode kLESetExtendedAdvertisingEnable =
943 LEControllerCommandOpCode(0x0039);
944
945 // ===========================================================
946 // LE Read Maximum Advertising Data Length Command (v5.0) (LE)
947 constexpr OpCode kLEReadMaximumAdvertisingDataLength =
948 LEControllerCommandOpCode(0x003A);
949
950 // ================================================================
951 // LE Read Number of Supported Advertising Sets Command (v5.0) (LE)
952 constexpr OpCode kLEReadNumSupportedAdvertisingSets =
953 LEControllerCommandOpCode(0x003B);
954
955 // =============================================
956 // LE Remove Advertising Set Command (v5.0) (LE)
957 constexpr OpCode kLERemoveAdvertisingSet = LEControllerCommandOpCode(0x003C);
958
959 // =============================================
960 // LE Clear Advertising Sets Command (v5.0) (LE)
961 constexpr OpCode kLEClearAdvertisingSets = LEControllerCommandOpCode(0x003D);
962
963 // ==========================================================
964 // LE Set Periodic Advertising Parameters Command (v5.0) (LE)
965 constexpr OpCode kLESetPeriodicAdvertisingParameters =
966 LEControllerCommandOpCode(0x003E);
967
968 // ====================================================
969 // LE Set Periodic Advertising Data Command (v5.0) (LE)
970 constexpr OpCode kLESetPeriodicAdvertisingData =
971 LEControllerCommandOpCode(0x003F);
972
973 // ======================================================
974 // LE Set Periodic Advertising Enable Command (v5.0) (LE)
975 constexpr OpCode kLESetPeriodicAdvertisingEnable =
976 LEControllerCommandOpCode(0x0040);
977
978 // ===================================================
979 // LE Set Extended Scan Parameters Command (v5.0) (LE)
980 constexpr OpCode kLESetExtendedScanParameters =
981 LEControllerCommandOpCode(0x0041);
982
983 // ===============================================
984 // LE Set Extended Scan Enable Command (v5.0) (LE)
985 constexpr OpCode kLESetExtendedScanEnable = LEControllerCommandOpCode(0x0042);
986
987 // =================================================
988 // LE Extended Create Connection Command (v5.0) (LE)
989 constexpr OpCode kLEExtendedCreateConnection =
990 LEControllerCommandOpCode(0x0043);
991
992 // =======================================================
993 // LE Periodic Advertising Create Sync Command (v5.0) (LE)
994 constexpr OpCode kLEPeriodicAdvertisingCreateSync =
995 LEControllerCommandOpCode(0x0044);
996
997 // ==============================================================
998 // LE Periodic Advertising Create Sync Cancel Command (v5.0) (LE)
999 constexpr OpCode kLEPeriodicAdvertisingCreateSyncCancel =
1000 LEControllerCommandOpCode(0x0045);
1001
1002 // ==========================================================
1003 // LE Periodic Advertising Terminate Sync Command (v5.0) (LE)
1004 constexpr OpCode kLEPeriodicAdvertisingTerminateSync =
1005 LEControllerCommandOpCode(0x0046);
1006
1007 // =============================================================
1008 // LE Add Device To Periodic Advertiser List Command (v5.0) (LE)
1009 constexpr OpCode kLEAddDeviceToPeriodicAdvertiserList =
1010 LEControllerCommandOpCode(0x0047);
1011
1012 // ==================================================================
1013 // LE Remove Device From Periodic Advertiser List Command (v5.0) (LE)
1014 constexpr OpCode kLERemoveDeviceFromPeriodicAdvertiserList =
1015 LEControllerCommandOpCode(0x0048);
1016
1017 // =====================================================
1018 // LE Clear Periodic Advertiser List Command (v5.0) (LE)
1019 constexpr OpCode kLEClearPeriodicAdvertiserList =
1020 LEControllerCommandOpCode(0x0049);
1021
1022 // =========================================================
1023 // LE Read Periodic Advertiser List Size Command (v5.0) (LE)
1024 constexpr OpCode kLEReadPeriodicAdvertiserListSize =
1025 LEControllerCommandOpCode(0x004A);
1026
1027 // ==========================================
1028 // LE Read Transmit Power Command (v5.0) (LE)
1029 constexpr OpCode kLEReadTransmitPower = LEControllerCommandOpCode(0x004B);
1030
1031 // ================================================
1032 // LE Read RF Path Compensation Command (v5.0) (LE)
1033 constexpr OpCode kLEReadRFPathCompensation = LEControllerCommandOpCode(0x004C);
1034
1035 // =================================================
1036 // LE Write RF Path Compensation Command (v5.0) (LE)
1037 constexpr OpCode kLEWriteRFPathCompensation = LEControllerCommandOpCode(0x004D);
1038
1039 // =======================================
1040 // LE Set Privacy Mode Command (v5.0) (LE)
1041 constexpr OpCode kLESetPrivacyMode = LEControllerCommandOpCode(0x004E);
1042
1043 // ============================================
1044 // LE Read Buffer Size [v2] Command (v5.2) (LE)
1045 constexpr OpCode kLEReadBufferSizeV2 = LEControllerCommandOpCode(0x0060);
1046
1047 // =======================================
1048 // LE Request Peer SCA Command (v5.2) (LE)
1049 constexpr OpCode kLERequestPeerSCA = LEControllerCommandOpCode(0x006D);
1050
1051 // ==========================================
1052 // LE Setup ISO Data Path Command (v5.2) (LE)
1053 constexpr OpCode kLESetupISODataPath = LEControllerCommandOpCode(0x006E);
1054
1055 // =======================================
1056 // LE Set Host Feature Command (v5.2) (LE)
1057 constexpr OpCode kLESetHostFeature = LEControllerCommandOpCode(0x0074);
1058
1059 // =========================================
1060 // LE Accept CIS Request Command (v5.2) (LE)
1061 constexpr OpCode kLEAcceptCISRequest = LEControllerCommandOpCode(0x0066);
1062
1063 // =========================================
1064 // LE Reject CIS Request Command (v5.2) (LE)
1065 constexpr OpCode kLERejectCISRequest = LEControllerCommandOpCode(0x0067);
1066
1067 // ======= Vendor Command =======
1068 // Core Spec v5.0, Vol 2, Part E, Section 5.4.1
1069 constexpr uint8_t kVendorOGF = 0x3F;
VendorOpCode(const uint16_t ocf)1070 constexpr OpCode VendorOpCode(const uint16_t ocf) {
1071 return DefineOpCode(kVendorOGF, ocf);
1072 }
1073
1074 } // namespace bt::hci_spec
1075