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

◆ NFC_NDEF_TEXT_RECORD_DESC_DEF

#define NFC_NDEF_TEXT_RECORD_DESC_DEF (   name,
  utf_arg,
  lang_code_arg,
  lang_code_len_arg,
  data_arg,
  data_len_arg 
)

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

Value:
struct nfc_ndef_text_rec_payload name##_nfc_ndef_text_rec_payload = \
{ \
.utf = utf_arg, \
.lang_code = lang_code_arg, \
.lang_code_len = lang_code_len_arg, \
.data = data_arg, \
.data_len = data_len_arg, \
}; \
NFC_NDEF_GENERIC_RECORD_DESC_DEF(name, \
0, \
0, \
&(name##_nfc_ndef_text_rec_payload))
@ TNF_WELL_KNOWN
Definition: record.h:71
const uint8_t nfc_ndef_text_rec_type_field[]
External reference to the type field of the Text record, defined in the file text_rec....
#define NFC_NDEF_TEXT_REC_TYPE_LENGTH
Size of the type field of the Text record, defined in the file text_rec.c. It is used in the NFC_NDEF...
Definition: text_rec.h:84
int nfc_ndef_text_rec_payload_encode(struct nfc_ndef_text_rec_payload *nfc_rec_text_payload_desc, uint8_t *buff, uint32_t *len)
Constructor for an NFC NDEF Text record payload.
enum nfc_ndef_text_rec_utf utf
Definition: text_rec.h:44
Text record payload descriptor.
Definition: text_rec.h:42

Macro for creating and initializing an NFC NDEF record descriptor for a Text record.

This macro creates and initializes an instance of type nfc_ndef_record_desc and an instance of type nfc_ndef_text_rec_payload, which together constitute an instance of a Text record.

Use the macro NFC_NDEF_TEXT_RECORD_DESC to access the NDEF Text record descriptor instance.

Parameters
nameName of the created record descriptor instance.
utf_argUnicode Transformation Format.
lang_code_argPointer to the IANA language code.
lang_code_len_argLength of the IANA language code.
data_argPointer to the user text.
data_len_argLength of the user text.