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

◆ nfc_ndef_msg_parse()

int nfc_ndef_msg_parse ( uint8_t * result_buf,
uint32_t * result_buf_len,
const uint8_t * raw_data,
uint32_t * raw_data_len )

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

Parse NFC NDEF messages.

This function parses NDEF messages using NDEF binary record descriptors.

Note
The result_buf parameter must point to a word-aligned address.
Parameters
[out]result_bufPointer to the buffer that will be used to hold the NDEF message descriptor. After parsing is completed successfully, the first address in the buffer is filled by the NDEF message descriptor (nfc_ndef_msg_desc), which provides a full description of the parsed NDEF message.
[in,out]result_buf_lenAs input: size of the buffer specified by result_buf. As output: size of the reserved (used) part of the buffer specified by result_buf.
[in]raw_dataPointer to the data to be parsed.
[in,out]raw_data_lenAs input: size of the NFC data in the nfc_data buffer. As output: size of the parsed message.
Return values
0If the operation was successful. Otherwise, a (negative) error code is returned.