nrfxlib API 0.1.0
Loading...
Searching...
No Matches
nfc_t4t_lib.h
Go to the documentation of this file.
1
42#ifndef NFC_T4T_LIB_H__
43#define NFC_T4T_LIB_H__
44
81#include <stdbool.h>
82#include <stdint.h>
83#include <string.h>
84
85#ifdef __cplusplus
86extern "C" {
87#endif
88
89#define NFC_T4T_MAX_PAYLOAD_SIZE 0xFFF0U
90
92typedef enum
93{
97
99typedef enum
100{
160
164typedef enum
165{
170
172typedef enum
173{
177
181typedef enum
182{
215
227typedef void (*nfc_t4t_callback_t)(void *context,
228 nfc_t4t_event_t event,
229 const uint8_t *data,
230 size_t data_length,
231 uint32_t flags);
232
257int nfc_t4t_setup(nfc_t4t_callback_t callback, void *context);
258
277int nfc_t4t_ndef_rwpayload_set(uint8_t *emulation_buffer,
278 size_t buffer_length);
279
294int nfc_t4t_ndef_staticpayload_set(const uint8_t *emulation_buffer,
295 size_t buffer_length);
296
314int nfc_t4t_response_pdu_send(const uint8_t *pdu, size_t pdu_length);
315
328 void *data,
329 size_t data_length);
330
347 void *data,
348 size_t *max_data_length);
349
359
370
384int nfc_t4t_done(void);
385
386#ifdef __cplusplus
387}
388#endif
389
394#endif
int nfc_t4t_parameter_set(nfc_t4t_param_id_t id, void *data, size_t data_length)
Set an NFC parameter.
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.
Definition: nfc_t4t_lib.h:227
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_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_parameter_get(nfc_t4t_param_id_t id, void *data, size_t *max_data_length)
Query an NFC parameter value.
nfc_t4t_emu_mode_t
Definition: nfc_t4t_lib.h:93
@ NFC_T4T_EMUMODE_NDEF
Definition: nfc_t4t_lib.h:94
@ NFC_T4T_EMUMODE_PICC
Definition: nfc_t4t_lib.h:95
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_emulation_stop(void)
Deactivate the NFC frontend.
int nfc_t4t_setup(nfc_t4t_callback_t callback, void *context)
Register the application callback for event signaling.
nfc_t4t_event_t
Definition: nfc_t4t_lib.h:100
@ NFC_T4T_EVENT_NDEF_UPDATED
Definition: nfc_t4t_lib.h:116
@ NFC_T4T_EVENT_FIELD_OFF
Definition: nfc_t4t_lib.h:107
@ NFC_T4T_EVENT_DATA_IND
Definition: nfc_t4t_lib.h:142
@ NFC_T4T_EVENT_FIELD_ON
Definition: nfc_t4t_lib.h:104
@ NFC_T4T_EVENT_NONE
Definition: nfc_t4t_lib.h:101
@ NFC_T4T_EVENT_NDEF_READ
Definition: nfc_t4t_lib.h:110
@ NFC_T4T_EVENT_DATA_TRANSMITTED
Definition: nfc_t4t_lib.h:137
nfc_t4t_data_ind_flags_t
Definition: nfc_t4t_lib.h:165
@ NFC_T4T_DI_FLAG_NONE
Definition: nfc_t4t_lib.h:166
@ NFC_T4T_DI_FLAG_MORE
Definition: nfc_t4t_lib.h:167
int nfc_t4t_emulation_start(void)
Activate the NFC frontend.
int nfc_t4t_done(void)
Release reference to application callback.
nfc_t4t_param_id_t
Definition: nfc_t4t_lib.h:182
@ NFC_T4T_PARAM_FDT_MIN
Definition: nfc_t4t_lib.h:190
@ NFC_T4T_PARAM_SELRES
Definition: nfc_t4t_lib.h:195
@ NFC_T4T_PARAM_NFCID1
Definition: nfc_t4t_lib.h:198
@ NFC_T4T_PARAM_FWI_MAX
Definition: nfc_t4t_lib.h:207
@ NFC_T4T_PARAM_FWI
Definition: nfc_t4t_lib.h:183
nfc_t4t_fwi_max_val_t
Definition: nfc_t4t_lib.h:173
@ NFC_T4T_FWI_MAX_VAL_NFC
Definition: nfc_t4t_lib.h:175
@ NFC_T4T_FWI_MAX_VAL_EMV
Definition: nfc_t4t_lib.h:174