R1 code for micro:bit based train controller code, requires second micro:bit running rx code to operate - see https://meanderingpi.wordpress.com/ for more information

Fork of nrf51-sdk by Lancaster University

Embed: (wiki syntax)

« Back to documentation index

ble_gap_opt_local_conn_latency_t Struct Reference

ble_gap_opt_local_conn_latency_t Struct Reference

Local connection latency option. More...

#include <ble_gap.h>

Data Fields

uint16_t conn_handle
 Connection Handle.
uint16_t requested_latency
 Requested local connection latency.
uint16_t * p_actual_latency
 Pointer to storage for the actual local connection latency (can be set to NULL to skip return value).

Detailed Description

Local connection latency option.

Local connection latency is a feature which enables the slave to improve current consumption by ignoring the slave latency set by the peer. The local connection latency can only be set to a multiple of the slave latency, and cannot be longer than half of the supervision timeout.

Used with sd_ble_opt_set to set the local connection latency. The sd_ble_opt_get is not supported for this option, but the actual local connection latency (unless set to NULL) is set as a return parameter when setting the option.

The latency set will be truncated down to the closest slave latency event multiple, or the nearest multiple before half of the supervision timeout.
The local connection latency is disabled by default, and needs to be enabled for new connections and whenever the connection is updated.
Return values:
NRF_SUCCESSSet successfully.
NRF_ERROR_NOT_SUPPORTEDGet is not supported.
BLE_ERROR_INVALID_CONN_HANDLEInvalid connection handle parameter.

Definition at line 797 of file ble_gap.h.

Field Documentation

uint16_t conn_handle

Connection Handle.

Definition at line 799 of file ble_gap.h.

uint16_t* p_actual_latency

Pointer to storage for the actual local connection latency (can be set to NULL to skip return value).

Definition at line 801 of file ble_gap.h.

Requested local connection latency.

Definition at line 800 of file ble_gap.h.