Skip to content

Commit

Permalink
pw_bluetooth: LE Request Peer SCA Complete event
Browse files Browse the repository at this point in the history
Add emboss definition for HCI_LE_Request_Peer_SCA_Complete event.
Refactor the LESleepClockAccuracyRange definition so it can be used
in both commands and events.

Bug: b/311639272
Test: No pigweed regressions, Fuchsia builds successfully.
Change-Id: I7ad26fcc1f3bd214b26b40246ad18ea30864fa6c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/182430
Reviewed-by: Jason Graffius <jgraff@google.com>
Commit-Queue: Josh Conner <joshconner@google.com>
  • Loading branch information
josh-conner authored and CQ Bot Account committed Nov 27, 2023
1 parent f2301a7 commit 2a85467
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
15 changes: 1 addition & 14 deletions pw_bluetooth/public/pw_bluetooth/hci_commands.emb
Original file line number Diff line number Diff line change
Expand Up @@ -492,19 +492,6 @@ struct LESetCIGParametersCISOptions:
-- Central


enum LESleepClockAccuracyRange:
-- Accuracy of the sleep clock, provided as a range
[maximum_bits: 8]
PPM_251_TO_500 = 0x00
PPM_151_TO_250 = 0x01
PPM_101_TO_150 = 0x02
PPM_76_TO_100 = 0x03
PPM_51_TO_75 = 0x04
PPM_31_TO_50 = 0x05
PPM_21_TO_30 = 0x06
PPM_0_TO_20 = 0x07


enum LECISPacking:
-- Preferred method of arranging subevents of multiple CISes
[maximum_bits: 8]
Expand Down Expand Up @@ -2776,7 +2763,7 @@ struct LESetCIGParametersCommand:
-- The interval, in microseconds, of periodic SDUs (Peripheral => Central)
[requires: 0x0000FF <= this <= 0x0FFFFF]

$next [+1] LESleepClockAccuracyRange worst_case_sca
$next [+1] hci.LESleepClockAccuracyRange worst_case_sca
-- Worst-case sleep clock accuracy of all Peripherals that will participate in the CIG

$next [+1] LECISPacking packing
Expand Down
13 changes: 13 additions & 0 deletions pw_bluetooth/public/pw_bluetooth/hci_common.emb
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,19 @@ enum IoCapability:
KEYBOARD_ONLY = 0x02
NO_INPUT_NO_OUTPUT = 0x03


enum LESleepClockAccuracyRange:
-- Accuracy of the sleep clock, provided as a range
[maximum_bits: 8]
PPM_251_TO_500 = 0x00
PPM_151_TO_250 = 0x01
PPM_101_TO_150 = 0x02
PPM_76_TO_100 = 0x03
PPM_51_TO_75 = 0x04
PPM_31_TO_50 = 0x05
PPM_21_TO_30 = 0x06
PPM_0_TO_20 = 0x07

# inclusive-language: disable


Expand Down
13 changes: 10 additions & 3 deletions pw_bluetooth/public/pw_bluetooth/hci_events.emb
Original file line number Diff line number Diff line change
Expand Up @@ -1707,9 +1707,16 @@ struct LEChannelSelectionAlgorithmSubevent:
# TODO: b/265052417 - Definition needs to be added


# 7.7.65.31 LE Request Peer SCA Complete event
# HCI_LE_Request_Peer_SCA_Complete
# TODO: b/265052417 - Definition needs to be added
struct LERequestPeerSCACompleteSubevent:
-- 7.7.65.31 LE Request Peer SCA Complete event
-- HCI_LE_Request_Peer_SCA_Complete
0 [+LEMetaEvent.$size_in_bytes] LEMetaEvent le_meta_event
$next [+1] hci.StatusCode status
$next [+2] UInt connection_handle
-- Connection handle of the ACL connection. Only the lower 12-bits are meaningful.
[requires: 0x0000 <= this <= 0x0EFF]

$next [+1] hci.LESleepClockAccuracyRange peer_clock_accuracy


# 7.7.65.32 LE Path Loss Threshold event
Expand Down

0 comments on commit 2a85467

Please sign in to comment.