Generation of NFC NDEF Text record descriptions. More...
Data Structures | |
struct | nfc_text_rec_payload_desc_t |
Text record payload descriptor. More... | |
Macros | |
#define | NFC_TEXT_REC_TYPE_LENGTH 1 |
Size of the type field of the Text record, defined in the file nfc_text_rec.c . It is used in the NFC_NDEF_TEXT_RECORD_DESC_DEF macro. | |
#define | NFC_NDEF_TEXT_RECORD_DESC_DEF(NAME,UTF,P_LANG_CODE,LANG_CODE_LEN,P_DATA,DATA_LEN) |
Macro for creating and initializing an NFC NDEF record descriptor for a Text record. More... | |
#define | NFC_NDEF_TEXT_RECORD_DESC(NAME) NFC_NDEF_GENERIC_RECORD_DESC(NAME) |
Macro for accessing the NFC NDEF Text record descriptor instance that was created with NFC_NDEF_TEXT_RECORD_DESC_DEF. | |
Enumerations | |
enum | nfc_text_rec_utf_type_t { UTF_8 = 0, UTF_16 = 1 } |
Type of the Unicode Transformation Format. More... | |
Functions | |
ret_code_t | nfc_text_rec_payload_constructor (nfc_text_rec_payload_desc_t *p_nfc_rec_text_payload_desc, uint8_t *p_buff, uint32_t *p_len) |
Constructor for an NFC NDEF Text record payload. More... | |
Variables | |
const uint8_t | nfc_text_rec_type_field [] |
External reference to the type field of the Text record, defined in the file nfc_text_rec.c . It is used in the NFC_NDEF_TEXT_RECORD_DESC_DEF macro. | |
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 | |||
) |
Macro for creating and initializing an NFC NDEF record descriptor for a Text record.
This macro creates and initializes a static instance of type nfc_ndef_record_desc_t and a static 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.
[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. |
ret_code_t nfc_text_rec_payload_constructor | ( | nfc_text_rec_payload_desc_t * | p_nfc_rec_text_payload_desc, |
uint8_t * | p_buff, | ||
uint32_t * | p_len | ||
) |
Constructor for an NFC NDEF Text record payload.
[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. |