10#include <zephyr/types.h>
97#define NFC_NDEF_MSG_DEF(name, max_record_cnt) \
98 struct nfc_ndef_record_desc const \
99 *name##_nfc_ndef_record_desc_array[max_record_cnt]; \
100 struct nfc_ndef_msg_desc name##_nfc_ndef_msg_desc = \
102 .record = name##_nfc_ndef_record_desc_array, \
103 .max_record_count = max_record_cnt, \
110#define NFC_NDEF_MSG(name) (name##_nfc_ndef_msg_desc)
135#define NFC_NDEF_NESTED_NDEF_MSG_RECORD_DEF(name, \
142 struct nfc_ndef_record_desc name##_ndef_record_nested_desc = \
145 .id_length = id_len, \
147 .type_length = type_len, \
149 .payload_constructor = \
150 (payload_constructor_t)(nfc_ndef_msg_encode), \
151 .payload_descriptor = (void *) (nested_message) \
157#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:35
uint32_t record_count
Definition msg.h:37
struct nfc_ndef_record_desc const ** record
Definition msg.h:31
NDEF message descriptor.
Definition msg.h:29
NDEF record descriptor.
Definition record.h:91