nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
msg.h File Reference
#include <zephyr/types.h>
#include <nfc/ndef/record.h>

Go to the source code of this file.

Data Structures

struct  nfc_ndef_msg_desc
 NDEF message descriptor. More...
 

Macros

#define NFC_NDEF_MSG_DEF(name, max_record_cnt)
 Macro for creating and initializing an NFC NDEF message descriptor.
 
#define NFC_NDEF_MSG(name)
 Macro for accessing the NFC NDEF message descriptor instance that you created with NFC_NDEF_MSG_DEF.
 
#define NFC_NDEF_NESTED_NDEF_MSG_RECORD_DEF(name, tnf_arg, id_arg, id_len, type_arg, type_len, nested_message)
 Macro for creating and initializing an NFC NDEF record descriptor with an encapsulated NDEF message. This macro creates and initializes an instance of type nfc_ndef_record_desc that contains an encapsulated NDEF message as payload. nfc_ndef_msg_encode is used as payload constructor to encode the message. The encoded message is then used as payload for the record.
 
#define NFC_NDEF_NESTED_NDEF_MSG_RECORD(name)
 Macro for accessing the NFC NDEF record descriptor instance that you created with NFC_NDEF_NESTED_NDEF_MSG_RECORD_DEF.
 

Functions

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.
 
void nfc_ndef_msg_clear (struct nfc_ndef_msg_desc *msg)
 Clear 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.