nrf-softdevice-s112

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gap_next_conn_evt_counter_get(
conn_handle: u16,
p_counter: *mut u16
) -> u32
Expand description

@brief Obtain the next connection event counter value.

@details The connection event counter is initialized to zero on the first connection event. The value is incremented by one for each connection event. For more information see Bluetooth Core Specification v5.0, Vol 6, Part B, Section 4.5.1.

@note The connection event counter obtained through this API will be outdated if this API is called at the same time as the connection event counter is incremented.

@note This API will always return the last connection event counter + 1. The actual connection event may be multiple connection events later if: - Slave latency is enabled and there is no data to transmit or receive. - Another role is scheduled with a higher priority at the same time as the next connection event.

@param[in] conn_handle Connection handle. @param[out] p_counter Pointer to the variable where the next connection event counter will be written.

@retval ::NRF_SUCCESS The connection event counter was successfully retrieved. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter supplied. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.