2Mbps Feature API

group group_ble_common_2MBPS_api_functions

The API are used for enable user to use 2Mbps feature of BLE Stack.

Functions

cy_en_ble_api_result_t Cy_BLE_SetPhy(const cy_stc_ble_set_phy_info_t *param)

This function allows application to set the PHY for the current connection.

This is a non-blocking function and successful operation is informed through ‘CY_BLE_EVT_SET_PHY_COMPLETE’. Actual PHY used by controller will be informed through the ‘CY_BLE_EVT_PHY_UPDATE_COMPLETE’ event.

Errors codes

Description

CY_BLE_SUCCESS

On successful operation.

CY_BLE_ERROR_NO_DEVICE_ENTITY

Device identified by bdHandle is not present

CY_BLE_ERROR_INVALID_PARAMETER

Null pointer passed.

CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED

If Memory allocation failed.

CY_BLE_ERROR_INSUFFICIENT_RESOURCES

If BLE Stack resources are unavailable.

Parameters

param – parameter is of type ‘cy_stc_ble_set_phy_info_t’.

Returns

cy_en_ble_api_result_t : Return value indicates whether the function succeeded or failed. Following are the possible error codes.

cy_en_ble_api_result_t Cy_BLE_GetPhy(uint8_t param)

This function allows the application to read the current PHY setting for the specified connection.

This is a non-blocking function. Current PHY setting (TxPhy, RxPhy) is informed through ‘CY_BLE_EVT_GET_PHY_COMPLETE’ event.

Errors codes

Description

CY_BLE_SUCCESS

On successful operation.

CY_BLE_ERROR_NO_DEVICE_ENTITY

Device identified by bdHandle is not present.

CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED

If Memory allocation failed.

CY_BLE_ERROR_INSUFFICIENT_RESOURCES

If BLE Stack resources are unavailable.

Parameters

param – Peer bdHandle

Returns

cy_en_ble_api_result_t : Return value indicates whether the function succeeded or failed. Following are the possible error codes.