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

◆ NFC_NDEF_CH_RECORD_DESC_DEF

#define NFC_NDEF_CH_RECORD_DESC_DEF ( _name,
_rec_type_field,
_major_version,
_minor_version,
_max_records )

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

Value:
NFC_NDEF_MSG_DEF(_name, _max_records); \
struct nfc_ndef_ch_rec _name##_nfc_ch_rec = { \
.major_version = _major_version, \
.minor_version = _minor_version, \
.local_records = &NFC_NDEF_MSG(_name) \
}; \
NFC_NDEF_GENERIC_RECORD_DESC_DEF(_name, \
0, \
0, \
_rec_type_field, \
&(_name##_nfc_ch_rec))
int nfc_ndef_ch_rec_payload_encode(const struct nfc_ndef_ch_rec *ch_rec, uint8_t *buf, uint32_t *len)
Constructor for an NFC Connection Handover generic record payload.
#define NFC_NDEF_CH_REC_TYPE_LENGTH
Size of the type field of the Connection Handover records. Record types are defined in the file ch_re...
Definition ch.h:34
#define NFC_NDEF_MSG_DEF(name, max_record_cnt)
Macro for creating and initializing an NFC NDEF message descriptor.
Definition msg.h:97
#define NFC_NDEF_MSG(name)
Macro for accessing the NFC NDEF message descriptor instance that you created with NFC_NDEF_MSG_DEF.
Definition msg.h:110
@ TNF_WELL_KNOWN
Definition record.h:71
Handover Select record payload descriptor.
Definition ch.h:137

Macro for creating and initializing an NFC NDEF record descriptor for the Connection Handover.

This macro creates and initializes an instance of type nfc_ndef_record_desc and an instance of type nfc_ndef_ch_rec, which together constitute an instance of a Connection Handover record.

Use the macro NFC_NDEF_CH_RECORD_DESC to access the NDEF Connection Handover record descriptor instance.

Parameters
[in]_nameName of the created record descriptor instance.
[in]_rec_type_fieldThe NFC Forum Well Known Type Connection Handover record type.
[in]_major_versionMajor version number of the supported Connection Handover specification.
[in]_minor_versionMinor version number of the supported Connection Handover specification.
[in]_max_recordsMaximum number of local records.