nrfxlib API 0.1.0
Loading...
Searching...
No Matches
NFC tag 4 type emulation library

The T4T emulation library interface. More...

Macros

#define NFC_T4T_MAX_PAYLOAD_SIZE   0xFFF0U
 Emulation mode.
 

Typedefs

typedef void(* nfc_t4t_callback_t) (void *context, nfc_t4t_event_t event, const uint8_t *data, size_t data_length, uint32_t flags)
 Callback to pass events from NFCLib to application.
 

Enumerations

enum  nfc_t4t_emu_mode_t { NFC_T4T_EMUMODE_NDEF , NFC_T4T_EMUMODE_PICC }
 
enum  nfc_t4t_event_t {
  NFC_T4T_EVENT_NONE , NFC_T4T_EVENT_FIELD_ON , NFC_T4T_EVENT_FIELD_OFF , NFC_T4T_EVENT_NDEF_READ ,
  NFC_T4T_EVENT_NDEF_UPDATED , NFC_T4T_EVENT_DATA_TRANSMITTED , NFC_T4T_EVENT_DATA_IND
}
 
enum  nfc_t4t_data_ind_flags_t { NFC_T4T_DI_FLAG_NONE = 0x00 , NFC_T4T_DI_FLAG_MORE = 0x01 }
 
enum  nfc_t4t_fwi_max_val_t { NFC_T4T_FWI_MAX_VAL_EMV = 0x07 , NFC_T4T_FWI_MAX_VAL_NFC = 0x08 }
 
enum  nfc_t4t_param_id_t {
  NFC_T4T_PARAM_FWI , NFC_T4T_PARAM_FDT_MIN , NFC_T4T_PARAM_SELRES , NFC_T4T_PARAM_NFCID1 ,
  NFC_T4T_PARAM_FWI_MAX
}
 

Functions

int nfc_t4t_setup (nfc_t4t_callback_t callback, void *context)
 Register the application callback for event signaling.
 
int nfc_t4t_ndef_rwpayload_set (uint8_t *emulation_buffer, size_t buffer_length)
 Set emulation buffer and content for a NDEF Tag emulation that is Read/Writable.
 
int nfc_t4t_ndef_staticpayload_set (const uint8_t *emulation_buffer, size_t buffer_length)
 Set emulation buffer and content for an NDEF Tag emulation that is Read-Only.
 
int nfc_t4t_response_pdu_send (const uint8_t *pdu, size_t pdu_length)
 Send a raw response PDU after getting a Request PDU callback.
 
int nfc_t4t_parameter_set (nfc_t4t_param_id_t id, void *data, size_t data_length)
 Set an NFC parameter.
 
int nfc_t4t_parameter_get (nfc_t4t_param_id_t id, void *data, size_t *max_data_length)
 Query an NFC parameter value.
 
int nfc_t4t_emulation_start (void)
 Activate the NFC frontend.
 
int nfc_t4t_emulation_stop (void)
 Deactivate the NFC frontend.
 
int nfc_t4t_done (void)
 Release reference to application callback.
 

Detailed Description

The T4T emulation library interface.

This is the NFC Forum NDEF tag 4 type emulation library. It implements the ISO14443-4A protocol (ISO-DEP) and additionally can emulate a read-writable NDEF content. If the emulation of the NDEF content is not needed, the library works in a raw mode where all APDUs are delivered to the user, who is then responsible to generate a timely RPDU as a response.

The sequence of initializing functions determines whether the NDEF emulation will run or whether the raw mode is used.

Note
If you are using nRF52832 chip (in IC rev. Engineering B or Engineering C) or if You are using nRF52840 chip (in IC rev. Engineering A, B or C) library will use TIMER 4 to apply workarounds for the anomalies.