/* Function for constructing the payload for a URI record. 
This function encodes the payload according to the URI record definition. It implements an API compatible with p_payload_constructor_t. */
static ret_code_t nfc_uri_payload_constructor(uri_payload_desc_t *p_input, uint8_t *p_buff, uint32_t *p_len)
/* Function for constructing the payload for a URI record. 
This function encodes the payload according to the URI record definition. It implements an API compatible with p_payload_constructor_t. */
static ret_code_t nfc_uri_payload_constructor(uri_payload_desc_t *p_input, uint8_t *p_buff, uint32_t *p_len)
{
    if(p_input->uri_data_len >= *p_len)
    {
        return NRF_ERROR_NO_MEM;
    }
    *p_len      = p_input->uri_data_len + 1;
    *(p_buff++) = p_input->uri_id_code;
    memcpy(p_buff, p_input->p_uri_data, p_input->uri_data_len );
    return NRF_SUCCESS;
}