nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ nfc_t2t_payload_raw_set()

int nfc_t2t_payload_raw_set ( const uint8_t *  payload,
size_t  payload_length 
)

#include <nfc/include/nfc_t2t_lib.h>

Register the raw payload to send on reception of a READ request.

The payload will be delivered directly as-is to the reader, without implicitly adding an NDEF TLV container. This can be used if the application wants to define the TLVs itself, for example, to provide a different memory layout.

The pointer to the payload must stay valid for the duration of the library execution, or until it is explicitly released.

If a new payload is registered, the previously registered one is considered released.

Passing a NULL pointer releases the current payload, without registering a new one.

If an invalid size is given (too big), the function returns with an error and the currently registered payload is left unchanged.

Note
Provided pointer must points to RAM region.
Parameters
payloadPointer to the memory area in RAM containing the payload to send.
payload_lengthSize of the payload in bytes.
Return values
0Success.
-NRF_EINVALInvalid payload_length.
-NRF_EOPNOTSUPPPayload has been already set.