7#ifndef NFC_NDEF_MSG_PARSER_H_
8#define NFC_NDEF_MSG_PARSER_H_
18#include <zephyr/types.h>
47#define NFC_NDEF_MSG_PARSER_DELTA (sizeof(struct nfc_ndef_msg_parser_msg_2) - \
48 sizeof(struct nfc_ndef_msg_parser_msg_1))
56#define NFC_NDEF_PARSER_REQUIRED_MEM(max_count_of_records) \
57 (sizeof(struct nfc_ndef_msg_parser_msg_1) + \
58 ((NFC_NDEF_MSG_PARSER_DELTA) * ((uint32_t)(max_count_of_records) - 1)))
85 uint32_t *result_buf_len,
86 const uint8_t *raw_data,
87 uint32_t *raw_data_len);
void nfc_ndef_msg_printout(const struct nfc_ndef_msg_desc *msg_desc)
Print the parsed contents of an NDEF message.
int nfc_ndef_msg_parse(uint8_t *result_buf, uint32_t *result_buf_len, const uint8_t *raw_data, uint32_t *raw_data_len)
Parse NFC NDEF messages.
Binary data descriptor containing the payload for the record.
Definition record.h:128
NDEF message descriptor.
Definition msg.h:29
struct nfc_ndef_record_desc rec_desc[1]
Definition msg_parser.h:32
struct nfc_ndef_record_desc * record_desc_array[1]
Definition msg_parser.h:30
struct nfc_ndef_bin_payload_desc bin_pay_desc[1]
Definition msg_parser.h:31
struct nfc_ndef_msg_desc msg_desc
Definition msg_parser.h:29
Memory allocated for a one-record message.
Definition msg_parser.h:28
struct nfc_ndef_record_desc rec_desc[2]
Definition msg_parser.h:41
struct nfc_ndef_bin_payload_desc bin_pay_desc[2]
Definition msg_parser.h:40
struct nfc_ndef_record_desc * record_desc_array[2]
Definition msg_parser.h:39
struct nfc_ndef_msg_desc msg_desc
Definition msg_parser.h:38
Memory allocated for a two-record message.
Definition msg_parser.h:37
NDEF record descriptor.
Definition record.h:91