nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ NFC_NDEF_URI_RECORD_DESC_DEF

#define NFC_NDEF_URI_RECORD_DESC_DEF ( name,
uri_id_code_arg,
uri_data_arg,
uri_data_len_arg )

#include <include/nfc/ndef/uri_rec.h>

Value:
struct nfc_ndef_uri_rec_payload name##_ndef_uri_record_payload_desc = \
{ \
.uri_id_code = (uri_id_code_arg), \
.uri_data = (uri_data_arg), \
.uri_data_len = (uri_data_len_arg) \
}; \
\
NFC_NDEF_GENERIC_RECORD_DESC_DEF(name, \
NULL, \
0, \
&name##_ndef_uri_record_payload_desc) \
@ TNF_WELL_KNOWN
Definition record.h:71
int nfc_ndef_uri_rec_payload_encode(struct nfc_ndef_uri_rec_payload *input, uint8_t *buff, uint32_t *len)
Construct the payload for a URI record.
const uint8_t nfc_ndef_uri_rec_type
External reference to the type field of the URI record, defined in the file uri_rec....
uint8_t const * uri_data
Definition uri_rec.h:81
Type of description of the payload of a URI record.
Definition uri_rec.h:77

Macro for generating a description of a URI record.

This macro initializes an instance of an NFC NDEF record description of a URI record.

Note
The record descriptor is declared as automatic variable, which implies that the NDEF message encoding (see nfc_ndef_uri_msg_encode) must be done in the same variable scope.
Parameters
nameName for accessing record descriptor.
uri_id_code_argURI identifier code that defines the protocol field of the URI.
uri_data_argPointer to the URI string. The string should not contain the protocol field if the protocol was specified in uri_id_code.
uri_data_len_argLength of the URI string.