nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ sdc_hci_cmd_cb_host_buffer_size()

uint8_t sdc_hci_cmd_cb_host_buffer_size ( const sdc_hci_cmd_cb_host_buffer_size_t p_params)

#include <softdevice_controller/include/sdc_hci_cmd_controller_baseband.h>

Host Buffer Size.

The description below is extracted from Core_v5.4, Vol 4, Part E, Section 7.3.39

The HCI_Host_Buffer_Size command is used by the Host to notify the Controller about the maximum size of the data portion of HCI ACL and Synchronous Data packets sent from the Controller to the Host. The Controller shall segment the data to be transmitted from the Controller to the Host according to these sizes, so that the HCI Data packets will contain data with up to these sizes. The HCI_Host_Buffer_Size command also notifies the Controller about the total number of HCI ACL and Synchronous Data packets that can be stored in the data buffers of the Host. If flow control from the Controller to the Host is turned off, and the HCI_Host_Buffer_Size command has not been issued by the Host, this means that the Controller will send HCI Data packets to the Host with any lengths the Controller wants to use, and it is assumed that the data buffer sizes of the Host are unlimited. If flow control from the Controller to the Host is turned on, the HCI_Host_Buffer_Size command shall after a power-on or a reset always be sent by the Host before the first HCI_Host_Number_Of_Completed_Packets command is sent.

The Set Controller To Host Flow Control command is used to turn flow control on or off. The Host_ACL_Data_Packet_Length command parameter will be used to determine the size of the L2CAP segments contained in ACL Data packets, which are transferred from the Controller to the Host. The Host_Synchronous_Data_Packet_Length command parameter is used to determine the maximum size of HCI Synchronous Data packets. Both the Host and the Controller shall support command and event packets, where the data portion (excluding header) contained in the packets is 255 octets in size.

The Host_Total_Num_ACL_Data_Packets command parameter contains the total number of HCI ACL Data packets that can be stored in the data buffers of the Host. The Controller will determine how the buffers are to be divided between different Connection_Handles. The Host_Total_Num_Synchronous_- Data_Packets command parameter gives the same information for HCI Synchronous Data packets. If the Host does not support SCO or eSCO over HCI, then it shall set Host_Total_Num_Synchronous_Data_Packets to zero, in which case the Controller shall ignore the Host_Synchronous_Data_Packet_- Length parameter. Note: The Host_ACL_Data_Packet_Length and Host_Synchronous_Data_- Packet_Length command parameters do not include the length of the HCI ACL Data packet header or the HCI Synchronous Data packet header respectively.

Event(s) generated (unless masked away): When the HCI_Host_Buffer_Size command has completed, an HCI_Command_Complete event shall be generated.

Parameters
[in]p_paramsInput parameters.
Return values
0if success.
Returns
Returns value between 0x01-0xFF in case of error. See Vol 2, Part D, Error for a list of error codes and descriptions.