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

◆ NFC_NDEF_MSG_DEF

#define NFC_NDEF_MSG_DEF (   name,
  max_record_cnt 
)

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

Value:
struct nfc_ndef_record_desc const \
*name##_nfc_ndef_record_desc_array[max_record_cnt]; \
struct nfc_ndef_msg_desc name##_nfc_ndef_msg_desc = \
{ \
.record = name##_nfc_ndef_record_desc_array, \
.max_record_count = max_record_cnt, \
.record_count = 0 \
}
struct nfc_ndef_record_desc const ** record
Definition: msg.h:32
NDEF message descriptor.
Definition: msg.h:30
NDEF record descriptor.
Definition: record.h:91

Macro for creating and initializing an NFC NDEF message descriptor.

This macro creates and initializes an instance of type nfc_ndef_msg_desc and an array of pointers to record descriptors (nfc_ndef_record_desc) used by the message.

Use the macro NFC_NDEF_MSG to access the NDEF message descriptor instance.

Note
The message descriptor is declared as automatic variable, which implies that the NDEF message encoding must be done in the same variable scope.
Parameters
nameName of the related instance.
max_record_cntMaximal count of records in the message.