nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ nfc_t4t_setup()

int nfc_t4t_setup ( nfc_t4t_callback_t callback,
void * context )

#include <nfc/include/nfc_t4t_lib.h>

Register the application callback for event signaling.

The callback will be called by NFCLib to notify the application of relevant events. It will be called from the HAL_NFC callback context. The library support 3 different Modes of Emulation:

  • Raw ISO-Dep exchanges. All PDUs are signaled through the callback.
  • Read-Only T4T NDEF-Tag. A static buffer is served. Only Field-Status callbacks.
  • Read-Write T4T NDEF-Tag. A mutable buffer is used. Only Field-Status callbacks.

The default mode is Raw ISO-Dep mode. The two other NDEF T4T modes are activated through the corresponding nfc_t4t_ndef_rwpayload_set/ nfc_t4t_ndef_staticpayload_set functions. The mode is locked in with a call to nfc_t4t_emulation_start.

Parameters
callbackFunction pointer to the callback.
contextPointer to a memory area used by the callback for execution (optional).
Return values
0Success.
-NRF_EINVALInvalid argument (e.g. wrong data length, NULL pointer))
-NRF_EOPNOTSUPPIf emulation is in running state.