nRF Connect SDK API 0.1.0
|
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.
input | Pointer to the description of the payload. |
buff | Pointer to payload destination. If NULL, function will calculate the expected size of the URI record payload. |
len | Size of available memory to write as input. Size of generated payload as output. |
0 | If the payload was encoded successfully. |
-ENOMEM | If the predicted payload size is bigger than the provided buffer space. |