@@ -295,6 +295,12 @@ enum sdc_hci_opcode_le
295295 SDC_HCI_OPCODE_CMD_LE_SET_HOST_FEATURE_V2 = 0x2097 ,
296296 /** @brief See @ref sdc_hci_cmd_le_frame_space_update(). */
297297 SDC_HCI_OPCODE_CMD_LE_FRAME_SPACE_UPDATE = 0x209d ,
298+ /** @brief See @ref sdc_hci_cmd_le_conn_rate_request(). */
299+ SDC_HCI_OPCODE_CMD_LE_CONN_RATE_REQUEST = 0x20a1 ,
300+ /** @brief See @ref sdc_hci_cmd_le_set_default_rate_params(). */
301+ SDC_HCI_OPCODE_CMD_LE_SET_DEFAULT_RATE_PARAMS = 0x20a2 ,
302+ /** @brief See @ref sdc_hci_cmd_le_read_min_supported_conn_interval(). */
303+ SDC_HCI_OPCODE_CMD_LE_READ_MIN_SUPPORTED_CONN_INTERVAL = 0x20a3 ,
298304};
299305
300306/** @brief LE subevent Code values. */
@@ -332,6 +338,8 @@ enum sdc_hci_subevent_le
332338 SDC_HCI_SUBEVENT_LE_CS_TEST_END_COMPLETE = 0x33 ,
333339 /** @brief See @ref sdc_hci_subevent_le_frame_space_update_complete_t. */
334340 SDC_HCI_SUBEVENT_LE_FRAME_SPACE_UPDATE_COMPLETE = 0x35 ,
341+ /** @brief See @ref sdc_hci_subevent_le_conn_rate_change_t. */
342+ SDC_HCI_SUBEVENT_LE_CONN_RATE_CHANGE = 0x37 ,
335343};
336344
337345/** @brief Advertising Event Properties parameters. */
@@ -588,6 +596,14 @@ typedef struct __PACKED __ALIGN(1)
588596 uint8_t rfu : 5 ;
589597} sdc_hci_le_periodic_adv_create_sync_options_params_t ;
590598
599+ /** @brief LE Read Minimum Supported Connection Interval groups. */
600+ typedef struct __PACKED __ALIGN (1 )
601+ {
602+ uint16_t group_min ;
603+ uint16_t group_max ;
604+ uint16_t group_stride ;
605+ } sdc_hci_le_read_min_supported_conn_interval_group_t ;
606+
591607/** @brief LE Set CIG Parameters array parameters. */
592608typedef struct __PACKED __ALIGN (1 )
593609{
@@ -1419,6 +1435,35 @@ typedef struct __PACKED __ALIGN(1)
14191435 uint16_t spacing_types ;
14201436} sdc_hci_subevent_le_frame_space_update_complete_t ;
14211437
1438+ /** @brief LE Connection Rate Change.
1439+ *
1440+ * The description below is extracted from Core_v6.2,
1441+ * Vol 4, Part E, Section 7.7.65.50
1442+ *
1443+ * The HCI_LE_Connection_Rate_Change event is used to indicate that the Connection
1444+ * Rate Update procedure has completed.
1445+ *
1446+ * The event shall be issued if the HCI_LE_Connection_Rate_Request command was
1447+ * issued by the Host or if the connection parameters are updated following a request
1448+ * from the peer device. If no parameters are updated following a request from the peer
1449+ * device or the parameters were changed using the Connection Update procedure or the
1450+ * Connection Subrate Update procedure, then this event shall not be issued.
1451+ *
1452+ * Note: The parameter values returned in this event can be different from the parameter
1453+ * values provided by the Host through the HCI_LE_Connection_Rate_Request command
1454+ * (Section 7.8.154).
1455+ */
1456+ typedef struct __PACKED __ALIGN (1 )
1457+ {
1458+ uint8_t status ;
1459+ uint16_t conn_handle ;
1460+ uint16_t conn_interval ;
1461+ uint16_t subrate_factor ;
1462+ uint16_t peripheral_latency ;
1463+ uint16_t continuation_number ;
1464+ uint16_t supervision_timeout ;
1465+ } sdc_hci_subevent_le_conn_rate_change_t ;
1466+
14221467/** @} end of HCI_EVENTS */
14231468
14241469/**
@@ -2818,6 +2863,43 @@ typedef struct __PACKED __ALIGN(1)
28182863 uint16_t spacing_types ;
28192864} sdc_hci_cmd_le_frame_space_update_t ;
28202865
2866+ /** @brief LE Connection Rate Request command parameter(s). */
2867+ typedef struct __PACKED __ALIGN (1 )
2868+ {
2869+ uint16_t conn_handle ;
2870+ uint16_t conn_interval_min ;
2871+ uint16_t conn_interval_max ;
2872+ uint16_t subrate_min ;
2873+ uint16_t subrate_max ;
2874+ uint16_t max_latency ;
2875+ uint16_t continuation_number ;
2876+ uint16_t supervision_timeout ;
2877+ uint16_t min_ce_length ;
2878+ uint16_t max_ce_length ;
2879+ } sdc_hci_cmd_le_conn_rate_request_t ;
2880+
2881+ /** @brief LE Set Default Rate Parameters command parameter(s). */
2882+ typedef struct __PACKED __ALIGN (1 )
2883+ {
2884+ uint16_t conn_interval_min ;
2885+ uint16_t conn_interval_max ;
2886+ uint16_t subrate_min ;
2887+ uint16_t subrate_max ;
2888+ uint16_t max_latency ;
2889+ uint16_t continuation_number ;
2890+ uint16_t supervision_timeout ;
2891+ uint16_t min_ce_length ;
2892+ uint16_t max_ce_length ;
2893+ } sdc_hci_cmd_le_set_default_rate_params_t ;
2894+
2895+ /** @brief LE Read Minimum Supported Connection Interval return parameter(s). */
2896+ typedef struct __PACKED __ALIGN (1 )
2897+ {
2898+ uint8_t min_supported_conn_interval ;
2899+ uint8_t num_groups ;
2900+ sdc_hci_le_read_min_supported_conn_interval_group_t groups [];
2901+ } sdc_hci_cmd_le_read_min_supported_conn_interval_return_t ;
2902+
28212903/** @} end of HCI_COMMAND_PARAMETERS */
28222904
28232905/**
@@ -9650,6 +9732,188 @@ uint8_t sdc_hci_cmd_le_set_host_feature_v2(const sdc_hci_cmd_le_set_host_feature
96509732 */
96519733uint8_t sdc_hci_cmd_le_frame_space_update (const sdc_hci_cmd_le_frame_space_update_t * p_params );
96529734
9735+ /** @brief LE Connection Rate Request.
9736+ *
9737+ * The description below is extracted from Core_v6.2,
9738+ * Vol 4, Part E, Section 7.8.154
9739+ *
9740+ * This command is used by a Central or a Peripheral to request a change to
9741+ * existing connection parameters (see Section 4.5.1) using the Connection Rate Update
9742+ * procedure (see [Vol 6] Part B, Section 5.1.32) or the Connection Rate Request
9743+ * procedure (see [Vol 6] Part B, Section 5.1.33).
9744+ *
9745+ * The Connection_Interval_Min and Connection_Interval_Max parameters are used to
9746+ * define the minimum and maximum allowed connection interval.
9747+ *
9748+ * The Subrate_Min and Subrate_Max parameters specify the range of acceptable
9749+ * subrating factors being requested.
9750+ *
9751+ * The Max_Latency parameter specifies the maximum allowed Peripheral latency in units
9752+ * of subrated connection events. The same maximum shall apply irrespective of the
9753+ * subrating factor actually chosen.
9754+ *
9755+ * The Continuation_Number parameter specifies the number of underlying connection
9756+ * intervals to remain active after a packet other than an empty packet is transmitted or
9757+ * received.
9758+ *
9759+ * The Supervision_Timeout parameter specifies the link supervision timeout for the
9760+ * connection.
9761+ *
9762+ * If this command is issued on the Central, then it also sets the acceptable
9763+ * parameters for requests from the Peripheral (see [Vol 6] Part B, Section 5.1.33).
9764+ * The acceptable parameters set by this command override those provided via the
9765+ * HCI_LE_Set_Default_Rate_Parameters command or any values set by previous uses
9766+ * of this command on the same connection.
9767+ * The Min_CE_Length and Max_CE_Length parameters provide the Controller with the
9768+ * expected minimum and maximum length of the connection events. The Controller is not
9769+ * required to use these values.
9770+ *
9771+ * If this command is issued on the Central before the devices have performed the Feature
9772+ * Exchange procedure, then the Controller shall complete that procedure before initiating
9773+ * the Connection Rate Request procedure.
9774+ *
9775+ * Errors:
9776+ *
9777+ * See Section 4.5.2 for a list of error types and descriptions.
9778+ *
9779+ * Type Condition Error Code
9780+ * MC One or more CS procedures are enabled. Command Disallowed
9781+ * (0x0C)
9782+ * MC A Connection Parameters Request procedure or a Connec- Command Disallowed
9783+ * (0x0C)
9784+ * tion Subrate Request procedure is in progress.
9785+ * MC The Connection_Handle parameter does not identify an es- Unknown Connection
9786+ * Identifier
9787+ * tablished ACL connection. (0x02)
9788+ * MC Subrate_Max × (Max_Latency + 1) is greater than 500. Invalid HCI Command
9789+ * Param-
9790+ * eters (0x12)
9791+ * MC Connection_Interval_Max × Subrate_Max × (Max_Latency + Invalid HCI Command
9792+ * Param-
9793+ * 1) is greater than or equal to Supervision_Timeout × 40. eters (0x12)
9794+ * MC Connection_Interval_Max is less than Connection_Interval_- Invalid HCI Command
9795+ * Param-
9796+ * Min. eters (0x12)
9797+ * MC Connection_Interval_Min and Connection_Interval_Max Unsupported LL
9798+ * Parameter
9799+ * specify a range of connection intervals which is not suppor- Value (0x20)
9800+ * ted by the Controller.
9801+ * MC Connection_Interval_Max is less than connIntervalRequired Unsupported Feature or
9802+ * Pa-
9803+ * (see [Vol 6] Part B, Section 4.5.10). rameter Value (0x11)
9804+ * MC Subrate_Max is less than Subrate_Min. Invalid HCI Command
9805+ * Param-
9806+ * eters (0x12)
9807+ * MC Continuation_Number is greater than or equal to Sub- Invalid HCI Command
9808+ * Param-
9809+ * rate_Max. eters (0x12)
9810+ * MC The Connection Rate (Host Support) bit is not set in the local Unsupported Remote
9811+ * Feature
9812+ * or remote device’s FeatureSet. (0x1A)
9813+ * MC Max_CE_Length is less than Min_CE_Length Invalid HCI Command
9814+ * Param-
9815+ * eters (0x12)
9816+ *
9817+ * Event(s) generated (unless masked away):
9818+ * When the Controller receives the HCI_LE_Connection_Rate_Request command,
9819+ * the Controller shall send the HCI_Command_Status event to the Host. An
9820+ * HCI_LE_Connection_Rate_Change event shall be generated when the Connection
9821+ * Rate Update procedure or the Connection Rate Request procedure has completed.
9822+ *
9823+ * @param[in] p_params Input parameters.
9824+ *
9825+ * @retval 0 if success.
9826+ * @return Returns value between 0x01-0xFF in case of error.
9827+ * See Vol 2, Part D, Error for a list of error codes and descriptions.
9828+ */
9829+ uint8_t sdc_hci_cmd_le_conn_rate_request (const sdc_hci_cmd_le_conn_rate_request_t * p_params );
9830+
9831+ /** @brief LE Set Default Rate Parameters.
9832+ *
9833+ * The description below is extracted from Core_v6.2,
9834+ * Vol 4, Part E, Section 7.8.155
9835+ *
9836+ * This command is used by the Host to set the initial values of the acceptable parameters
9837+ * for the Connection Rate Request procedure for all future ACL connections where the
9838+ * Controller is Central. The command does not affect any existing connection.
9839+ *
9840+ * The parameters have the same meanings as those in the
9841+ * HCI_LE_Connection_Rate_Request command (see Section 7.8.154).
9842+ *
9843+ * Errors:
9844+ *
9845+ * See Section 4.5.2 for a list of error types and descriptions.
9846+ *
9847+ * Type Condition Error Code
9848+ * MC Subrate_Max × (Max_Latency + 1) is greater than 500. Invalid HCI Command Parameters
9849+ * (0x12)
9850+ * MC Connection_Interval_Max × Subrate_Max × (Max_La- Invalid HCI Command Parameters
9851+ * tency + 1) is greater than or equal to Supervi- (0x12)
9852+ * sion_Timeout × 40.
9853+ * MC Connection_Interval_Max is less than Connection_In- Invalid HCI Command Parameters
9854+ * terval_Min. (0x12)
9855+ * MC Subrate_Max is less than Subrate_Min. Invalid HCI Command Parameters
9856+ * (0x12)
9857+ * MC Continuation_Number is greater than or equal to Sub- Invalid HCI Command Parameters
9858+ * rate_Max. (0x12)
9859+ * MC Max_CE_Length is less than Min_CE_Length Invalid HCI Command Parameters
9860+ * (0x12)
9861+ *
9862+ * Event(s) generated (unless masked away):
9863+ * When the Controller receives the HCI_LE_Set_Default_Rate_Parameters command,
9864+ * the Controller shall send the HCI_Command_Complete event to the Host.
9865+ *
9866+ * @param[in] p_params Input parameters.
9867+ *
9868+ * @retval 0 if success.
9869+ * @return Returns value between 0x01-0xFF in case of error.
9870+ * See Vol 2, Part D, Error for a list of error codes and descriptions.
9871+ */
9872+ uint8_t sdc_hci_cmd_le_set_default_rate_params (const sdc_hci_cmd_le_set_default_rate_params_t * p_params );
9873+
9874+ /** @brief LE Read Minimum Supported Connection Interval.
9875+ *
9876+ * The description below is extracted from Core_v6.2,
9877+ * Vol 4, Part E, Section 7.8.156
9878+ *
9879+ * This command is used by the Host to determine the minimum supported connection
9880+ * interval and which other connection intervals (see [Vol 6] Part B, Section 4.5.1) the
9881+ * Controller supports.
9882+ *
9883+ * Each group shall represent a set of supported connection intervals forming an
9884+ * arithmetic sequence starting at Group_Min[i], ending at Group_Max[i], and in steps of
9885+ * Group_Stride[i]. For example, if Group_Min[i] = 0x0005, Group_Max[i] = 0x003C, and
9886+ * Group_Strides[i] = 0x000B, then this group indicates that the Controller supports the
9887+ * intervals 0.625 ms, 2.000 ms, 3.375 ms, 4.750 ms, 6.125 ms, and 7.500 ms.
9888+ *
9889+ * The returned groups should include between them every supported value that is in ECV
9890+ * and not in RCV but may include values in RCV. A supported value may be in more
9891+ * than one group. The Controller shall not include any group that only contains values
9892+ * from RCV or the minimum supported. If it would require too many groups to represent
9893+ * all supported values, then the Controller should represent as many supported values as
9894+ * possible.
9895+ *
9896+ * For example, if the Controller returns Num_Groups = 2, Group_Min[0] = 0x0005,
9897+ * Group_Max[0] = 0x0050, Group_Strides[0] = 0x0005, Group_Min[1] = 0x0050,
9898+ * Group_Max[1] = 0x0320, and Group_Strides[1] = 0x0008, then the Controller supports
9899+ * all connection interval values in RCV, all values up to 10 ms that are multiples of 625 μs,
9900+ * and all values between 10 ms and 100 ms that are multiples of 1 ms. If the Controller
9901+ * supports any other values, it should have included more groups.
9902+ *
9903+ * If the Controller only supports values from RCV, then it shall set Num_Groups to zero.
9904+ *
9905+ * Event(s) generated (unless masked away):
9906+ * When the HCI_LE_Read_Minimum_Supported_Connection_Interval command has
9907+ * completed, an HCI_Command_Complete event shall be generated.
9908+ *
9909+ * @param[out] p_return Extra return parameters.
9910+ *
9911+ * @retval 0 if success.
9912+ * @return Returns value between 0x01-0xFF in case of error.
9913+ * See Vol 2, Part D, Error for a list of error codes and descriptions.
9914+ */
9915+ uint8_t sdc_hci_cmd_le_read_min_supported_conn_interval (sdc_hci_cmd_le_read_min_supported_conn_interval_return_t * p_return );
9916+
96539917/** @} end of HCI_VS_API */
96549918
96559919/** @} */
0 commit comments