/* Function for generating a description of a simplified EP OOB message according to the BLE AD structure. 
This function declares and initializes a static instance of a simplified EP OOB message with Bluetooth Carrier Configuration EP record. Payload of this record can be configured via AD structure. */
static ret_code_t nfc_ble_simplified_ep_oob_msg_declare(ble_advdata_t const *const p_ep_advdata, nfc_ndef_msg_desc_t **pp_ep_oob_msg_desc)
/* Function for generating a description of a simplified EP OOB message according to the BLE AD structure. 
This function declares and initializes a static instance of a simplified EP OOB message with Bluetooth Carrier Configuration EP record. Payload of this record can be configured via AD structure. */
static ret_code_t nfc_ble_simplified_ep_oob_msg_declare(ble_advdata_t const *const p_ep_advdata, nfc_ndef_msg_desc_t **pp_ep_oob_msg_desc)
{
    ret_code_t err_code;
    nfc_ndef_record_desc_t * p_nfc_ep_oob_record;
    NFC_NDEF_MSG_DEF(nfc_ep_oob_msg, 1);
    nfc_ndef_msg_clear(&NFC_NDEF_MSG(nfc_ep_oob_msg));
    if(p_ep_advdata != NULL)
    {
        p_nfc_ep_oob_record = nfc_ep_oob_rec_declare(0 , p_ep_advdata);
        err_code = nfc_ndef_msg_record_add(&NFC_NDEF_MSG(nfc_ep_oob_msg), p_nfc_ep_oob_record);
        if (err_code != NRF_SUCCESS)
        {
            return err_code;
        }
    }
    else
    {
        return NRF_ERROR_INVALID_PARAM;
    }
    *pp_ep_oob_msg_desc = &NFC_NDEF_MSG(nfc_ep_oob_msg);
    return NRF_SUCCESS;
}