pub unsafe fn sd_ble_uuid_decode(
    uuid_le_len: u8,
    p_uuid_le: *const u8,
    p_uuid: *mut ble_uuid_t
) -> u32
Expand description

@brief Decode little endian raw UUID bytes (16-bit or 128-bit) into a 24 bit @ref ble_uuid_t structure.

@details The raw UUID bytes excluding bytes 12 and 13 (i.e. bytes 0-11 and 14-15) of p_uuid_le are compared to the corresponding ones in each entry of the table of Vendor Specific base UUIDs populated with @ref sd_ble_uuid_vs_add to look for a match. If there is such a match, bytes 12 and 13 are returned as p_uuid->uuid and the index relative to @ref BLE_UUID_TYPE_VENDOR_BEGIN as p_uuid->type.

@note If the UUID length supplied is 2, then the type set by this call will always be @ref BLE_UUID_TYPE_BLE.

@param[in] uuid_le_len Length in bytes of the buffer pointed to by p_uuid_le (must be 2 or 16 bytes). @param[in] p_uuid_le Pointer pointing to little endian raw UUID bytes. @param[out] p_uuid Pointer to a @ref ble_uuid_t structure to be filled in.

@retval ::NRF_SUCCESS Successfully decoded into the @ref ble_uuid_t structure. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length. @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs.