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

◆ nfc_ndef_uri_rec_payload_encode()

int nfc_ndef_uri_rec_payload_encode ( struct nfc_ndef_uri_rec_payload * input,
uint8_t * buff,
uint32_t * len )

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

Construct the payload for a URI record.

This function encodes the payload according to the URI record definition. It implements an API compatible with payload_constructor_t.

Parameters
inputPointer to the description of the payload.
buffPointer to payload destination. If NULL, function will calculate the expected size of the URI record payload.
lenSize of available memory to write as input. Size of generated payload as output.
Return values
0If the payload was encoded successfully.
-ENOMEMIf the predicted payload size is bigger than the provided buffer space.