S115 SoftDevice for nRF54LV10 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gap_next_conn_evt_counter_get()

uint32_t sd_ble_gap_next_conn_evt_counter_get ( uint16_t conn_handle,
uint16_t * p_counter )

#include <ble_gap.h>

Obtain the next connection event counter value.

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, 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.
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.
Parameters
[in]conn_handleConnection handle.
[out]p_counterPointer to the variable where the next connection event counter will be written.
Return values
NRF_SUCCESSThe connection event counter was successfully retrieved.
BLE_ERROR_INVALID_CONN_HANDLEInvalid connection handle parameter supplied.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.