Functions
Functions
BLE Services » Sample Service (SAMPLES)

## Functions
sdk_err_t | samples_service_init (samples_init_t samples_init[], uint8_t ins_num)
| Initialize Sample Service instances and add in the DB. More...
sdk_err_t | samples_notify_tx_data (uint8_t conn_idx, uint8_t ins_idx, uint8_t *p_data, uint16_t length)
| Send data to peer device. More...

## Detailed Description

## Function Documentation

## ◆ samples_notify_tx_data()

sdk_err_t samples_notify_tx_data | ( | uint8_t | conn_idx,
|  | uint8_t | ins_idx,
|  | uint8_t * | p_data,
|  | uint16_t | length
| ) |  |

Send data to peer device.

Parameters

  [in] | conn_idx | Connection index
  [in] | ins_idx | Sample Service Instance Index
  [in] | p_data | The Pointer of sent value
  [in] | length | The Lenth of sent value

Returns
  Result of notify and indicate value

## ◆ samples_service_init()

sdk_err_t samples_service_init | ( | samples_init_t | samples_init[],
|  | uint8_t | ins_num
| ) |  |

Initialize Sample Service instances and add in the DB.

Parameters

  [in] | ins_num | The number of Sample Service instances.
  [in] | samples_init | The array of Sample Service initialization variables.

Returns
  Result of service initialization.