Function nrf_softdevice_s113::sd_ble_gap_device_name_get
source · pub unsafe fn sd_ble_gap_device_name_get(
p_dev_name: *mut u8,
p_len: *mut u16
) -> u32
Expand description
@brief Get GAP device name.
@note If the device name is longer than the size of the supplied buffer, p_len will return the complete device name length, and not the number of bytes actually returned in p_dev_name. The application may use this information to allocate a suitable buffer size.
@param[out] p_dev_name Pointer to an empty buffer where the UTF-8 non NULL-terminated string will be placed. Set to NULL to obtain the complete device name length. @param[in,out] p_len Length of the buffer pointed by p_dev_name, complete device name length on output.
@retval ::NRF_SUCCESS GAP device name retrieved successfully. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied.