nRF51 SDK - S120 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
GAP Functions for managing memory for security keys on connectivity device.

GAP Connectivity auxiliary functions for providing static memory required by Soft Device. This memory is used to store GAP security keys. More...

Data Structures

struct  ser_ble_gap_conn_keyset_t
 GAP connection - keyset mapping structure. More...
 

Macros

#define SER_MAX_CONNECTIONS   2
 

Functions

uint32_t conn_ble_gap_sec_context_create (uint32_t *p_index)
 allocates instance in m_conn_keys_table[] for storage of encryption keys. More...
 
uint32_t conn_ble_gap_sec_context_destroy (uint16_t conn_handle)
 release instance identified by a connection handle. More...
 
uint32_t conn_ble_gap_sec_context_find (uint16_t conn_handle, uint32_t *p_index)
 finds index of instance identified by a connection handle in m_conn_keys_table[]. More...
 

Detailed Description

GAP Connectivity auxiliary functions for providing static memory required by Soft Device. This memory is used to store GAP security keys.

Function Documentation

uint32_t conn_ble_gap_sec_context_create ( uint32_t *  p_index)

allocates instance in m_conn_keys_table[] for storage of encryption keys.

Parameters
[out]p_indexpointer to the index of allocated instance
Return values
NRF_SUCCESSgreat success.
NRF_ERROR_NO_MEMno free instance available.
uint32_t conn_ble_gap_sec_context_destroy ( uint16_t  conn_handle)

release instance identified by a connection handle.

Parameters
[in]conn_handleconn_handle
Return values
NRF_SUCCESSContext released.
NRF_ERROR_NOT_FOUNDinstance with conn_handle not found
uint32_t conn_ble_gap_sec_context_find ( uint16_t  conn_handle,
uint32_t *  p_index 
)

finds index of instance identified by a connection handle in m_conn_keys_table[].

Parameters
[in]conn_handleconn_handle
[out]p_indexPointer to the index of entry in the context table corresponding to the given conn_handle
Return values
NRF_SUCCESSContext table entry found
NRF_ERROR_NOT_FOUNDinstance with conn_handle not found