Skip to main content

esp_ble_tx_power_set

Function esp_ble_tx_power_set 

Source
pub unsafe extern "C" fn esp_ble_tx_power_set(
    power_type: u32,
    power_level: u32,
) -> i32
Expand description

@brief Set BLE TX power for the specified power type

It is recommended to use esp_ble_tx_power_set_enhanced to set TX power for individual advertising and connection handle.

@note Connection TX power should only be set after the connection is established.

@param[in] power_type The type of TX power. It could be Advertising, Connection, or Default. @param[in] power_level Power level (index) corresponding to the absolute value (dBm)

@return - ESP_OK: Success - ESP_ERR_NOT_SUPPORTED: Invalid TX power type - ESP_FAIL: Failure due to other reasons