nfc7i2c  2.1.0.0
nfc7i2c.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2020 MikroElektronika d.o.o.
3 ** Contact: https://www.mikroe.com/contact
4 **
5 ** Permission is hereby granted, free of charge, to any person obtaining a copy
6 ** of this software and associated documentation files (the "Software"), to deal
7 ** in the Software without restriction, including without limitation the rights
8 ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 ** copies of the Software, and to permit persons to whom the Software is
10 ** furnished to do so, subject to the following conditions:
11 ** The above copyright notice and this permission notice shall be
12 ** included in all copies or substantial portions of the Software.
13 **
14 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
16 ** OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 ** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
19 ** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20 ** USE OR OTHER DEALINGS IN THE SOFTWARE.
21 ****************************************************************************/
22 
28 #ifndef NFC7I2C_H
29 #define NFC7I2C_H
30 
31 #ifdef __cplusplus
32 extern "C"{
33 #endif
34 
39 #ifdef PREINIT_SUPPORTED
40 #include "preinit.h"
41 #endif
42 
43 #ifdef MikroCCoreVersion
44  #if MikroCCoreVersion >= 1
45  #include "delays.h"
46  #endif
47 #endif
48 
49 #include "drv_digital_out.h"
50 #include "drv_digital_in.h"
51 #include "drv_i2c_master.h"
52 
73 #define NFC7I2C_NCI_PKT_MT_DATA 0x00
74 #define NFC7I2C_NCI_PKT_MT_CTRL_CMD 0x01
75 #define NFC7I2C_NCI_PKT_MT_CTRL_RSP 0x02
76 #define NFC7I2C_NCI_PKT_MT_CTRL_NTF 0x03
77 #define NFC7I2C_NCI_PKT_MT_SHIFT 5
78 #define NFC7I2C_NCI_PKT_MT_MASK 0xE0
79 #define NFC7I2C_NCI_PKT_PBF_COMPLETE 0x00
80 #define NFC7I2C_NCI_PKT_PBF_NOT_COMPLETE 0x01
81 #define NFC7I2C_NCI_PKT_PBF_SHIFT 4
82 #define NFC7I2C_NCI_PKT_PBF_MASK 0x10
83 #define NFC7I2C_NCI_PKT_CTRL_GID_MASK 0x0F
84 #define NFC7I2C_NCI_PKT_CTRL_OID_MASK 0x3F
85 #define NFC7I2C_NCI_PKT_DATA_CID_MASK 0x0F
86 #define NFC7I2C_NCI_PKT_DATA_RFU 0x00
87 
92 #define NFC7I2C_NCI_GID_CORE 0x00
93 #define NFC7I2C_NCI_GID_RF_MGMT 0x01
94 #define NFC7I2C_NCI_GID_PROP 0x0F
95 
100 #define NFC7I2C_NCI_OID_CORE_RESET 0x00
101 #define NFC7I2C_NCI_OID_CORE_INIT 0x01
102 #define NFC7I2C_NCI_OID_CORE_SET_CONFIG 0x02
103 #define NFC7I2C_NCI_OID_CORE_GET_CONFIG 0x03
104 #define NFC7I2C_NCI_OID_CORE_CONN_CREATE 0x04
105 #define NFC7I2C_NCI_OID_CORE_CONN_CLOSE 0x05
106 #define NFC7I2C_NCI_OID_CORE_CONN_CREDITS 0x06
107 #define NFC7I2C_NCI_OID_CORE_GEN_ERR_STAT 0x07
108 #define NFC7I2C_NCI_OID_CORE_INTF_ERR_STAT 0x08
109 #define NFC7I2C_NCI_OID_RF_DISCOVER_MAP 0x00
110 #define NFC7I2C_NCI_OID_RF_SET_ROUTING 0x01
111 #define NFC7I2C_NCI_OID_RF_GET_ROUTING 0x02
112 #define NFC7I2C_NCI_OID_RF_DISCOVER 0x03
113 #define NFC7I2C_NCI_OID_RF_DISCOVER_SELECT 0x04
114 #define NFC7I2C_NCI_OID_RF_INTF_ACTIVATED 0x05
115 #define NFC7I2C_NCI_OID_RF_DEACTIVATE 0x06
116 #define NFC7I2C_NCI_OID_RF_FIELD 0x07
117 #define NFC7I2C_NCI_OID_RF_T3T_POLLING 0x08
118 #define NFC7I2C_NCI_OID_RF_EE_ACTION 0x09
119 #define NFC7I2C_NCI_OID_RF_EE_DISCOVERY_REQ 0x0A
120 #define NFC7I2C_NCI_OID_RF_PARAMETER_UPDATE 0x0B
121 #define NFC7I2C_NCI_OID_PROP_SET_PWR_MODE 0x00
122 #define NFC7I2C_NCI_OID_PROP_ACT 0x02
123 #define NFC7I2C_NCI_OID_PROP_RF_PRES_CHECK 0x11
124 #define NFC7I2C_NCI_OID_PROP_RF_LPCD_TRACE 0x13
125 #define NFC7I2C_NCI_OID_PROP_RF_GET_TRANSIT 0x14
126 #define NFC7I2C_NCI_OID_PROP_TEST_PRBS 0x30
127 #define NFC7I2C_NCI_OID_PROP_TEST_ANTENNA 0x3D
128  // nfc7i2c_reg
130 
145 #define NFC7I2C_NCI_CORE_RESET_KEEP_CFG 0x00
146 #define NFC7I2C_NCI_CORE_RESET_RESET_CFG 0x01
147 #define NFC7I2C_NCI_CORE_RESET_NTF_NCI_VER_20 0x20
148 #define NFC7I2C_NCI_CORE_INIT_FEATURE_DIS 0x00
149 #define NFC7I2C_NCI_CORE_STANDBY_DISABLE 0x00
150 #define NFC7I2C_NCI_CORE_STANDBY_ENABLE 0x01
151 #define NFC7I2C_NCI_CORE_STANDBY_AUTO 0x02
152 
157 #define NFC7I2C_NCI_STAT_OK 0x00
158 #define NFC7I2C_NCI_STAT_REJECTED 0x01
159 #define NFC7I2C_NCI_STAT_RF_FRAME_CORRUPTED 0x02
160 #define NFC7I2C_NCI_STAT_FAILED 0x03
161 #define NFC7I2C_NCI_STAT_NOT_INITIALIZED 0x04
162 #define NFC7I2C_NCI_STAT_SYNTAX_ERROR 0x05
163 #define NFC7I2C_NCI_STAT_SEMANTIC_ERROR 0x06
164 #define NFC7I2C_NCI_STAT_UNK_GID 0x07
165 #define NFC7I2C_NCI_STAT_UNK_OID 0x08
166 #define NFC7I2C_NCI_STAT_INVALID_PARAM 0x09
167 #define NFC7I2C_NCI_STAT_MSG_SIZE_EXCEEDED 0x0A
168 #define NFC7I2C_NCI_STAT_DISC_ALRDY_STARTED 0xA0
169 #define NFC7I2C_NCI_STAT_DISC_T_ACT_FAILED 0xA1
170 #define NFC7I2C_NCI_STAT_DISC_TEAR_DOWN 0xA2
171 #define NFC7I2C_NCI_STAT_RF_TX_ERROR 0xB0
172 #define NFC7I2C_NCI_STAT_RF_PROTOCOL_ERROR 0xB1
173 #define NFC7I2C_NCI_STAT_RF_TIMEOUT_ERROR 0xB2
174 
179 #define NFC7I2C_NCI_RF_TECH_PASSIVE_POLL_NFC_A 0x00
180 #define NFC7I2C_NCI_RF_TECH_PASSIVE_POLL_NFC_B 0x01
181 #define NFC7I2C_NCI_RF_TECH_PASSIVE_POLL_NFC_F 0x02
182 #define NFC7I2C_NCI_RF_TECH_PASSIVE_POLL_15693 0x06
183 #define NFC7I2C_NCI_RF_EXE_EVERY_DISC_PERIOD 0x01
184 
189 #define NFC7I2C_NCI_RF_PROT_UNDETERMINED 0x00
190 #define NFC7I2C_NCI_RF_PROT_T1T 0x01
191 #define NFC7I2C_NCI_RF_PROT_T2T 0x02
192 #define NFC7I2C_NCI_RF_PROT_T3T 0x03
193 #define NFC7I2C_NCI_RF_PROT_ISODEP 0x04
194 #define NFC7I2C_NCI_RF_PROT_NFCDEP 0x05
195 #define NFC7I2C_NCI_RF_PROT_T5T 0x06
196 #define NFC7I2C_NCI_RF_PROT_MIFARE 0x80
197 
202 #define NFC7I2C_NCI_RF_INTF_UNDETERMINED 0x00
203 #define NFC7I2C_NCI_RF_INTF_FRAME 0x01
204 #define NFC7I2C_NCI_RF_INTF_ISODEP 0x02
205 #define NFC7I2C_NCI_RF_INTF_NFCDEP 0x03
206 #define NFC7I2C_NCI_RF_INTF_TAGCMD 0x80
207 #define NFC7I2C_NCI_RF_MAP_POLL_MODE 0x01
208 
213 #define NFC7I2C_NCI_RF_DEACTIVATE_IDLE 0x00
214 #define NFC7I2C_NCI_RF_DEACTIVATE_SLEEP 0x01
215 #define NFC7I2C_NCI_RF_DEACTIVATE_SLEEP_AF 0x02
216 #define NFC7I2C_NCI_RF_DEACTIVATE_DISCOVERY 0x03
217 
222 #define NFC7I2C_NCI_RF_CONN_ID_STATIC 0x00
223 #define NFC7I2C_NCI_RF_CONN_ID_1 0x01
224 #define NFC7I2C_NCI_RF_CONN_ID_2 0x02
225 #define NFC7I2C_NCI_RF_DISC_MORE_NTF_FOLLOW 0x02
226 
231 #define NFC7I2C_T1T_CMD_RID 0x78
232 #define NFC7I2C_T1T_CMD_RALL 0x00
233 #define NFC7I2C_T1T_CMD_READ 0x01
234 #define NFC7I2C_T1T_CMD_WRITE_E 0x53
235 #define NFC7I2C_T1T_CMD_WRITE_NE 0x1A
236 #define NFC7I2C_T1T_CMD_RSEG 0x10
237 #define NFC7I2C_T1T_CMD_READ8 0x02
238 #define NFC7I2C_T1T_CMD_WRITE_E8 0x54
239 #define NFC7I2C_T1T_CMD_WRITE_NE8 0x1B
240 
245 #define NFC7I2C_T2T_CMD_READ 0x30
246 #define NFC7I2C_T2T_CMD_WRITE 0xA2
247 #define NFC7I2C_T2T_CMD_SECTOR_SELECT 0xC2
248 #define NFC7I2C_T2T_ACK 0x0A
249 
254 #define NFC7I2C_T4T_RSP_COMPLETE_1 0x90
255 #define NFC7I2C_T4T_RSP_COMPLETE_2 0x00
256 #define NFC7I2C_T4T_CLA_NO_SECURE 0x00
257 #define NFC7I2C_T4T_INS_SELECT 0xA4
258 #define NFC7I2C_T4T_P1_SELECT_BY_NAME 0x04
259 #define NFC7I2C_T4T_P2_ONLY_OCCURANCE 0x00
260 #define NFC7I2C_T4T_LE_RSP_MAY_PRESENT 0x00
261 #define NFC7I2C_T4T_PPSE_APDU "2PAY.SYS.DDF01"
262 
267 #define NFC7I2C_ISO15693_FLAG_DR_HIGH 0x02
268 #define NFC7I2C_ISO15693_CMD_READ_SINGLE 0x20
269 #define NFC7I2C_ISO15693_CMD_WRITE_SINGLE 0x21
270 #define NFC7I2C_ISO15693_RSP_OK 0x00
271 
276 #define NFC7I2C_MFC_REQ_XCHG_DATA 0x10
277 #define NFC7I2C_MFC_REQ_SECTOR_SEL 0x32
278 #define NFC7I2C_MFC_REQ_AUTHENTICATE 0x40
279 #define NFC7I2C_MFC_KEY_SELECTOR_A_EMB 0x10
280 #define NFC7I2C_MFC_CMD_READ 0x30
281 #define NFC7I2C_MFC_CMD_WRITE 0xA0
282 #define NFC7I2C_MFC_ACK 0x0A
283 
288 #define NFC7I2C_NCI_CORE_TOTAL_DURATION_510MS { 0x01, 0x00, 0x02, 0xFE, 0x01 }
289 #define NFC7I2C_NCI_CORE_TAG_DETECTOR_DIS { 0x01, 0xA0, 0x40, 0x01, 0x00 }
290 #define NFC7I2C_NCI_CORE_CLOCK_SEL_XTAL { 0x01, 0xA0, 0x03, 0x01, 0x08 }
291 #define NFC7I2C_NCI_CORE_PMU_IRQ_EN_TVDD_3V3 { 0x01, 0xA0, 0x0E, 0x0B, 0x11, 0x01, 0x01, 0x01, \
292  0x00, 0x00, 0x00, 0x10, 0x00, 0xD0, 0x0C }
293 #define NFC7I2C_NCI_CORE_RF_CONF { 0x09, \
294  0xA0, 0x0D, 0x03, 0x78, 0x0D, 0x02, \
295  0xA0, 0x0D, 0x03, 0x78, 0x14, 0x02, \
296  0xA0, 0x0D, 0x06, 0x4C, 0x44, 0x65, 0x09, 0x00, 0x00, \
297  0xA0, 0x0D, 0x06, 0x4C, 0x2D, 0x05, 0x35, 0x1E, 0x01, \
298  0xA0, 0x0D, 0x06, 0x82, 0x4A, 0x55, 0x07, 0x00, 0x07, \
299  0xA0, 0x0D, 0x06, 0x44, 0x44, 0x03, 0x04, 0xC4, 0x00, \
300  0xA0, 0x0D, 0x06, 0x46, 0x30, 0x50, 0x00, 0x18, 0x00, \
301  0xA0, 0x0D, 0x06, 0x48, 0x30, 0x50, 0x00, 0x18, 0x00, \
302  0xA0, 0x0D, 0x06, 0x4A, 0x30, 0x50, 0x00, 0x08, 0x00 }
303 
308 #define NFC7I2C_MAX_NCI_FRAME_SIZE 258
309 #define NFC7I2C_TIMEOUT_INFINITE 0
310 #define NFC7I2C_TIMEOUT_100MS 100
311 #define NFC7I2C_TIMEOUT_1S 1000
312 #define NFC7I2C_TIMEOUT_2S 2000
313 
319 #define NFC7I2C_DEVICE_ADDRESS_0 0x28
320 #define NFC7I2C_DEVICE_ADDRESS_1 0x29
321 #define NFC7I2C_DEVICE_ADDRESS_2 0x2A
322 #define NFC7I2C_DEVICE_ADDRESS_3 0x2B
323  // nfc7i2c_set
325 
340 #define NFC7I2C_MAP_MIKROBUS( cfg, mikrobus ) \
341  cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
342  cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
343  cfg.ven = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
344  cfg.irq = MIKROBUS( mikrobus, MIKROBUS_INT )
345  // nfc7i2c_map // nfc7i2c
348 
353 typedef struct
354 {
355  uint8_t sens_res[ 2 ];
356  uint8_t nfc_id_len;
357  uint8_t nfc_id[ 10 ];
358  uint8_t sel_res_len;
359  uint8_t sel_res[ 1 ];
360  uint8_t rats_len;
361  uint8_t rats[ 20 ];
362 
364 
369 typedef struct
370 {
371  uint8_t sens_res_len;
372  uint8_t sens_res[ 12 ];
373  uint8_t attrib_res_len;
374  uint8_t attrib_res[ 17 ];
375 
377 
382 typedef struct
383 {
384  uint8_t bitrate;
385  uint8_t sens_res_len;
386  uint8_t sens_res[ 18 ];
387 
389 
394 typedef struct
395 {
396  uint8_t afi;
397  uint8_t dsf_id;
398  uint8_t id[ 8 ];
399 
401 
406 typedef union
407 {
412 
414 
419 typedef struct
420 {
421  uint8_t intf;
422  uint8_t protocol;
423  uint8_t mode_tech;
424  uint8_t more_tags;
428 
433 typedef struct
434 {
435  uint8_t msg_type;
436  uint8_t gid;
437  uint8_t oid;
438  uint8_t payload_len;
439  uint8_t payload[ NFC7I2C_MAX_NCI_FRAME_SIZE - 3 ];
442 
447 typedef struct
448 {
449  uint8_t cid;
450  uint8_t payload_len;
451  uint8_t payload[ NFC7I2C_MAX_NCI_FRAME_SIZE - 3 ];
454 
459 typedef struct
460 {
461  // Output pins
462  digital_out_t ven;
464  // Input pins
465  digital_in_t irq;
467  // Modules
468  i2c_master_t i2c;
470  // I2C slave address
471  uint8_t slave_address;
475  uint8_t cmd[ NFC7I2C_MAX_NCI_FRAME_SIZE ];
476  uint8_t rsp[ NFC7I2C_MAX_NCI_FRAME_SIZE ];
477  uint16_t rsp_len;
479  uint8_t fw_version[ 3 ];
482 } nfc7i2c_t;
483 
488 typedef struct
489 {
490  pin_name_t scl;
491  pin_name_t sda;
493  pin_name_t ven;
494  pin_name_t irq;
496  uint32_t i2c_speed;
497  uint8_t i2c_address;
499 } nfc7i2c_cfg_t;
500 
505 typedef enum
506 {
508  NFC7I2C_ERROR = -1
509 
511 
528 
542 err_t nfc7i2c_init ( nfc7i2c_t *ctx, nfc7i2c_cfg_t *cfg );
543 
557 
567 
577 
587 
597 
610 err_t nfc7i2c_tx ( nfc7i2c_t *ctx, uint8_t *data_in, uint16_t len );
611 
626 err_t nfc7i2c_rx ( nfc7i2c_t *ctx, uint8_t *data_out, uint16_t *len, uint16_t timeout );
627 
643 err_t nfc7i2c_trx ( nfc7i2c_t *ctx, uint8_t *data_in, uint16_t in_len, uint8_t *data_out, uint16_t *out_len );
644 
658 
672 err_t nfc7i2c_pkt_ctrl_rx ( nfc7i2c_t *ctx, nfc7i2c_pkt_ctrl_t *pkt, uint16_t timeout );
673 
688 
702 
716 err_t nfc7i2c_pkt_data_rx ( nfc7i2c_t *ctx, nfc7i2c_pkt_data_t *pkt, uint16_t timeout );
717 
732 
744 
756 
770 err_t nfc7i2c_core_standby ( nfc7i2c_t *ctx, uint8_t mode );
771 
784 
796 
808 
820 
832 
844 
856 
868 
880 
893 
904 
918 
931 
946 
947 #ifdef __cplusplus
948 }
949 #endif
950 #endif // NFC7I2C_H
951  // nfc7i2c
953 
954 // ------------------------------------------------------------------------ END
nfc7i2c_rf_intf_info_t
NFC 7 I2C Click discovered remote device properties information object.
Definition: nfc7i2c.h:407
nfc7i2c_core_init
err_t nfc7i2c_core_init(nfc7i2c_t *ctx)
NFC 7 I2C core init function.
nfc7i2c_rf_intf_info_app_t::nfc_id_len
uint8_t nfc_id_len
Definition: nfc7i2c.h:356
nfc7i2c_cfg_t
NFC 7 I2C Click configuration object.
Definition: nfc7i2c.h:489
nfc7i2c_reader_act_next
err_t nfc7i2c_reader_act_next(nfc7i2c_t *ctx, nfc7i2c_rf_intf_t *rf_intf)
NFC 7 I2C reader activate next function.
nfc7i2c_wait_discovery
err_t nfc7i2c_wait_discovery(nfc7i2c_t *ctx, nfc7i2c_rf_intf_t *rf_intf)
NFC 7 I2C wait discovery function.
nfc7i2c_rf_intf_info_vpp_t
NFC 7 I2C Click poll passive type V/ISO15693 object.
Definition: nfc7i2c.h:395
nfc7i2c_tx
err_t nfc7i2c_tx(nfc7i2c_t *ctx, uint8_t *data_in, uint16_t len)
NFC 7 I2C TX function.
nfc7i2c_t::irq
digital_in_t irq
Definition: nfc7i2c.h:465
nfc7i2c_rf_intf_info_t::nfc_bpp
nfc7i2c_rf_intf_info_bpp_t nfc_bpp
Definition: nfc7i2c.h:409
nfc7i2c_disable_device
void nfc7i2c_disable_device(nfc7i2c_t *ctx)
NFC 7 I2C disable device function.
nfc7i2c_rf_intf_t::protocol
uint8_t protocol
Definition: nfc7i2c.h:422
nfc7i2c_pkt_data_tx
err_t nfc7i2c_pkt_data_tx(nfc7i2c_t *ctx, nfc7i2c_pkt_data_t *pkt)
NFC 7 I2C packet data TX function.
nfc7i2c_rf_intf_info_fpp_t::sens_res_len
uint8_t sens_res_len
Definition: nfc7i2c.h:385
nfc7i2c_core_clock_sel
err_t nfc7i2c_core_clock_sel(nfc7i2c_t *ctx)
NFC 7 I2C core clock sel function.
nfc7i2c_cfg_t::sda
pin_name_t sda
Definition: nfc7i2c.h:491
nfc7i2c_core_rf_config
err_t nfc7i2c_core_rf_config(nfc7i2c_t *ctx)
NFC 7 I2C core RF config function.
nfc7i2c_pkt_ctrl_tx
err_t nfc7i2c_pkt_ctrl_tx(nfc7i2c_t *ctx, nfc7i2c_pkt_ctrl_t *pkt)
NFC 7 I2C packet control TX function.
NFC7I2C_MAX_NCI_FRAME_SIZE
#define NFC7I2C_MAX_NCI_FRAME_SIZE
NFC 7 I2C timeout setting.
Definition: nfc7i2c.h:308
nfc7i2c_start_discovery
err_t nfc7i2c_start_discovery(nfc7i2c_t *ctx)
NFC 7 I2C start discovery function.
nfc7i2c_core_tag_detector
err_t nfc7i2c_core_tag_detector(nfc7i2c_t *ctx)
NFC 7 I2C core tag detector function.
nfc7i2c_rf_intf_info_bpp_t
NFC 7 I2C Click poll passive type B object.
Definition: nfc7i2c.h:370
nfc7i2c_rf_intf_info_vpp_t::dsf_id
uint8_t dsf_id
Definition: nfc7i2c.h:397
nfc7i2c_t
NFC 7 I2C Click context object.
Definition: nfc7i2c.h:460
nfc7i2c_rf_intf_info_bpp_t::sens_res_len
uint8_t sens_res_len
Definition: nfc7i2c.h:371
nfc7i2c_default_cfg
err_t nfc7i2c_default_cfg(nfc7i2c_t *ctx)
NFC 7 I2C default configuration function.
nfc7i2c_pkt_data_t
NFC 7 I2C Click data packet object.
Definition: nfc7i2c.h:448
nfc7i2c_pkt_ctrl_trx
err_t nfc7i2c_pkt_ctrl_trx(nfc7i2c_t *ctx, nfc7i2c_pkt_ctrl_t *pkt)
NFC 7 I2C packet control TRX function.
nfc7i2c_rf_intf_info_bpp_t::attrib_res_len
uint8_t attrib_res_len
Definition: nfc7i2c.h:373
nfc7i2c_rf_intf_t::more_tags
uint8_t more_tags
Definition: nfc7i2c.h:424
nfc7i2c_t::rsp_len
uint16_t rsp_len
Definition: nfc7i2c.h:477
nfc7i2c_core_reset
err_t nfc7i2c_core_reset(nfc7i2c_t *ctx)
NFC 7 I2C core reset function.
nfc7i2c_t::ven
digital_out_t ven
Definition: nfc7i2c.h:462
nfc7i2c_rf_intf_t::intf
uint8_t intf
Definition: nfc7i2c.h:421
nfc7i2c_cfg_t::i2c_speed
uint32_t i2c_speed
Definition: nfc7i2c.h:496
nfc7i2c_presence_check
void nfc7i2c_presence_check(nfc7i2c_t *ctx, nfc7i2c_rf_intf_t *rf_intf)
NFC 7 I2C presence check function.
nfc7i2c_cfg_setup
void nfc7i2c_cfg_setup(nfc7i2c_cfg_t *cfg)
NFC 7 I2C configuration object setup function.
nfc7i2c_rf_intf_t::mode_tech
uint8_t mode_tech
Definition: nfc7i2c.h:423
nfc7i2c_cfg_t::scl
pin_name_t scl
Definition: nfc7i2c.h:490
nfc7i2c_rf_intf_info_fpp_t
NFC 7 I2C Click poll passive type F object.
Definition: nfc7i2c.h:383
nfc7i2c_reset_device
void nfc7i2c_reset_device(nfc7i2c_t *ctx)
NFC 7 I2C reset device function.
nfc7i2c_t::slave_address
uint8_t slave_address
Definition: nfc7i2c.h:471
nfc7i2c_pkt_ctrl_t::payload_len
uint8_t payload_len
Definition: nfc7i2c.h:438
nfc7i2c_enable_device
void nfc7i2c_enable_device(nfc7i2c_t *ctx)
NFC 7 I2C enable device function.
nfc7i2c_core_total_duration
err_t nfc7i2c_core_total_duration(nfc7i2c_t *ctx)
NFC 7 I2C core total duration function.
NFC7I2C_ERROR
@ NFC7I2C_ERROR
Definition: nfc7i2c.h:508
nfc7i2c_core_pmu
err_t nfc7i2c_core_pmu(nfc7i2c_t *ctx)
NFC 7 I2C core PMU function.
nfc7i2c_trx
err_t nfc7i2c_trx(nfc7i2c_t *ctx, uint8_t *data_in, uint16_t in_len, uint8_t *data_out, uint16_t *out_len)
NFC 7 I2C TRX function.
nfc7i2c_t::i2c
i2c_master_t i2c
Definition: nfc7i2c.h:468
nfc7i2c_get_irq_pin
uint8_t nfc7i2c_get_irq_pin(nfc7i2c_t *ctx)
NFC 7 I2C get IRQ pin function.
nfc7i2c_pkt_ctrl_t::oid
uint8_t oid
Definition: nfc7i2c.h:437
nfc7i2c_rf_intf_t::info
nfc7i2c_rf_intf_info_t info
Definition: nfc7i2c.h:425
NFC7I2C_OK
@ NFC7I2C_OK
Definition: nfc7i2c.h:507
nfc7i2c_map_rf_interface
err_t nfc7i2c_map_rf_interface(nfc7i2c_t *ctx)
NFC 7 I2C map RF interface function.
nfc7i2c_init
err_t nfc7i2c_init(nfc7i2c_t *ctx, nfc7i2c_cfg_t *cfg)
NFC 7 I2C initialization function.
nfc7i2c_t::pkt_ctrl
nfc7i2c_pkt_ctrl_t pkt_ctrl
Definition: nfc7i2c.h:473
nfc7i2c_stop_discovery
err_t nfc7i2c_stop_discovery(nfc7i2c_t *ctx)
NFC 7 I2C stop discovery function.
nfc7i2c_core_standby
err_t nfc7i2c_core_standby(nfc7i2c_t *ctx, uint8_t mode)
NFC 7 I2C core standby function.
nfc7i2c_cfg_t::i2c_address
uint8_t i2c_address
Definition: nfc7i2c.h:497
nfc7i2c_t::pkt_data
nfc7i2c_pkt_data_t pkt_data
Definition: nfc7i2c.h:474
nfc7i2c_pkt_ctrl_t
NFC 7 I2C Click control packet object.
Definition: nfc7i2c.h:434
nfc7i2c_rf_intf_info_app_t::rats_len
uint8_t rats_len
Definition: nfc7i2c.h:360
nfc7i2c_pkt_ctrl_t::msg_type
uint8_t msg_type
Definition: nfc7i2c.h:435
nfc7i2c_config_settings
err_t nfc7i2c_config_settings(nfc7i2c_t *ctx)
NFC 7 I2C config settings function.
nfc7i2c_rf_intf_info_t::nfc_vpp
nfc7i2c_rf_intf_info_vpp_t nfc_vpp
Definition: nfc7i2c.h:411
nfc7i2c_rf_intf_t
NFC 7 I2C Click discovered remote device properties object.
Definition: nfc7i2c.h:420
nfc7i2c_return_value_t
nfc7i2c_return_value_t
NFC 7 I2C Click return value data.
Definition: nfc7i2c.h:506
nfc7i2c_pkt_data_t::payload_len
uint8_t payload_len
Definition: nfc7i2c.h:450
nfc7i2c_rf_intf_info_app_t
NFC 7 I2C Click poll passive type A object.
Definition: nfc7i2c.h:354
nfc7i2c_pkt_data_trx
err_t nfc7i2c_pkt_data_trx(nfc7i2c_t *ctx, nfc7i2c_pkt_data_t *pkt)
NFC 7 I2C packet data TRX function.
nfc7i2c_rf_intf_info_vpp_t::afi
uint8_t afi
Definition: nfc7i2c.h:396
nfc7i2c_reader_tag_cmd
err_t nfc7i2c_reader_tag_cmd(nfc7i2c_t *ctx, nfc7i2c_pkt_data_t *pkt)
NFC 7 I2C reader tag cmd function.
nfc7i2c_cfg_t::ven
pin_name_t ven
Definition: nfc7i2c.h:493
nfc7i2c_pkt_ctrl_t::gid
uint8_t gid
Definition: nfc7i2c.h:436
nfc7i2c_rf_intf_info_fpp_t::bitrate
uint8_t bitrate
Definition: nfc7i2c.h:384
nfc7i2c_rf_intf_info_t::nfc_fpp
nfc7i2c_rf_intf_info_fpp_t nfc_fpp
Definition: nfc7i2c.h:410
nfc7i2c_reader_re_act
err_t nfc7i2c_reader_re_act(nfc7i2c_t *ctx, nfc7i2c_rf_intf_t *rf_intf)
NFC 7 I2C reader reactivate next function.
nfc7i2c_pkt_data_t::cid
uint8_t cid
Definition: nfc7i2c.h:449
nfc7i2c_rf_intf_info_app_t::sel_res_len
uint8_t sel_res_len
Definition: nfc7i2c.h:358
nfc7i2c_cfg_t::irq
pin_name_t irq
Definition: nfc7i2c.h:494
nfc7i2c_pkt_ctrl_rx
err_t nfc7i2c_pkt_ctrl_rx(nfc7i2c_t *ctx, nfc7i2c_pkt_ctrl_t *pkt, uint16_t timeout)
NFC 7 I2C packet control RX function.
nfc7i2c_rf_intf_info_t::nfc_app
nfc7i2c_rf_intf_info_app_t nfc_app
Definition: nfc7i2c.h:408
nfc7i2c_rx
err_t nfc7i2c_rx(nfc7i2c_t *ctx, uint8_t *data_out, uint16_t *len, uint16_t timeout)
NFC 7 I2C RX function.
nfc7i2c_pkt_data_rx
err_t nfc7i2c_pkt_data_rx(nfc7i2c_t *ctx, nfc7i2c_pkt_data_t *pkt, uint16_t timeout)
NFC 7 I2C packet data RX function.
nfc7i2c_t::next_tag_protocol
uint8_t next_tag_protocol
Definition: nfc7i2c.h:480