nRF51 SDK: Utility APIs

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Utility APIs
Device Module APIs

This section describes the utility APIs offered by the module. More...

## Functions

api_result_t | dm_application_instance_set (dm_application_instance_t const *p_appl_instance, dm_handle_t const *p_handle)
| Set/Copy Application instance to Device Manager handle. More...
api_result_t | dm_peer_addr_get (dm_handle_t const *p_handle, ble_gap_addr_t *p_addr)
| Get peer's device address. More...
api_result_t | dm_peer_addr_set (dm_handle_t const *p_handle, ble_gap_addr_t const *p_addr)
| Set/Update peer's device address. More...
api_result_t | dm_handle_initialize (dm_handle_t *p_handle)
| Initialize Device Manager handle. More...

## Detailed Description

This section describes the utility APIs offered by the module.

APIs defined in this section are utility or assisting/helper APIs.

## Function Documentation

api_result_t dm_application_instance_set | ( | dm_application_instance_t const * | p_appl_instance,
|  | dm_handle_t const * | p_handle
| ) |  |

Set/Copy Application instance to Device Manager handle.

Parameters

  [in] | p_appl_instance | Application instance to be set.
  [out] | p_handle | Device Manager handle for which the instance is to be copied.

Returns
  NRF_SUCCESS or an appropriate error code indicating reason for failure.

api_result_t dm_handle_initialize | ( | dm_handle_t * | p_handle | ) |

Initialize Device Manager handle.

Parameters

  [in] | p_handle | Device Manager handle to be initialized.

Returns
  NRF_SUCCESS or an appropriate error code indicating reason for failure.

api_result_t dm_peer_addr_get | ( | dm_handle_t const * | p_handle,
|  | ble_gap_addr_t * | p_addr
| ) |  |

Get peer's device address.

Parameters

  [in] | p_handle | Identifies the peer device whose address is requested.
  [out] | p_addr | Pointer where address is to be copied.

Returns
  NRF_SUCCESS or an appropriate error code indicating reason for failure.

api_result_t dm_peer_addr_set | ( | dm_handle_t const * | p_handle,
|  | ble_gap_addr_t const * | p_addr
| ) |  |

Set/Update peer's device address.

Parameters

  [in] | p_handle | Identifies the peer device whose address is requested to be set/updated.
  [out] | p_addr | Address to be set/updated with.

Returns
  NRF_SUCCESS or an appropriate error code indicating reason for failure.