10#include <zephyr/types.h>
98#define NFC_NDEF_MSG_DEF(name, max_record_cnt) \
99 struct nfc_ndef_record_desc const \
100 *name##_nfc_ndef_record_desc_array[max_record_cnt]; \
101 struct nfc_ndef_msg_desc name##_nfc_ndef_msg_desc = \
103 .record = name##_nfc_ndef_record_desc_array, \
104 .max_record_count = max_record_cnt, \
111#define NFC_NDEF_MSG(name) (name##_nfc_ndef_msg_desc)
136#define NFC_NDEF_NESTED_NDEF_MSG_RECORD_DEF(name, \
143 struct nfc_ndef_record_desc name##_ndef_record_nested_desc = \
146 .id_length = id_len, \
148 .type_length = type_len, \
150 .payload_constructor = \
151 (payload_constructor_t)(nfc_ndef_msg_encode), \
152 .payload_descriptor = (void *) (nested_message) \
158#define NFC_NDEF_NESTED_NDEF_MSG_RECORD(name) (name##_ndef_record_nested_desc)
int nfc_ndef_msg_encode(struct nfc_ndef_msg_desc const *ndef_msg_desc, uint8_t *msg_buffer, uint32_t *msg_len)
Encode an NDEF message.
int nfc_ndef_msg_record_add(struct nfc_ndef_msg_desc *msg, struct nfc_ndef_record_desc const *record)
Add a record to an NDEF message.
void nfc_ndef_msg_clear(struct nfc_ndef_msg_desc *msg)
Clear an NDEF message.
uint32_t max_record_count
Definition: msg.h:36
uint32_t record_count
Definition: msg.h:38
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