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

◆ sdc_hci_cmd_cb_host_number_of_completed_packets()

uint8_t sdc_hci_cmd_cb_host_number_of_completed_packets ( const sdc_hci_cmd_cb_host_number_of_completed_packets_t p_params)

#include <softdevice_controller/include/sdc_hci_cmd_controller_baseband.h>

Host Number Of Completed Packets.

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

The HCI_Host_Number_Of_Completed_Packets command is used by the Host to indicate to the Controller the number of HCI Data packets that have been completed for each Connection_Handle since the previous HCI_Host_- Number_Of_Completed_Packets command was sent to the Controller. This means that the corresponding buffer space has been freed in the Host and is available for new packets to be sent. Based on this information, and the Host_Total_Num_ACL_Data_Packets and Host_Total_Num_Synchronous_- Data_Packets command parameters of the HCI_Host_Buffer_Size command, the Controller can determine for which Connection_Handles the following HCI Data packets should be sent to the Host. When the Host has completed one or more HCI Data packet(s) it shall send an HCI_Host_Number_Of_Completed_- Packets command to the Controller, until it finally reports that all pending HCI Data packets have been completed. The frequency at which this command is sent is manufacturer specific.

The Set Controller To Host Flow Control command is used to turn flow control on or off. If flow control from the Controller to the Host is turned on, the HCI_Host_- Buffer_Size command shall always be sent by the Host after a power-on or a reset before the first HCI_Host_Number_Of_Completed_Packets command is sent.

The HCI_Host_Number_Of_Completed_Packets command may be sent at any time by the Host when there is at least one connection, or if the Controller is in local loopback mode, independent of other commands. If the Host issues this command when neither of these cases applies, the Controller shall ignore it.

Event(s) generated (unless masked away): Normally, no event is generated after the HCI_Host_Number_Of_Completed_- Packets command has completed. However, if the HCI_Host_Number_Of_- Completed_Packets command contains one or more invalid parameters, the Controller shall return an HCI_Command_Complete event containing the error code Invalid HCI Command Parameters (0x12). The normal flow control for commands is not used for this command.

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.