75 if (pNdef->encode == NULL) {
78 return pNdef->encode(pNdef, &pNdef->bufferBldr, pNdef->pUserData);
83 if (pNdef->decode == NULL) {
86 return pNdef->decode(pNdef, ac_buffer_builder_buffer(&pNdef->bufferBldr), pNdef->pUserData);
91 return &pNdef->bufferBldr;
void ndef_msg_init(ndef_msg_t *pNdef, ndef_encode_fn_t encode, ndef_decode_fn_t decode, uint8_t *data, size_t size, void *pUserData)
Initialize NDEF tag abstraction.
nfc_err_t(* ndef_decode_fn_t)(ndef_msg_t *pTag, ac_buffer_t *pBuffer, void *pUserData)
Function called to decode the tag's content on write (target mode) or read (reader mode)
nfc_err_t(* ndef_encode_fn_t)(ndef_msg_t *pTag, ac_buffer_builder_t *pBufferBldr, void *pUserData)
Function called to generate the tag's content on read (target mode)
int nfc_err_t
Type for NFC errors.