nrfxlib API 2.7.99
Loading...
Searching...
No Matches
nfc_t2t_lib.h
Go to the documentation of this file.
1
41#ifndef NFC_T2T_LIB_H__
42#define NFC_T2T_LIB_H__
43
55#include <string.h>
56#include <stdint.h>
57
58#ifdef __cplusplus
59extern "C" {
60#endif
61
63#define NFC_T2T_SIZEOF_INTERNAL_BYTES 10
65#define NFC_T2T_MAX_PAYLOAD_SIZE 988
67#define NFC_T2T_MAX_PAYLOAD_SIZE_RAW 1008
68
70typedef enum
71{
74
79
82
90
96
97typedef enum
98{
103
113
121typedef void (*nfc_t2t_callback_t)(void *context,
122 nfc_t2t_event_t event,
123 const uint8_t *data,
124 size_t data_length);
125
139int nfc_t2t_setup(nfc_t2t_callback_t callback, void *context);
140
153 void *data,
154 size_t data_length);
155
172 void *data,
173 size_t *max_data_length);
174
205int nfc_t2t_payload_set(const uint8_t *payload, size_t payload_length);
206
236int nfc_t2t_payload_raw_set(const uint8_t *payload,
237 size_t payload_length);
238
258int nfc_t2t_internal_set(const uint8_t *data, size_t data_length);
259
269
279
288int nfc_t2t_done(void);
289
290#ifdef __cplusplus
291}
292#endif
293
295#endif /* NFC_T2T_LIB_H__ */
int nfc_t2t_payload_raw_set(const uint8_t *payload, size_t payload_length)
Register the raw payload to send on reception of a READ request.
nfc_t2t_event_t
Events passed to the callback function.
Definition: nfc_t2t_lib.h:71
@ NFC_T2T_EVENT_DATA_READ
Definition: nfc_t2t_lib.h:89
@ NFC_T2T_EVENT_FIELD_ON
Definition: nfc_t2t_lib.h:78
@ NFC_T2T_EVENT_FIELD_OFF
Definition: nfc_t2t_lib.h:81
@ NFC_T2T_EVENT_STOPPED
Definition: nfc_t2t_lib.h:94
@ NFC_T2T_EVENT_NONE
Definition: nfc_t2t_lib.h:73
int nfc_t2t_parameter_get(nfc_t2t_param_id_t id, void *data, size_t *max_data_length)
Query an NFC parameter value.
int nfc_t2t_setup(nfc_t2t_callback_t callback, void *context)
Register the application callback for event signaling.
nfc_t2t_param_id_t
Definition: nfc_t2t_lib.h:98
@ NFC_T2T_PARAM_NFCID1
Definition: nfc_t2t_lib.h:111
@ NFC_T2T_PARAM_FDT_MIN
Definition: nfc_t2t_lib.h:102
int nfc_t2t_emulation_stop(void)
Deactivate the NFC frontend.
int nfc_t2t_internal_set(const uint8_t *data, size_t data_length)
Register the sequence of internal bytes.
void(* nfc_t2t_callback_t)(void *context, nfc_t2t_event_t event, const uint8_t *data, size_t data_length)
Callback to pass events from NFC T2T Library to application.
Definition: nfc_t2t_lib.h:121
int nfc_t2t_emulation_start(void)
Activate the NFC frontend.
int nfc_t2t_payload_set(const uint8_t *payload, size_t payload_length)
Register the payload to send on reception of a READ request.
int nfc_t2t_parameter_set(nfc_t2t_param_id_t id, void *data, size_t data_length)
Set up an NFC parameter.
int nfc_t2t_done(void)
Release the reference to the application callback.