nrfxlib API 0.1.0
|
uint8_t sdc_hci_cmd_le_set_phy | ( | const sdc_hci_cmd_le_set_phy_t * | p_params | ) |
#include <softdevice_controller/include/sdc_hci_cmd_le.h>
LE Set PHY.
The description below is extracted from Core_v5.4, Vol 4, Part E, Section 7.8.49
The HCI_LE_Set_PHY command is used to set the PHY preferences for the connection identified by the Connection_Handle. The Controller might not be able to make the change (e.g. because the peer does not support the requested PHY) or may decide that the current PHY is preferable (e.g., because it could not schedule other activities if the requested PHY was used or because it requires a PHY that supports Constant Tone Extensions).
The All_PHYs parameter is a bit field that allows the Host to specify, for each direction, whether it has no preference among the PHYs that the Controller supports in a given direction or whether it has specified particular PHYs that it prefers in the TX_PHYs or RX_PHYs parameter.
The TX_PHYs parameter is a bit field that indicates the transmitter PHYs that the Host prefers the Controller to use. If the All_PHYs parameter specifies that the Host has no preference, the TX_PHYs parameter shall be ignored; otherwise at least one bit shall be set to 1.
The RX_PHYs parameter is a bit field that indicates the receiver PHYs that the Host prefers the Controller to use. If the All_PHYs parameter specifies that the Host has no preference, the RX_PHYs parameter shall be ignored; otherwise at least one bit shall be set to 1.
The Controller shall request a change unless it determines that this is unnecessary or that the current PHY is preferable, in which case it may, but need not, request a change.
The PHY preferences provided by the HCI_LE_Set_PHY command override those provided via the HCI_LE_Set_Default_PHY command (Section 7.8.48) or any preferences previously set using the HCI_LE_Set_PHY command on the same connection.
The PHY_Options parameter is a bit field that allows the Host to specify options for PHYs. The default value for a new connection shall be all zero bits. The Controller may override any preferred coding for transmitting on the LE Coded PHY. The Host may specify a preferred coding even if it prefers not to use the LE Coded transmitter PHY since the Controller may override the PHY preference.
If the Host sets, in the TX_PHYs or RX_PHYs parameter, a bit for a PHY that the Controller does not support, including a bit that is reserved for future use, the Controller shall return the error code Unsupported Feature or Parameter Value (0x11).
If the Controller does not support asymmetric connections (see [Vol 6] Part B, Section 4.6.9.1) and the Host sets All_PHYs to 0x00 and TX_PHYs to a different value than RX_PHYs, the Controller shall return the error code Unsupported Feature or Parameter Value (0x11).
Event(s) generated (unless masked away): When the Controller receives the HCI_LE_Set_PHY command, the Controller shall send the HCI_Command_Status event to the Host. The HCI_LE_PHY_- Update_Complete event shall be generated either when one or both PHY changes or when the Controller determines that neither PHY will change immediately.
Note: If the peer negotiation resulted in no change to either PHY, this is not an error and the HCI_LE_PHY_Update_Complete event will contain a status indicating success.
[in] | p_params | Input parameters. |
0 | if success. |