libraries/Bluefruit52Lib/src/BLECharacteristic.cpp
/**
 * Read Characteristic's value
 * @param buffer  memory to hold value
 * @param len     size of memory
 * @param offset  offset of value (dfeault is 0)
 * @return  number of read bytes
 */
Read Characteristic's value
@param buffer  memory to hold value
@param len     size of memory
@param offset  offset of value (dfeault is 0)
@return  number of read bytes
Read Characteristic ' s value @param buffer memory to hold value @param len size of memory @param offset offset of value ( dfeault is 0 ) @return number of read bytes
uint16_t BLECharacteristic::read(void* buffer, uint16_t bufsize, uint16_t offset)
{
  ble_gatts_value_t value =
  {
      .len     = bufsize,
      .offset  = offset,
      .p_value = (uint8_t*) buffer
  };
  VERIFY_STATUS(sd_ble_gatts_value_get(BLE_CONN_HANDLE_INVALID, _handles.value_handle, &value), 0);
  return value.len;
}
uint16_t BLECharacteristic :: read ( void * buffer , uint16_t bufsize , uint16_t offset ) { ble_gatts_value_t value = { . len = bufsize , . offset = offset , . p_value = ( uint8_t * ) buffer } ; VERIFY_STATUS ( sd_ble_gatts_value_get ( BLE_CONN_HANDLE_INVALID , _handles . value_handle , & value ) , 0 ) ; return value . len ; }
Read Characteristic's value
 @param buffer  memory to hold value
 @param len     size of memory
 @param offset  offset of value (dfeault is 0)
 @return  number of read bytes
Read Characteristic ' s value @param buffer memory to hold value @param len size of memory @param offset offset of value ( dfeault is 0 ) @return number of read bytes
// conn handle only needed for system attribute