Functions for managing memory for user memory request in the application device.

nRF5 SDK v12.1.0

Application auxiliary functions for synchronizing user memory with the one stored in the connectivity device. More...

Data Structures

struct ser_ble_user_mem_t
Connection - user memory mapping structure. More...

Functions

uint32_t app_ble_user_mem_context_create (uint16_t conn_handle, uint32_t *p_index)
Allocates instance in m_user_mem_table[] for storage. More...
uint32_t app_ble_user_mem_context_destroy (uint16_t conn_handle)
Release instance identified by a connection handle. More...
uint32_t app_ble_user_mem_context_find (uint16_t conn_handle, uint32_t *p_index)
Finds index of the instance identified by a connection handle in m_user_mem_table[]. More...

Detailed Description

Application auxiliary functions for synchronizing user memory with the one stored in the connectivity device.

Function Documentation

uint32_t app_ble_user_mem_context_create ( uint16_t conn_handle ,
uint32_t * p_index
)

Allocates instance in m_user_mem_table[] for storage.

Parameters
[in] conn_handle conn_handle
[out] p_index Pointer to the index of the allocated instance.
Return values
NRF_SUCCESS Context allocated.
NRF_ERROR_NO_MEM No free instance available.
uint32_t app_ble_user_mem_context_destroy ( uint16_t conn_handle )

Release instance identified by a connection handle.

Parameters
[in] conn_handle conn_handle
Return values
NRF_SUCCESS Context released.
NRF_ERROR_NOT_FOUND Instance with conn_handle not found.
uint32_t app_ble_user_mem_context_find ( uint16_t conn_handle ,
uint32_t * p_index
)

Finds index of the instance identified by a connection handle in m_user_mem_table[].

Parameters
[in] conn_handle conn_handle
[out] p_index Pointer to the index of the entry in the context table corresponding to the given conn_handle.
Return values
NRF_SUCCESS Context found.
NRF_ERROR_NOT_FOUND Instance with conn_handle not found.