mkasenberg commented on code in PR #1682:
URL: https://github.com/apache/mynewt-nimble/pull/1682#discussion_r1505649293
##########
nimble/include/nimble/hci_common.h:
##########
@@ -1993,6 +2178,140 @@ struct ble_hci_ev_le_subev_subrate_change {
uint16_t supervision_tmo;
} __attribute__((packed));
+#define BLE_HCI_LE_SUBEV_CS_RD_REM_SUPP_CAP_COMPLETE (0x2C)
+struct ble_hci_ev_le_subev_cs_rd_rem_supp_cap_complete {
+ uint8_t subev_code;
+ uint8_t status;
+ uint16_t conn_handle;
+ uint8_t num_config_supported;
+ uint16_t max_consecutive_procedures_supported;
+ uint8_t num_antennas_supported;
+ uint8_t max_antenna_paths_supported;
+ uint8_t roles_supported;
+ uint8_t optional_modes_supported;
+ uint8_t rtt_capability;
+ uint8_t rtt_aa_only_n;
+ uint8_t rtt_sounding_n;
+ uint8_t rtt_random_payload_n;
+ uint16_t optional_nadm_sounding_capability;
+ uint16_t optional_nadm_random_capability;
+ uint8_t optional_cs_sync_phys_supported;
+ uint16_t optional_subfeatures_supported;
+ uint16_t optional_t_ip1_times_supported;
+ uint16_t optional_t_ip2_times_supported;
+ uint16_t optional_t_fcs_times_supported;
+ uint16_t optional_t_pm_times_supported;
+ uint8_t t_sw_time_supported;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_CS_RD_REM_FAE_COMPLETE (0x2D)
+struct ble_hci_ev_le_subev_cs_rd_rem_fae_complete {
+ uint8_t subev_code;
+ uint8_t status;
+ uint16_t conn_handle;
+ uint8_t remote_fae_table[72];
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_CS_SEC_ENABLE_COMPLETE (0x2E)
+struct ble_hci_ev_le_subev_cs_sec_enable_complete {
+ uint8_t subev_code;
+ uint8_t status;
+ uint16_t conn_handle;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_CS_CONFIG_COMPLETE (0x2F)
+struct ble_hci_ev_le_subev_cs_config_complete {
+ uint8_t subev_code;
+ uint8_t status;
+ uint16_t conn_handle;
+ uint8_t config_id;
+ uint8_t action;
+ uint8_t main_mode_type;
+ uint8_t sub_mode_type;
+ uint8_t min_main_mode_steps;
+ uint8_t max_main_mode_steps;
+ uint8_t main_mode_repetition;
+ uint8_t mode_0_steps;
+ uint8_t role;
+ uint8_t rtt_type;
+ uint8_t cs_sync_phy;
+ uint8_t channel_map[10];
+ uint8_t channel_map_repetition;
+ uint8_t channel_selection_type;
+ uint8_t ch3c_shape;
+ uint8_t ch3c_jump;
+ uint8_t companion_signal_enable;
+ uint8_t t_ip1_time;
+ uint8_t t_ip2_time;
+ uint8_t t_fcs_time;
+ uint8_t t_pm_time;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_CS_PROC_ENABLE_COMPLETE (0x30)
+struct ble_hci_ev_le_subev_cs_proc_enable_complete {
+ uint8_t subev_code;
+ uint8_t status;
+ uint16_t conn_handle;
+ uint8_t config_id;
+ uint8_t state;
+ uint8_t tone_antenna_config_selection;
+ uint8_t selected_tx_power;
+ uint8_t subevent_len[3];
+ uint8_t subevents_per_event;
+ uint16_t subevent_interval;
+ uint16_t event_interval;
+ uint16_t procedure_interval;
+ uint16_t procedure_count;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_CS_SUBEVENT_RESULT (0x31)
+struct ble_hci_ev_le_subev_cs_subevent_result {
+ uint8_t subev_code;
+ uint16_t conn_handle;
+ uint8_t config_id;
+ uint16_t start_acl_conn_event_counter;
+ uint16_t procedure_counter;
+ uint16_t frequency_compensation;
+ uint8_t reference_power_level;
+ uint8_t procedure_done_status;
+ uint8_t subevent_done_status;
+ uint8_t abort_reason;
+ uint8_t num_antenna_paths;
+ uint8_t num_steps_reported;
+ uint8_t steps[];
+/* TODO:
+ * step_mode[i];
+ * step_channel[i];
+ * step_data_length[i];
+ * step_data[i];
+ */
Review Comment:
The struct will look like this:
```C
struct ble_hci_ev_le_subev_cs_subevent_result_data {
uint8_t mode;
uint8_t channel;
uint8_t data_len;
uint8_t data[];
}
```
and to parse all combinations of `uint8_t data[];` content we might need
more or less than 11 structures. So I would skip this, just for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]