nrfxlib API 2.8.99
|
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.
payload | Pointer to the memory area in RAM containing the payload to send. |
payload_length | Size of the payload in bytes. |
0 | Success. |
-NRF_EINVAL | Invalid payload_length . |
-NRF_EOPNOTSUPP | Payload has been already set. |