nrf52832學習筆記(3)設置發射功率

只要調用下面api就可以設置發射功率

/*
 * @param[in] tx_power Radio transmit power in dBm (accepted values are -40, -30, -20, -16, -12, -8, -4, 0, and 4 dBm).
 *
 * @note The -30dBm setting is only available on nRF51 series ICs.
 * @note The -40dBm setting is only available on nRF52 series ICs.
 *
 * @retval ::NRF_SUCCESS Successfully changed the transmit power.
 * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.
 */
uint32_t, sd_ble_gap_tx_power_set(int8_t tx_power));

只要調用這個函數就可以設置發射功率
在gap參數初始化裏
在這裏插入圖片描述

在廣播初始化時也可以設置發射功率
在這裏插入圖片描述

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章