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

◆ payload_constructor_t

typedef int(* payload_constructor_t) (void *payload_descriptor, uint8_t *buffer, uint32_t *len)

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

Payload constructor type.

A payload constructor is a function for constructing the payload of an NDEF record.

Parameters
payload_descriptorPointer to the input data for the constructor.
bufferPointer to the payload destination. If NULL, function will calculate the expected size of the record payload. *
lenSize of the available memory to write as input. Size of the generated record payload as output. The implementation must check if the payload will fit in the provided buffer. This must be checked by the caller function.
Return values
0If the operation was successful. Otherwise, a (negative) error code is returned.