Generation of NFC NDEF Text record descriptions.
More...
Generation of NFC NDEF Text record descriptions.
#define NFC_NDEF_TEXT_RECORD_DESC_DEF |
( |
|
NAME, |
|
|
|
UTF, |
|
|
|
P_LANG_CODE, |
|
|
|
LANG_CODE_LEN, |
|
|
|
P_DATA, |
|
|
|
DATA_LEN |
|
) |
| |
Value:
{ \
.p_lang_code = P_LANG_CODE, \
.lang_code_len = LANG_CODE_LEN, \
.p_data = P_DATA, \
.data_len = DATA_LEN, \
}; \
NFC_NDEF_GENERIC_RECORD_DESC_DEF(NAME, \
0, \
0, \
&(NAME##_nfc_text_rec_payload_desc))
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_t and an instance of type nfc_text_rec_payload_desc_t, 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
-
[in] | NAME | Name of the created record descriptor instance. |
[in] | UTF | Unicode Transformation Format. |
[in] | P_LANG_CODE | Pointer to the IANA language code. |
[in] | LANG_CODE_LEN | Length of the IANA language code. |
[in] | P_DATA | Pointer to the user text. |
[in] | DATA_LEN | Length of the user text. |
Type of the Unicode Transformation Format.
Values to specify the type of UTF for an NFC NDEF Text record.
Enumerator |
---|
UTF_8 |
Unicode Transformation Format 8.
|
UTF_16 |
Unicode Transformation Format 16.
|
Constructor for an NFC NDEF Text record payload.
- Parameters
-
[in] | p_nfc_rec_text_payload_desc | Pointer to the Text record description. |
[out] | p_buff | Pointer to the payload destination. If NULL, function will calculate the expected size of the Text record payload. |
[in,out] | p_len | Size of the available memory to write as input. Size of the generated record payload as output. |