diff --git a/pw_bluetooth/public/pw_bluetooth/hci_commands.emb b/pw_bluetooth/public/pw_bluetooth/hci_commands.emb index 7cb6decf75..1409833bf5 100644 --- a/pw_bluetooth/public/pw_bluetooth/hci_commands.emb +++ b/pw_bluetooth/public/pw_bluetooth/hci_commands.emb @@ -122,15 +122,6 @@ enum OobDataPresent: P192_AND_P256 = 0x03 -bits ScanEnableBits: - -- Bitmask Values for the Scan_Enable parameter in a HCI_(Read,Write)_Scan_Enable command. - 0 [+1] Flag inquiry - -- Inquiry scan enabled - - 1 [+1] Flag page - -- Page scan enabled - - enum InquiryScanType: [maximum_bits: 8] STANDARD = 0x00 @@ -1224,9 +1215,9 @@ struct WriteScanEnableCommand: -- 7.3.18 Write Scan Enable command (v1.1) (BR/EDR) -- HCI_Write_Scan_Enable let hdr_size = hci.CommandHeader.$size_in_bytes - 0 [+hdr_size] hci.CommandHeader header + 0 [+hdr_size] hci.CommandHeader header $next [+1] bits: - 0 [+ScanEnableBits.$size_in_bits] ScanEnableBits scan_enable + 0 [+hci.ScanEnableBits.$size_in_bits] hci.ScanEnableBits scan_enable struct ReadPageScanActivityCommand: diff --git a/pw_bluetooth/public/pw_bluetooth/hci_common.emb b/pw_bluetooth/public/pw_bluetooth/hci_common.emb index 3c3bb674be..22614f93bf 100644 --- a/pw_bluetooth/public/pw_bluetooth/hci_common.emb +++ b/pw_bluetooth/public/pw_bluetooth/hci_common.emb @@ -862,6 +862,15 @@ bits ClassOfDevice: $next [+11] MajorServiceClasses major_service_classes +bits ScanEnableBits: + -- Bitmask Values for the Scan_Enable parameter in a HCI_(Read,Write)_Scan_Enable command. + 0 [+1] Flag inquiry + -- Inquiry scan enabled + + 1 [+1] Flag page + -- Page scan enabled + + enum ConnectionRole: [maximum_bits: 8] CENTRAL = 0x00 diff --git a/pw_bluetooth/public/pw_bluetooth/hci_events.emb b/pw_bluetooth/public/pw_bluetooth/hci_events.emb index d349a8cc1f..3d321e43a3 100644 --- a/pw_bluetooth/public/pw_bluetooth/hci_events.emb +++ b/pw_bluetooth/public/pw_bluetooth/hci_events.emb @@ -493,6 +493,15 @@ struct WritePinTypeCommandCompleteEvent: $next [+1] hci.StatusCode status +struct ReadScanEnableCommandCompleteEvent: + -- 7.7.14 Command Complete event (7.3.17 Read Scan Enable command) + let hdr_size = hci.CommandCompleteEvent.$size_in_bytes + 0 [+hdr_size] hci.CommandCompleteEvent command_complete + $next [+1] hci.StatusCode status + $next [+1] bits: + 0 [+hci.ScanEnableBits.$size_in_bits] hci.ScanEnableBits scan_enable + + struct ReadLocalVersionInfoCommandCompleteEvent: -- 7.7.14 Command Complete event (7.4.1 Read Local Version Information command) let hdr_size = hci.CommandCompleteEvent.$size_in_bytes @@ -1024,6 +1033,18 @@ struct ReadRssiCommandCompleteEvent: -- LE (Range: -127 to 20, 127, Units: dBm) +struct ReadEncryptionKeySizeCommandCompleteEvent: + -- 7.7.14 Command Complete event (7.5.7 Read Encryption Key Size command) + let hdr_size = hci.CommandCompleteEvent.$size_in_bytes + 0 [+hdr_size] hci.CommandCompleteEvent command_complete + $next [+1] hci.StatusCode status + $next [+2] UInt connection_handle + [requires: 0x0000 <= this <= 0x0EFF] + + $next [+1] UInt key_size + -- Encryption key size + + struct LEReadBufferSizeV1CommandCompleteEvent: -- 7.7.14 Command Complete event (7.8.2 LE Read Buffer Size [v1] command) let hdr_size = hci.CommandCompleteEvent.$size_in_bytes