nRF5 SDK v17.1.0
Modules | Data Structures | Macros | Enumerations | Functions | Variables

Generation of NFC NDEF Text record descriptions. More...

Modules

 Encoding data for a text record for NFC Tag configuration
 

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.
 

Detailed Description

Generation of NFC NDEF Text record descriptions.

Macro Definition Documentation

#define NFC_NDEF_TEXT_RECORD_DESC_DEF (   NAME,
  UTF,
  P_LANG_CODE,
  LANG_CODE_LEN,
  P_DATA,
  DATA_LEN 
)
Value:
nfc_text_rec_payload_desc_t NAME##_nfc_text_rec_payload_desc = \
{ \
.utf = UTF, \
.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]NAMEName of the created record descriptor instance.
[in]UTFUnicode Transformation Format.
[in]P_LANG_CODEPointer to the IANA language code.
[in]LANG_CODE_LENLength of the IANA language code.
[in]P_DATAPointer to the user text.
[in]DATA_LENLength of the user text.

Enumeration Type Documentation

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.

Function Documentation

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.

Parameters
[in]p_nfc_rec_text_payload_descPointer to the Text record description.
[out]p_buffPointer to the payload destination. If NULL, function will calculate the expected size of the Text record payload.
[in,out]p_lenSize of the available memory to write as input. Size of the generated record payload as output.

Documentation feedback | Developer Zone | Subscribe | Updated