Function nrf_softdevice_s140::sd_ble_gap_rssi_get
source · pub unsafe fn sd_ble_gap_rssi_get(
conn_handle: u16,
p_rssi: *mut i8,
p_ch_index: *mut u8
) -> u32
Expand description
@brief Get the received signal strength for the last connection event.
@ref sd_ble_gap_rssi_start must be called to start reporting RSSI before using this function. @ref NRF_ERROR_NOT_FOUND
will be returned until RSSI was sampled for the first time after calling @ref sd_ble_gap_rssi_start.
@note ERRATA-153 requires the rssi sample to be compensated based on a temperature measurement. @mscs @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} @endmscs
@param[in] conn_handle Connection handle. @param[out] p_rssi Pointer to the location where the RSSI measurement shall be stored. @param[out] p_ch_index Pointer to the location where Channel Index for the RSSI measurement shall be stored.
@retval ::NRF_SUCCESS Successfully read the RSSI. @retval ::NRF_ERROR_NOT_FOUND No sample is available. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. @retval ::NRF_ERROR_INVALID_STATE RSSI reporting is not ongoing.