nfc4 2.0.0.0
nfc4.h File Reference

This file contains API for NFC 4 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"

Go to the source code of this file.

Data Structures

struct  nfc4_analog_config_mgmt_t
 NFC 4 Click Struct for Analog Config Look Up Table Update. More...
 
struct  nfc4_analog_config_reg_addr_mask_val_t
 NFC 4 Click Struct for Analog Config Reg Address Mask values. More...
 
struct  nfc4_rfal_transceive_context_t
 NFC 4 Click rfal transceive context structure. More...
 
struct  nfc4_rfal_tx_rx_t
 NFC 4 Click RFAL RX TX structure. More...
 
struct  nfc4_rfal_fifo_t
 NFC 4 Click RFAL FIFO structure. More...
 
struct  nfc4_rfal_t
 NFC 4 Click RFAL structure. More...
 
struct  nfc4_rfal_nfca_sens_res_t
 NFC 4 Click RFAL NFCA sens res structure. More...
 
struct  nfc4_rfal_nfca_sel_res_t
 NFC 4 Click RFAL NFCA sel res structure. More...
 
struct  nfc4_rfal_nfca_listen_device_t
 NFC 4 Click RFAL NFCA listen device structure. More...
 
struct  nfc4_rfal_nfc_device_t
 NFC 4 Click RFAL NFC device structure. More...
 
struct  nfc4_rfal_nfc_t
 NFC 4 Click RFAL NFC structure. More...
 
struct  nfc4_rfal_nfca_sel_req_t
 NFC 4 Click RFAL NFCA sel req structure. More...
 
struct  nfc4_col_res_params_t
 NFC 4 Click Colission Resolution context structure. More...
 
struct  nfc4_rfal_nfca_t
 NFC 4 Click RFAL NFC-A instance structure. More...
 
struct  nfc4_s
 NFC 4 Click context object. More...
 
struct  nfc4_cfg_t
 NFC 4 Click configuration object. More...
 
struct  nfc4_rfal_nfca_slp_req_t
 NFC 4 Click SLP_REQ (HLTA) format structure. More...
 

Macros

#define NFC4_REG_IO_CFG_1   0x00
 NFC 4 List of registers - Space A.
 
#define NFC4_REG_IO_CFG_2   0x01
 
#define NFC4_REG_OP_CTRL   0x02
 
#define NFC4_REG_MODE   0x03
 
#define NFC4_REG_BIT_RATE   0x04
 
#define NFC4_REG_ISO14443A_NFC   0x05
 
#define NFC4_REG_ISO14443B   0x06
 
#define NFC4_REG_ISO14443B_FELICA   0x07
 
#define NFC4_REG_PASSIVE_TARGET   0x08
 
#define NFC4_REG_STREAM_MODE   0x09
 
#define NFC4_REG_AUX   0x0A
 
#define NFC4_REG_RX_CFG_1   0x0B
 
#define NFC4_REG_RX_CFG_2   0x0C
 
#define NFC4_REG_RX_CFG_3   0x0D
 
#define NFC4_REG_RX_CFG_4   0x0E
 
#define NFC4_REG_MASK_RX_TIMER   0x0F
 
#define NFC4_REG_NO_RESPONSE_TIMER_1   0x10
 
#define NFC4_REG_NO_RESPONSE_TIMER_2   0x11
 
#define NFC4_REG_TIMER_EMV_CTRL   0x12
 
#define NFC4_REG_GPT_1   0x13
 
#define NFC4_REG_GPT_2   0x14
 
#define NFC4_REG_PPON2   0x15
 
#define NFC4_REG_IRQ_MASK_MAIN   0x16
 
#define NFC4_REG_IRQ_MASK_TIMER_NFC   0x17
 
#define NFC4_REG_IRQ_MASK_ERROR_WUP   0x18
 
#define NFC4_REG_IRQ_MASK_TARGET   0x19
 
#define NFC4_REG_IRQ_MAIN   0x1A
 
#define NFC4_REG_IRQ_TIMER_NFC   0x1B
 
#define NFC4_REG_IRQ_ERROR_WUP   0x1C
 
#define NFC4_REG_IRQ_TARGET   0x1D
 
#define NFC4_REG_FIFO_STATUS_1   0x1E
 
#define NFC4_REG_FIFO_STATUS_2   0x1F
 
#define NFC4_REG_COLLISION_STATUS   0x20
 
#define NFC4_REG_PASSIVE_TARGET_STATUS   0x21
 
#define NFC4_REG_NUM_TX_BYTES_1   0x22
 
#define NFC4_REG_NUM_TX_BYTES_2   0x23
 
#define NFC4_REG_NFCIP1_BIT_RATE   0x24
 
#define NFC4_REG_ADC_OUTPUT   0x25
 
#define NFC4_REG_ANT_TUNE_1   0x26
 
#define NFC4_REG_ANT_TUNE_2   0x27
 
#define NFC4_REG_TX_DRIVER   0x28
 
#define NFC4_REG_PT_MOD   0x29
 
#define NFC4_REG_FIELD_THLD_ACT   0x2A
 
#define NFC4_REG_FIELD_THLD_DEACT   0x2B
 
#define NFC4_REG_REGULATOR_CTRL   0x2C
 
#define NFC4_REG_RSSI_DISPLAY   0x2D
 
#define NFC4_REG_GAIN_REDUCTION_STATE   0x2E
 
#define NFC4_REG_CAP_SENSOR_CTRL   0x2F
 
#define NFC4_REG_CAP_SENSOR_DISPLAY   0x30
 
#define NFC4_REG_AUX_DISPLAY   0x31
 
#define NFC4_REG_WUP_TIMER_CTRL   0x32
 
#define NFC4_REG_AMPLITUDE_MEAS_CFG   0x33
 
#define NFC4_REG_AMPLITUDE_MEAS_REF   0x34
 
#define NFC4_REG_AMPLITUDE_MEAS_AA_DISPLAY   0x35
 
#define NFC4_REG_AMPLITUDE_MEAS_DISPLAY   0x36
 
#define NFC4_REG_PHASE_MEAS_CFG   0x37
 
#define NFC4_REG_PHASE_MEAS_REF   0x38
 
#define NFC4_REG_PHASE_MEAS_AA_DISPLAY   0x39
 
#define NFC4_REG_PHASE_MEAS_DISPLAY   0x3A
 
#define NFC4_REG_CAP_MEAS_CFG   0x3B
 
#define NFC4_REG_CAP_MEAS_REF   0x3C
 
#define NFC4_REG_CAP_MEAS_AA_DISPLAY   0x3D
 
#define NFC4_REG_CAP_MEAS_DISPLAY   0x3E
 
#define NFC4_REG_IC_IDENTITY   0x3F
 
#define NFC4_REG_SPACE_B_MASK   0x40
 NFC 4 List of registers - Space B.
 
#define NFC4_REG_EMD_SUP_CFG   0x45
 
#define NFC4_REG_SUBC_START_TIME   0x46
 
#define NFC4_REG_P2P_RX_CFG   0x4B
 
#define NFC4_REG_CORR_CFG_1   0x4C
 
#define NFC4_REG_CORR_CFG_2   0x4D
 
#define NFC4_REG_SQUELCH_TIMER   0x4F
 
#define NFC4_REG_FIELD_ON_GT   0x55
 
#define NFC4_REG_AUX_MOD   0x68
 
#define NFC4_REG_TX_DRIVER_TIMING   0x69
 
#define NFC4_REG_RES_AM_MOD   0x6A
 
#define NFC4_REG_TX_DRIVER_TIMING_DISPLAY   0x6B
 
#define NFC4_REG_REGULATOR_DISPLAY   0x6C
 
#define NFC4_REG_OVERSHOOT_CFG_1   0x70
 
#define NFC4_REG_OVERSHOOT_CFG_2   0x71
 
#define NFC4_REG_UNDERSHOOT_CFG_1   0x72
 
#define NFC4_REG_UNDERSHOOT_CFG_2   0x73
 
#define NFC4_CMD_SET_DEFAULT   0xC1
 NFC 4 List of direct commands.
 
#define NFC4_CMD_STOP   0xC2
 
#define NFC4_CMD_TRANSMIT_WITH_CRC   0xC4
 
#define NFC4_CMD_TRANSMIT_WITHOUT_CRC   0xC5
 
#define NFC4_CMD_TRANSMIT_REQA   0xC6
 
#define NFC4_CMD_TRANSMIT_WUPA   0xC7
 
#define NFC4_CMD_NFC_INITIAL_FIELD_ON   0xC8
 
#define NFC4_CMD_NFC_RESPONSE_FIELD_ON   0xC9
 
#define NFC4_CMD_GOTO_SENSE   0xCD
 
#define NFC4_CMD_GOTO_SLEEP   0xCE
 
#define NFC4_CMD_MASK_RECEIVE_DATA   0xD0
 
#define NFC4_CMD_UNMASK_RECEIVE_DATA   0xD1
 
#define NFC4_CMD_CHANGE_AM_MOD_STATE   0xD2
 
#define NFC4_CMD_MEAS_AMPLITUDE   0xD3
 
#define NFC4_CMD_RESET_RX_GAIN   0xD5
 
#define NFC4_CMD_ADJUST_REGULATORS   0xD6
 
#define NFC4_CMD_CALIBRATE_DRIVER_TIMING   0xD8
 
#define NFC4_CMD_MEAS_PHASE   0xD9
 
#define NFC4_CMD_CLEAR_RSSI   0xDA
 
#define NFC4_CMD_CLEAR_FIFO   0xDB
 
#define NFC4_CMD_TRANSPARENT_MODE   0xDC
 
#define NFC4_CMD_CALIBRATE_CAP_SENSOR   0xDD
 
#define NFC4_CMD_MEAS_CAPACITANCE   0xDE
 
#define NFC4_CMD_MEAS_POWER_SUPPLY   0xDF
 
#define NFC4_CMD_START_GP_TIMER   0xE0
 
#define NFC4_CMD_START_WUP_TIMER   0xE1
 
#define NFC4_CMD_START_MASK_RECEIVE_TIMER   0xE2
 
#define NFC4_CMD_START_NO_RESPONSE_TIMER   0xE3
 
#define NFC4_CMD_START_PPON2_TIMER   0xE4
 
#define NFC4_CMD_STOP_NO_RESPONSE_TIMER   0xE8
 
#define NFC4_CMD_SPACE_B_ACCESS   0xFB
 
#define NFC4_CMD_TEST_ACCESS   0xFC
 
#define NFC4_MODE_REG_WRITE   0x00
 NFC 4 Communication operation mode setting.
 
#define NFC4_MODE_REG_READ   0x40
 
#define NFC4_MODE_FIFO_LOAD   0x80
 
#define NFC4_MODE_PT_MEM_LOAD_A_CFG   0xA0
 
#define NFC4_MODE_PT_MEM_LOAD_F_CFG   0xA8
 
#define NFC4_MODE_PT_MEM_LOAD_TSN_DATA   0xAC
 
#define NFC4_MODE_PT_MEM_READ   0xBF
 
#define NFC4_MODE_FIFO_READ   0x9F
 
#define NFC4_MODE_DIRECT_COMMAND   0xC0
 
#define NFC4_IC_TYPE_CODE   0x05
 NFC 4 IC Identity default value.
 
#define NFC4_IC_REVISION_CODE_MASK   0x07
 
#define NFC4_IRQ_MASK_ALL   0xFFFFFFFF
 NFC 4 IRQ masks.
 
#define NFC4_IRQ_MASK_NONE   0x00000000
 
#define NFC4_IRQ_MASK_OSC   0x00000080
 
#define NFC4_IRQ_MASK_FWL   0x00000040
 
#define NFC4_IRQ_MASK_RXS   0x00000020
 
#define NFC4_IRQ_MASK_RXE   0x00000010
 
#define NFC4_IRQ_MASK_TXE   0x00000008
 
#define NFC4_IRQ_MASK_COL   0x00000004
 
#define NFC4_IRQ_MASK_RX_REST   0x00000002
 
#define NFC4_IRQ_MASK_RFU   0x00000001
 
#define NFC4_IRQ_MASK_DCT   0x00008000
 
#define NFC4_IRQ_MASK_NRE   0x00004000
 
#define NFC4_IRQ_MASK_GPE   0x00002000
 
#define NFC4_IRQ_MASK_EON   0x00001000
 
#define NFC4_IRQ_MASK_EOF   0x00000800
 
#define NFC4_IRQ_MASK_CAC   0x00000400
 
#define NFC4_IRQ_MASK_CAT   0x00000200
 
#define NFC4_IRQ_MASK_NFCT   0x00000100
 
#define NFC4_IRQ_MASK_CRC   0x00800000
 
#define NFC4_IRQ_MASK_PAR   0x00400000
 
#define NFC4_IRQ_MASK_ERR2   0x00200000
 
#define NFC4_IRQ_MASK_ERR1   0x00100000
 
#define NFC4_IRQ_MASK_WT   0x00080000
 
#define NFC4_IRQ_MASK_WAM   0x00040000
 
#define NFC4_IRQ_MASK_WPH   0x00020000
 
#define NFC4_IRQ_MASK_WCAP   0x00010000
 
#define NFC4_IRQ_MASK_PPON2   0x80000000
 
#define NFC4_IRQ_MASK_SL_WL   0x40000000
 
#define NFC4_IRQ_MASK_APON   0x20000000
 
#define NFC4_IRQ_MASK_RXE_PTA   0x10000000
 
#define NFC4_IRQ_MASK_WU_F   0x08000000
 
#define NFC4_IRQ_MASK_RFU2   0x04000000
 
#define NFC4_IRQ_MASK_WU_A_X   0x02000000
 
#define NFC4_IRQ_MASK_WU_A   0x01000000
 
#define NFC4_TEST_REG_INDICATOR   0x0080
 NFC 4 Click analog config values.
 
#define NFC4_ANALOG_CONFIG_LUT_NOT_FOUND   0xFF
 
#define NFC4_ANALOG_CONFIG_BITRATE_MASK   0x00F0
 
#define NFC4_ANALOG_CONFIG_DIRECTION_MASK   0x000F
 
#define NFC4_ANALOG_CONFIG_BITRATE_SHIFT   4
 
#define NFC4_ANALOG_CONFIG_DIRECTION_SHIFT   0
 
#define NFC4_ANALOG_CONFIG_POLL   0x0000
 
#define NFC4_ANALOG_CONFIG_LISTEN   0x8000
 
#define NFC4_ANALOG_CONFIG_TECH_CHIP   0x0000
 
#define NFC4_ANALOG_CONFIG_TECH_NFCA   0x0100
 
#define NFC4_ANALOG_CONFIG_BITRATE_COMMON   0x0000
 
#define NFC4_ANALOG_CONFIG_BITRATE_106   0x0010
 
#define NFC4_ANALOG_CONFIG_TX   0x0001
 
#define NFC4_ANALOG_CONFIG_RX   0x0002
 
#define NFC4_ANALOG_CONFIG_ANTICOL   0x0003
 
#define NFC4_ANALOG_CONFIG_CHIP_INIT   0x0000
 
#define NFC4_ANALOG_CONFIG_CHIP_DEINIT   0x0001
 
#define NFC4_ANALOG_CONFIG_CHIP_FIELD_ON   0x0002
 
#define NFC4_ANALOG_CONFIG_CHIP_FIELD_OFF   0x0003
 
#define NFC4_ANALOG_CONFIG_CHIP_POLL_COMMON   0x0008
 
#define NFC4_1FC_IN_4096FC   4096U
 NFC 4 Click RFAL macros.
 
#define NFC4_1FC_IN_512FC   512U
 
#define NFC4_1FC_IN_64FC   64U
 
#define NFC4_1FC_IN_8FC   8U
 
#define NFC4_US_IN_MS   1000U
 
#define NFC4_1MS_IN_1FC   13560U
 
#define NFC4_BITS_IN_BYTE   8U
 
#define NFC4_CRC_LEN   2U
 
#define NFC4_RFAL_CONV_1FC_TO_64FC(T)   ( uint32_t ) ( ( uint32_t ) ( T ) / NFC4_1FC_IN_64FC )
 
#define NFC4_RFAL_CONV_64FC_TO_1FC(T)   ( uint32_t ) ( ( uint32_t ) ( T ) * NFC4_1FC_IN_64FC )
 
#define NFC4_RFAL_CONV_BITS_TO_BYTES(N)
 
#define NFC4_RFAL_CONV_BYTES_TO_BITS(N)   ( uint32_t ) ( ( uint32_t) ( N ) * ( NFC4_BITS_IN_BYTE ) )
 
#define NFC4_RFAL_CONV_1FC_TO_4096FC(T)   ( uint32_t ) ( ( uint32_t) ( T ) / NFC4_1FC_IN_4096FC )
 
#define NFC4_RFAL_CONV_4096FC_TO_1FC(T)   ( uint32_t ) ( ( uint32_t) ( T ) * NFC4_1FC_IN_4096FC )
 
#define NFC4_RFAL_CONV_1FC_TO_MS(T)   ( uint32_t ) ( ( uint32_t) ( T ) / NFC4_1MS_IN_1FC )
 
#define NFC4_RFAL_CONV_MS_TO_1FC(T)   ( uint32_t ) ( ( uint32_t) ( T ) * NFC4_1MS_IN_1FC )
 
#define NFC4_FWT_NONE   0xFFFFFFFFU
 
#define NFC4_FWT_ADJUSTMENT   64U
 
#define NFC4_FWT_A_ADJUSTMENT   (512U + 64U)
 
#define NFC4_NRT_MAX_1FC   NFC4_RFAL_CONV_4096FC_TO_1FC( 0xFFFFU )
 
#define NFC4_MRT_MIN_1FC   NFC4_RFAL_CONV_64FC_TO_1FC( 0x0004U )
 
#define NFC4_NRT_DISABLED   0U
 
#define NFC4_NRT_MAX   0xFFFFU
 
#define NFC4_RFAL_CALC_NUM_BYTES(NBITS)   ( ( ( uint32_t )( NBITS ) + 7U ) / 8U )
 
#define NFC4_RFAL_CREATE_BYTE_FLAGS_TX_RX_CONTEXT(CTX, TB, TBL, RB, RBL, RDL, FL, T)
 NFC 4 Click rfal create byte flags tx rx context macro.
 
#define NFC4_NFCA_CASCADE_1_UID_LEN   4U
 NFC 4 Click RFAL NFC macros.
 
#define NFC4_NFCA_CASCADE_2_UID_LEN   7U
 
#define NFC4_NFCA_CASCADE_3_UID_LEN   10U
 
#define NFC4_NFC_MAX_DEVICES   5U
 
#define NFC4_THLD_DO_NOT_SET   0xFFU
 
#define NFC4_NFCA_FDTMIN   1620U
 
#define NFC4_RFAL_NFCA_CLN2_SEL_CMD(CL)   ( uint8_t )( ( uint8_t )( NFC4_NFCA_CMD_SEL_CL1 ) + ( 2U * ( CL ) ) )
 
#define NFC4_RFAL_NFCA_SEL_PAR(NBY, NBI)   ( uint8_t )( ( ( ( NBY ) << 4U ) & 0xF0U ) | ( ( NBI ) &0x0FU ) )
 
#define NFC4_RFAL_NFCA_NFC_ID_LEN_2CL(LEN)   ( ( LEN ) / 5U )
 
#define NFC4_NFCA_SLP_FWT   NFC4_RFAL_CONV_MS_TO_1FC ( 1 )
 
#define NFC4_NFCA_SLP_CMD   0x50U
 
#define NFC4_NFCA_SLP_BYTE2   0x00U
 
#define NFC4_NFCA_SLP_CMD_POS   0U
 
#define NFC4_NFCA_SLP_BYTE2_POS   1U
 
#define NFC4_NFCA_SDD_CT   0x88U
 
#define NFC4_NFCA_SDD_CT_LEN   1U
 
#define NFC4_NFCA_SLP_REQ_LEN   2U
 
#define NFC4_NFCA_SEL_CMD_LEN   1U
 
#define NFC4_NFCA_SEL_PAR_LEN   1U
 
#define NFC4_NFCA_SEL_SELPAR   NFC4_RFAL_NFCA_SEL_PAR( 7U, 0U )
 
#define NFC4_NFCA_BCC_LEN   1U
 
#define NFC4_NFCA_SDD_REQ_LEN   ( NFC4_NFCA_SEL_CMD_LEN + NFC4_NFCA_SEL_PAR_LEN )
 
#define NFC4_NFCA_SDD_RES_LEN   ( NFC4_NFCA_CASCADE_1_UID_LEN + NFC4_NFCA_BCC_LEN )
 
#define NFC4_NFCA_N_RETRANS   2U
 
#define NFC4_ISO14443A_SDD_RES_LEN   5U
 
#define NFC4_TXRX_FLAGS_DEFAULT
 
#define NFC4_FIFO_DEPTH   512U
 NFC 4 Click NFC FIFO macros.
 
#define NFC4_FIFO_STATUS_REG1   0U
 
#define NFC4_FIFO_STATUS_REG2   1U
 
#define NFC4_FIFO_STATUS_INVALID   0xFFU
 
#define NFC4_FIFO_IN_WL   200U
 
#define NFC4_FIFO_OUT_WL   ( NFC4_FIFO_DEPTH - NFC4_FIFO_IN_WL )
 
#define MAX(a, b)   ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
 NFC 4 Click global function macros.
 
#define MIN(a, b)   ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
 
#define EXIT_ON_ERR(r, f)
 
#define NFC4_IO_CFG_1_SINGLE   ( 1U << 7 )
 NFC 4 Click register bits value.
 
#define NFC4_IO_CFG_1_RFO2   ( 1U << 6 )
 
#define NFC4_IO_CFG_1_I2C_THD1   ( 1U << 5 )
 
#define NFC4_IO_CFG_1_I2C_THD0   ( 1U << 4 )
 
#define NFC4_IO_CFG_1_I2C_THD_MASK   ( 3U << 4 )
 
#define NFC4_IO_CFG_1_I2C_THD_SHIFT   ( 4U )
 
#define NFC4_IO_CFG_1_RFU   ( 1U << 3 )
 
#define NFC4_IO_CFG_1_OUT_CL1   ( 1U << 2 )
 
#define NFC4_IO_CFG_1_OUT_CL0   ( 1U << 1 )
 
#define NFC4_IO_CFG_1_OUT_CL_DISABLED   ( 3U << 1 )
 
#define NFC4_IO_CFG_1_OUT_CL_13_56MHZ   ( 2U << 1 )
 
#define NFC4_IO_CFG_1_OUT_CL_4_78MHZ   ( 1U << 1 )
 
#define NFC4_IO_CFG_1_OUT_CL_3_39MHZ   ( 0U << 1 )
 
#define NFC4_IO_CFG_1_OUT_CL_MASK   ( 3U << 1 )
 
#define NFC4_IO_CFG_1_OUT_CL_SHIFT   ( 1U )
 
#define NFC4_IO_CFG_1_LF_CLK_OFF   ( 1U << 0 )
 
#define NFC4_IO_CFG_1_LF_CLK_OFF_ON   ( 1U << 0 )
 
#define NFC4_IO_CFG_1_LF_CLK_OFF_OFF   ( 0U << 0 )
 
#define NFC4_IO_CFG_2_SUP3V   ( 1U << 7 )
 
#define NFC4_IO_CFG_2_SUP3V_3V   ( 1U << 7 )
 
#define NFC4_IO_CFG_2_SUP3V_5V   ( 0U << 7 )
 
#define NFC4_IO_CFG_2_VSPD_OFF   ( 1U << 6 )
 
#define NFC4_IO_CFG_2_AAT_EN   ( 1U << 5 )
 
#define NFC4_IO_CFG_2_MISO_PD2   ( 1U << 4 )
 
#define NFC4_IO_CFG_2_MISO_PD1   ( 1U << 3 )
 
#define NFC4_IO_CFG_2_IO_DRV_LVL   ( 1U << 2 )
 
#define NFC4_IO_CFG_2_SLOW_UP   ( 1U << 0 )
 
#define NFC4_ISO14443A_NFC_NO_TX_PAR   ( 1U << 7 )
 
#define NFC4_ISO14443A_NFC_NO_TX_PAR_OFF   ( 0U << 7 )
 
#define NFC4_ISO14443A_NFC_NO_RX_PAR   ( 1U << 6 )
 
#define NFC4_ISO14443A_NFC_NO_RX_PAR_OFF   ( 0U << 6 )
 
#define NFC4_ISO14443A_NFC_NFC_F0   ( 1U << 5 )
 
#define NFC4_ISO14443A_NFC_NFC_F0_OFF   ( 0U << 5 )
 
#define NFC4_ISO14443A_NFC_P_LEN3   ( 1U << 4 )
 
#define NFC4_ISO14443A_NFC_P_LEN2   ( 1U << 3 )
 
#define NFC4_ISO14443A_NFC_P_LEN1   ( 1U << 2 )
 
#define NFC4_ISO14443A_NFC_P_LEN0   ( 1U << 1 )
 
#define NFC4_ISO14443A_NFC_P_LEN_MASK   ( 0xFU << 1 )
 
#define NFC4_ISO14443A_NFC_P_LEN_SHIFT   ( 1U )
 
#define NFC4_ISO14443A_NFC_ANTCL   ( 1U << 0 )
 
#define NFC4_RX_CFG_2_DEMOD_MODE   ( 1U << 7 )
 
#define NFC4_RX_CFG_2_AMD_SEL   ( 1U << 6 )
 
#define NFC4_RX_CFG_2_AMD_SEL_MIXER   ( 1U << 6 )
 
#define NFC4_RX_CFG_2_AMD_SEL_PEAK   ( 0U << 6 )
 
#define NFC4_RX_CFG_2_SQM_DYN   ( 1U << 5 )
 
#define NFC4_RX_CFG_2_PULZ_61   ( 1U << 4 )
 
#define NFC4_RX_CFG_2_AGC_EN   ( 1U << 3 )
 
#define NFC4_RX_CFG_2_AGC_M   ( 1U << 2 )
 
#define NFC4_RX_CFG_2_AGC_ALG   ( 1U << 1 )
 
#define NFC4_RX_CFG_2_AGC6_3   ( 1U << 0 )
 
#define NFC4_OP_CTRL_EN   ( 1U << 7 )
 
#define NFC4_OP_CTRL_RX_EN   ( 1U << 6 )
 
#define NFC4_OP_CTRL_RX_CHN   ( 1U << 5 )
 
#define NFC4_OP_CTRL_RX_MAN   ( 1U << 4 )
 
#define NFC4_OP_CTRL_TX_EN   ( 1U << 3 )
 
#define NFC4_OP_CTRL_WU   ( 1U << 2 )
 
#define NFC4_OP_CTRL_EN_FD_C1   ( 1U << 1 )
 
#define NFC4_OP_CTRL_EN_FD_C0   ( 1U << 0 )
 
#define NFC4_OP_CTRL_EN_FD_EFD_OFF   ( 0U << 0 )
 
#define NFC4_OP_CTRL_EN_FD_MANUAL_EFD_CA   ( 1U << 0 )
 
#define NFC4_OP_CTRL_EN_FD_MANUAL_EFD_PDT   ( 2U << 0 )
 
#define NFC4_OP_CTRL_EN_FD_AUTO_EFD   ( 3U << 0 )
 
#define NFC4_OP_CTRL_EN_FD_SHIFT   ( 0U )
 
#define NFC4_OP_CTRL_EN_FD_MASK   ( 3U << 0 )
 
#define NFC4_NFCIP1_BIT_RATE_NFC_RFU1   ( 1U << 7 )
 
#define NFC4_NFCIP1_BIT_RATE_NFC_RFU0   ( 1U << 6 )
 
#define NFC4_NFCIP1_BIT_RATE_NFC_RATE1   ( 1U << 5 )
 
#define NFC4_NFCIP1_BIT_RATE_NFC_RATE0   ( 1U << 4 )
 
#define NFC4_NFCIP1_BIT_RATE_NFC_RATE_MASK   ( 0x3U << 4 )
 
#define NFC4_NFCIP1_BIT_RATE_NFC_RATE_SHIFT   ( 4U )
 
#define NFC4_NFCIP1_BIT_RATE_PPT2_ON   ( 1U << 3 )
 
#define NFC4_NFCIP1_BIT_RATE_GPT_ON   ( 1U << 2 )
 
#define NFC4_NFCIP1_BIT_RATE_NRT_ON   ( 1U << 1 )
 
#define NFC4_NFCIP1_BIT_RATE_MRT_ON   ( 1U << 0 )
 
#define NFC4_AUX_DISPLAY_A_CHA   ( 1U << 7 )
 
#define NFC4_AUX_DISPLAY_EFD_O   ( 1U << 6 )
 
#define NFC4_AUX_DISPLAY_TX_ON   ( 1U << 5 )
 
#define NFC4_AUX_DISPLAY_OSC_OK   ( 1U << 4 )
 
#define NFC4_AUX_DISPLAY_RX_ON   ( 1U << 3 )
 
#define NFC4_AUX_DISPLAY_RX_ACT   ( 1U << 2 )
 
#define NFC4_AUX_DISPLAY_EN_PEER   ( 1U << 1 )
 
#define NFC4_AUX_DISPLAY_EN_AC   ( 1U << 0 )
 
#define NFC4_FIFO_STATUS2_FIFO_B9   ( 1U << 7 )
 
#define NFC4_FIFO_STATUS2_FIFO_B8   ( 1U << 6 )
 
#define NFC4_FIFO_STATUS2_FIFO_B_MASK   ( 3U << 6 )
 
#define NFC4_FIFO_STATUS2_FIFO_B_SHIFT   ( 6U )
 
#define NFC4_FIFO_STATUS2_FIFO_UNF   ( 1U << 5 )
 
#define NFC4_FIFO_STATUS2_FIFO_OVR   ( 1U << 4 )
 
#define NFC4_FIFO_STATUS2_FIFO_LB2   ( 1U << 3 )
 
#define NFC4_FIFO_STATUS2_FIFO_LB1   ( 1U << 2 )
 
#define NFC4_FIFO_STATUS2_FIFO_LB0   ( 1U << 1 )
 
#define NFC4_FIFO_STATUS2_FIFO_LB_MASK   ( 7U << 1 )
 
#define NFC4_FIFO_STATUS2_FIFO_LB_SHIFT   ( 1U )
 
#define NFC4_FIFO_STATUS2_NP_LB   ( 1U << 0 )
 
#define NFC4_MODE_TARG   ( 1U << 7 )
 
#define NFC4_MODE_TARG_TARG   ( 1U << 7 )
 
#define NFC4_MODE_TARG_INIT   ( 0U << 7 )
 
#define NFC4_MODE_OM3   ( 1U << 6 )
 
#define NFC4_MODE_OM2   ( 1U << 5 )
 
#define NFC4_MODE_OM1   ( 1U << 4 )
 
#define NFC4_MODE_OM0   ( 1U << 3 )
 
#define NFC4_MODE_OM_BPSK_STREAM   ( 0xFU << 3 )
 
#define NFC4_MODE_OM_SUBCARRIER_STREAM   ( 0xEU << 3 )
 
#define NFC4_MODE_OM_TOPAZ   ( 0x4U << 3 )
 
#define NFC4_MODE_OM_FELICA   ( 0x3U << 3 )
 
#define NFC4_MODE_OM_ISO14443B   ( 0x2U << 3 )
 
#define NFC4_MODE_OM_ISO14443A   ( 0x1U << 3 )
 
#define NFC4_MODE_OM_TARG_NFCA   ( 0x1U << 3 )
 
#define NFC4_MODE_OM_TARG_NFCB   ( 0x2U << 3 )
 
#define NFC4_MODE_OM_TARG_NFCF   ( 0x4U << 3 )
 
#define NFC4_MODE_OM_TARG_NFCIP   ( 0x7U << 3 )
 
#define NFC4_MODE_OM_NFC   ( 0x0U << 3 )
 
#define NFC4_MODE_OM_MASK   ( 0xFU << 3 )
 
#define NFC4_MODE_OM_SHIFT   ( 3U )
 
#define NFC4_MODE_TR_AM   ( 1U << 2 )
 
#define NFC4_MODE_TR_AM_OOK   ( 0U << 2 )
 
#define NFC4_MODE_TR_AM_AM   ( 1U << 2 )
 
#define NFC4_MODE_NFC_AR1   ( 1U << 1 )
 
#define NFC4_MODE_NFC_AR0   ( 1U << 0 )
 
#define NFC4_MODE_NFC_AR_OFF   ( 0U << 0 )
 
#define NFC4_MODE_NFC_AR_AUTO_RX   ( 1U << 0 )
 
#define NFC4_MODE_NFC_AR_EOF   ( 2U << 0 )
 
#define NFC4_MODE_NFC_AR_RFU   ( 3U << 0 )
 
#define NFC4_MODE_NFC_AR_MASK   ( 3U << 0 )
 
#define NFC4_MODE_NFC_AR_SHIFT   ( 0U )
 
#define NFC4_BIT_RATE_TXRATE_106   ( 0x0U << 4 )
 
#define NFC4_BIT_RATE_TXRATE_212   ( 0x1U << 4 )
 
#define NFC4_BIT_RATE_TXRATE_424   ( 0x2U << 4 )
 
#define NFC4_BIT_RATE_TXRATE_848   ( 0x3U << 4 )
 
#define NFC4_BIT_RATE_TXRATE_MASK   ( 0x3U << 4 )
 
#define NFC4_BIT_RATE_TXRATE_SHIFT   ( 4U )
 
#define NFC4_BIT_RATE_RXRATE_106   ( 0x0U << 0 )
 
#define NFC4_BIT_RATE_RXRATE_212   ( 0x1U << 0 )
 
#define NFC4_BIT_RATE_RXRATE_424   ( 0x2U << 0 )
 
#define NFC4_BIT_RATE_RXRATE_848   ( 0x3U << 0 )
 
#define NFC4_BIT_RATE_RXRATE_MASK   ( 0x3U << 0 )
 
#define NFC4_BIT_RATE_RXRATE_SHIFT   ( 0U )
 
#define NFC4_AUX_MOD_DIS_REG_AM   ( 1U << 7 )
 
#define NFC4_AUX_MOD_LM_EXT_POL   ( 1U << 6 )
 
#define NFC4_AUX_MOD_LM_EXT   ( 1U << 5 )
 
#define NFC4_AUX_MOD_LM_DRI   ( 1U << 4 )
 
#define NFC4_AUX_MOD_RES_AM   ( 1U << 3 )
 
#define NFC4_AUX_MOD_RFU2   ( 1U << 2 )
 
#define NFC4_AUX_MOD_RFU1   ( 1U << 1 )
 
#define NFC4_AUX_MOD_RFU0   ( 1U << 0 )
 
#define NFC4_PASSIVE_TARGET_FDEL_3   ( 1U << 7 )
 
#define NFC4_PASSIVE_TARGET_FDEL_2   ( 1U << 6 )
 
#define NFC4_PASSIVE_TARGET_FDEL_1   ( 1U << 5 )
 
#define NFC4_PASSIVE_TARGET_FDEL_0   ( 1U << 4 )
 
#define NFC4_PASSIVE_TARGET_FDEL_MASK   ( 0xFU << 4 )
 
#define NFC4_PASSIVE_TARGET_FDEL_SHIFT   ( 4U )
 
#define NFC4_PASSIVE_TARGET_D_AC_AP2P   ( 1U << 3 )
 
#define NFC4_PASSIVE_TARGET_D_212_424_1R   ( 1U << 2 )
 
#define NFC4_PASSIVE_TARGET_RFU   ( 1U << 1 )
 
#define NFC4_PASSIVE_TARGET_D_106_AC_A   ( 1U << 0 )
 
#define NFC4_PT_MOD_PTM_RES3   ( 1U << 7 )
 
#define NFC4_PT_MOD_PTM_RES2   ( 1U << 6 )
 
#define NFC4_PT_MOD_PTM_RES1   ( 1U << 5 )
 
#define NFC4_PT_MOD_PTM_RES0   ( 1U << 4 )
 
#define NFC4_PT_MOD_PTM_RES_MASK   ( 0xFU << 4 )
 
#define NFC4_PT_MOD_PTM_RES_SHIFT   ( 4U )
 
#define NFC4_PT_MOD_PT_RES3   ( 1U << 3 )
 
#define NFC4_PT_MOD_PT_RES2   ( 1U << 2 )
 
#define NFC4_PT_MOD_PT_RES1   ( 1U << 1 )
 
#define NFC4_PT_MOD_PT_RES0   ( 1U << 0 )
 
#define NFC4_PT_MOD_PT_RES_MASK   ( 0xFU << 0 )
 
#define NFC4_PT_MOD_PT_RES_SHIFT   ( 0U )
 
#define NFC4_EMD_SUP_CFG_EMD_EMV   ( 1U << 7 )
 
#define NFC4_EMD_SUP_CFG_EMD_EMV_ON   ( 1U << 7 )
 
#define NFC4_EMD_SUP_CFG_EMD_EMV_OFF   ( 0U << 7 )
 
#define NFC4_EMD_SUP_CFG_RX_START_EMV   ( 1U << 6 )
 
#define NFC4_EMD_SUP_CFG_RX_START_EMV_ON   ( 1U << 6 )
 
#define NFC4_EMD_SUP_CFG_RX_START_EMV_OFF   ( 0U << 6 )
 
#define NFC4_EMD_SUP_CFG_RFU1   ( 1U << 5 )
 
#define NFC4_EMD_SUP_CFG_RFU0   ( 1U << 4 )
 
#define NFC4_EMD_SUP_CFG_EMD_THLD3   ( 1U << 3 )
 
#define NFC4_EMD_SUP_CFG_EMD_THLD2   ( 1U << 2 )
 
#define NFC4_EMD_SUP_CFG_EMD_THLD1   ( 1U << 1 )
 
#define NFC4_EMD_SUP_CFG_EMD_THLD0   ( 1U << 0 )
 
#define NFC4_EMD_SUP_CFG_EMD_THLD_MASK   ( 0xFU << 0 )
 
#define NFC4_EMD_SUP_CFG_EMD_THLD_SHIFT   ( 0U )
 
#define NFC4_AUX_NO_CRC_RX   ( 1U << 7 )
 
#define NFC4_AUX_RFU   ( 1U << 6 )
 
#define NFC4_AUX_NFC_ID1   ( 1U << 5 )
 
#define NFC4_AUX_NFC_ID0   ( 1U << 4 )
 
#define NFC4_AUX_NFC_ID_7BYTES   ( 1U << 4 )
 
#define NFC4_AUX_NFC_ID_4BYTES   ( 0U << 4 )
 
#define NFC4_AUX_NFC_ID_MASK   ( 3U << 4 )
 
#define NFC4_AUX_NFC_ID_SHIFT   ( 4U )
 
#define NFC4_AUX_MFAZ_CL90   ( 1U << 3 )
 
#define NFC4_AUX_DIS_CORR   ( 1U << 2 )
 
#define NFC4_AUX_DIS_CORR_COHERENT   ( 1U << 2 )
 
#define NFC4_AUX_DIS_CORR_CORRELATOR   ( 0U << 2 )
 
#define NFC4_AUX_NFC_N1   ( 1U << 1 )
 
#define NFC4_AUX_NFC_N0   ( 1U << 0 )
 
#define NFC4_AUX_NFC_N_MASK   ( 3U << 0 )
 
#define NFC4_AUX_NFC_N_SHIFT   ( 0U )
 
#define NFC4_TIMER_EMV_CONTROL_GPTC2   ( 1U << 7 )
 
#define NFC4_TIMER_EMV_CONTROL_GPTC1   ( 1U << 6 )
 
#define NFC4_TIMER_EMV_CONTROL_GPTC0   ( 1U << 5 )
 
#define NFC4_TIMER_EMV_CONTROL_GPTC_NO_TRIGGER   ( 0U << 5 )
 
#define NFC4_TIMER_EMV_CONTROL_GPTC_ERX   ( 1U << 5 )
 
#define NFC4_TIMER_EMV_CONTROL_GPTC_SRX   ( 2U << 5 )
 
#define NFC4_TIMER_EMV_CONTROL_GPTC_ETX_NFC   ( 3U << 5 )
 
#define NFC4_TIMER_EMV_CONTROL_GPTC_MASK   ( 7U << 5 )
 
#define NFC4_TIMER_EMV_CONTROL_GPTC_SHIFT   ( 5U )
 
#define NFC4_TIMER_EMV_CONTROL_RFU   ( 1U << 4 )
 
#define NFC4_TIMER_EMV_CONTROL_MRT_STEP   ( 1U << 3 )
 
#define NFC4_TIMER_EMV_CONTROL_MRT_STEP_512   ( 1U << 3 )
 
#define NFC4_TIMER_EMV_CONTROL_MRT_STEP_64   ( 0U << 3 )
 
#define NFC4_TIMER_EMV_CONTROL_NRT_NFC   ( 1U << 2 )
 
#define NFC4_TIMER_EMV_CONTROL_NRT_NFC_ON   ( 1U << 2 )
 
#define NFC4_TIMER_EMV_CONTROL_NRT_NFC_OFF   ( 0U << 2 )
 
#define NFC4_TIMER_EMV_CONTROL_NRT_EMV   ( 1U << 1 )
 
#define NFC4_TIMER_EMV_CONTROL_NRT_EMV_ON   ( 1U << 1 )
 
#define NFC4_TIMER_EMV_CONTROL_NRT_EMV_OFF   ( 0U << 1 )
 
#define NFC4_TIMER_EMV_CONTROL_NRT_STEP   ( 1U << 0 )
 
#define NFC4_TIMER_EMV_CONTROL_NRT_STEP_64FC   ( 0U << 0 )
 
#define NFC4_TIMER_EMV_CONTROL_NRT_STEP_4096_FC   ( 1U << 0 )
 
#define NFC4_COLLISION_STATUS_C_BYTE3   ( 1U << 7 )
 
#define NFC4_COLLISION_STATUS_C_BYTE2   ( 1U << 6 )
 
#define NFC4_COLLISION_STATUS_C_BYTE1   ( 1U << 5 )
 
#define NFC4_COLLISION_STATUS_C_BYTE0   ( 1U << 4 )
 
#define NFC4_COLLISION_STATUS_C_BYTE_MASK   ( 0x FU << 4 )
 
#define NFC4_COLLISION_STATUS_C_BYTE_SHIFT   ( 4U )
 
#define NFC4_COLLISION_STATUS_C_BIT2   ( 1U << 3 )
 
#define NFC4_COLLISION_STATUS_C_BIT1   ( 1U << 2 )
 
#define NFC4_COLLISION_STATUS_C_BIT0   ( 1U << 1 )
 
#define NFC4_COLLISION_STATUS_C_PB   ( 1U << 0 )
 
#define NFC4_COLLISION_STATUS_C_BIT_MASK   ( 3U << 1 )
 
#define NFC4_COLLISION_STATUS_C_BIT_SHIFT   ( 1U )
 
#define NFC4_CORR_CFG_1_CORR_S7   ( 1U << 7 )
 
#define NFC4_CORR_CFG_1_CORR_S6   ( 1U << 6 )
 
#define NFC4_CORR_CFG_1_CORR_S5   ( 1U << 5 )
 
#define NFC4_CORR_CFG_1_CORR_S4   ( 1U << 4 )
 
#define NFC4_CORR_CFG_1_CORR_S3   ( 1U << 3 )
 
#define NFC4_CORR_CFG_1_CORR_S2   ( 1U << 2 )
 
#define NFC4_CORR_CFG_1_CORR_S1   ( 1U << 1 )
 
#define NFC4_CORR_CFG_1_CORR_S0   ( 1U << 0 )
 
#define NFC4_TX_DRIVER_AM_MOD3   ( 1U << 7 )
 
#define NFC4_TX_DRIVER_AM_MOD2   ( 1U << 6 )
 
#define NFC4_TX_DRIVER_AM_MOD1   ( 1U << 5 )
 
#define NFC4_TX_DRIVER_AM_MOD0   ( 1U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_5PERCENT   ( 0x0U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_6PERCENT   ( 0x1U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_7PERCENT   ( 0x2U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_8PERCENT   ( 0x3U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_9PERCENT   ( 0x4U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_10PERCENT   ( 0x5U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_11PERCENT   ( 0x6U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_12PERCENT   ( 0x7U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_13PERCENT   ( 0x8U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_14PERCENT   ( 0x9U << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_15PERCENT   ( 0xAU << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_17PERCENT   ( 0xBU << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_19PERCENT   ( 0xCU << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_22PERCENT   ( 0xDU << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_26PERCENT   ( 0xEU << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_40PERCENT   ( 0xFU << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_MASK   ( 0xFU << 4 )
 
#define NFC4_TX_DRIVER_AM_MOD_SHIFT   ( 4U )
 
#define NFC4_TX_DRIVER_D_RES3   ( 1U << 3 )
 
#define NFC4_TX_DRIVER_D_RES2   ( 1U << 2 )
 
#define NFC4_TX_DRIVER_D_RES1   ( 1U << 1 )
 
#define NFC4_TX_DRIVER_D_RES0   ( 1U << 0 )
 
#define NFC4_TX_DRIVER_D_RES_MASK   ( 0xFU << 0 )
 
#define NFC4_TX_DRIVER_D_RES_SHIFT   ( 0U )
 
#define NFC4_FIELD_THLD_ACT_TRG_L2A   ( 1U << 6 )
 
#define NFC4_FIELD_THLD_ACT_TRG_L1A   ( 1U << 5 )
 
#define NFC4_FIELD_THLD_ACT_TRG_L0A   ( 1U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_75MV   ( 0x0U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_105MV   ( 0x1U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_150MV   ( 0x2U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_205MV   ( 0x3U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_290MV   ( 0x4U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_400MV   ( 0x5U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_560MV   ( 0x6U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_800MV   ( 0x7U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_MASK   ( 7U << 4 )
 
#define NFC4_FIELD_THLD_ACT_TRG_SHIFT   ( 4U )
 
#define NFC4_FIELD_THLD_ACT_RFE_T3A   ( 1U << 3 )
 
#define NFC4_FIELD_THLD_ACT_RFE_T2A   ( 1U << 2 )
 
#define NFC4_FIELD_THLD_ACT_RFE_T1A   ( 1U << 1 )
 
#define NFC4_FIELD_THLD_ACT_RFE_T0A   ( 1U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_75MV   ( 0x0U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_105MV   ( 0x1U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_150MV   ( 0x2U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_205MV   ( 0x3U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_290MV   ( 0x4U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_400MV   ( 0x5U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_560MV   ( 0x6U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_800MV   ( 0x7U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_25MV   ( 0x8U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_33MV   ( 0x9U << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_47MV   ( 0xAU << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_64MV   ( 0xBU << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_90MV   ( 0xCU << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_125MV   ( 0xDU << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_175MV   ( 0xEU << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_250MV   ( 0xFU << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_MASK   ( 0xFU << 0 )
 
#define NFC4_FIELD_THLD_ACT_RFE_SHIFT   ( 0U )
 
#define NFC4_FIELD_THLD_DEACT_TRG_L2D   ( 1U << 6 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_L1D   ( 1U << 5 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_L0D   ( 1U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_75MV   ( 0x0U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_105MV   ( 0x1U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_150MV   ( 0x2U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_205MV   ( 0x3U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_290MV   ( 0x4U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_400MV   ( 0x5U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_560MV   ( 0x6U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_800MV   ( 0x7U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_MASK   ( 7U << 4 )
 
#define NFC4_FIELD_THLD_DEACT_TRG_SHIFT   ( 4U )
 
#define NFC4_FIELD_THLD_DEACT_RFE_T3D   ( 1U << 3 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_T2D   ( 1U << 2 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_T1D   ( 1U << 1 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_T0D   ( 1U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_75MV   ( 0x0U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_105MV   ( 0x1U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_150MV   ( 0x2U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_205MV   ( 0x3U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_290MV   ( 0x4U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_400MV   ( 0x5U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_560MV   ( 0x6U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_800MV   ( 0x7U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_25MV   ( 0x8U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_33MV   ( 0x9U << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_47MV   ( 0xAU << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_64MV   ( 0xBU << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_90MV   ( 0xCU << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_125MV   ( 0xDU << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_175MV   ( 0xEU << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_250MV   ( 0xFU << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_MASK   ( 0xFU << 0 )
 
#define NFC4_FIELD_THLD_DEACT_RFE_SHIFT   ( 0U )
 
#define NFC4_REGULATOR_CTRL_REG_S   ( 1U << 7 )
 
#define NFC4_REGULATOR_CTRL_REGE_3   ( 1U << 6 )
 
#define NFC4_REGULATOR_CTRL_REGE_2   ( 1U << 5 )
 
#define NFC4_REGULATOR_CTRL_REGE_1   ( 1U << 4 )
 
#define NFC4_REGULATOR_CTRL_REGE_0   ( 1U << 3 )
 
#define NFC4_REGULATOR_CTRL_REGE_MASK   ( 0xFU << 3 )
 
#define NFC4_REGULATOR_CTRL_REGE_SHIFT   ( 3U )
 
#define NFC4_REGULATOR_CTRL_MPSV2   ( 2U << 2 )
 
#define NFC4_REGULATOR_CTRL_MPSV1   ( 1U << 1 )
 
#define NFC4_REGULATOR_CTRL_MPSV0   ( 1U << 0 )
 
#define NFC4_REGULATOR_CTRL_MPSV_VDD   ( 0U )
 
#define NFC4_REGULATOR_CTRL_MPSV_VDD_A   ( 1U )
 
#define NFC4_REGULATOR_CTRL_MPSV_VDD_D   ( 2U )
 
#define NFC4_REGULATOR_CTRL_MPSV_VDD_RF   ( 3U )
 
#define NFC4_REGULATOR_CTRL_MPSV_VDD_AM   ( 4U )
 
#define NFC4_REGULATOR_CTRL_RFU   ( 5U )
 
#define NFC4_REGULATOR_CTRL_RFU1   ( 6U )
 
#define NFC4_REGULATOR_CTRL_RFU2   ( 7U )
 
#define NFC4_REGULATOR_CTRL_MPSV_MASK   ( 7U )
 
#define NFC4_REGULATOR_CTRL_MPSV_SHIFT   ( 0U )
 
#define NFC4_SET_DEV_ADDR   0x50
 NFC 4 device address setting.
 
#define NFC4_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define NFC4_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define NFC4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Typedefs

typedef err_t(* nfc4_master_io_t) (struct nfc4_s *, uint8_t, uint8_t *, uint16_t)
 NFC 4 Click driver interface.
 
typedef struct nfc4_s nfc4_t
 NFC 4 Click context object.
 

Enumerations

enum  nfc4_drv_t { NFC4_DRV_SEL_SPI , NFC4_DRV_SEL_I2C }
 NFC 4 Click driver selector. More...
 
enum  nfc4_rfal_transceive_state_t {
  NFC4_TXRX_STATE_IDLE = 0 , NFC4_TXRX_STATE_INIT = 1 , NFC4_TXRX_STATE_START = 2 , NFC4_TXRX_STATE_TX_IDLE = 11 ,
  NFC4_TXRX_STATE_TX_WAIT_GT = 12 , NFC4_TXRX_STATE_TX_WAIT_FDT = 13 , NFC4_TXRX_STATE_TX_TRANSMIT = 14 , NFC4_TXRX_STATE_TX_WAIT_WL = 15 ,
  NFC4_TXRX_STATE_TX_RELOAD_FIFO = 16 , NFC4_TXRX_STATE_TX_WAIT_TXE = 17 , NFC4_TXRX_STATE_TX_DONE = 18 , NFC4_TXRX_STATE_TX_FAIL = 19 ,
  NFC4_TXRX_STATE_RX_IDLE = 81 , NFC4_TXRX_STATE_RX_WAIT_EON = 82 , NFC4_TXRX_STATE_RX_WAIT_RXS = 83 , NFC4_TXRX_STATE_RX_WAIT_RXE = 84 ,
  NFC4_TXRX_STATE_RX_READ_FIFO = 85 , NFC4_TXRX_STATE_RX_ERR_CHECK = 86 , NFC4_TXRX_STATE_RX_READ_DATA = 87 , NFC4_TXRX_STATE_RX_WAIT_EOF = 88 ,
  NFC4_TXRX_STATE_RX_DONE = 89 , NFC4_TXRX_STATE_RX_FAIL = 90
}
 NFC 4 Click rfal transceive states enum. More...
 
enum  nfc4_rfal_nfc_state_t {
  NFC4_NFC_STATE_NOTINIT = 0 , NFC4_NFC_STATE_IDLE = 1 , NFC4_NFC_STATE_START_DISCOVERY = 2 , NFC4_NFC_STATE_POLL_COLAVOIDANCE = 11 ,
  NFC4_NFC_STATE_POLL_ACTIVATION = 13 , NFC4_NFC_STATE_ACTIVATED = 30 , NFC4_NFC_STATE_DEACTIVATION = 34
}
 NFC 4 Click RFAL NFC state enum. More...
 
enum  nfc4_col_res_state_t { NFC4_NFCA_CR_CL , NFC4_NFCA_CR_SDD , NFC4_NFCA_CR_SEL , NFC4_NFCA_CR_DONE }
 NFC 4 Click Colission Resolution states enum. More...
 
enum  nfc4_return_value_t { NFC4_OK = 0 , NFC4_ERROR = -1 }
 NFC 4 Click return value data. More...
 
enum  nfc4_rfal_return_value_t {
  NFC4_RFAL_ERR_NONE = 0 , NFC4_RFAL_ERR_NOMEM = 1 , NFC4_RFAL_ERR_BUSY = 2 , NFC4_RFAL_ERR_IO = 3 ,
  NFC4_RFAL_ERR_TIMEOUT = 4 , NFC4_RFAL_ERR_REQUEST = 5 , NFC4_RFAL_ERR_NOMSG = 6 , NFC4_RFAL_ERR_PARAM = 7 ,
  NFC4_RFAL_ERR_SYSTEM = 8 , NFC4_RFAL_ERR_FRAMING = 9 , NFC4_RFAL_ERR_OVERRUN = 10 , NFC4_RFAL_ERR_PROTO = 11 ,
  NFC4_RFAL_ERR_INTERNAL = 12 , NFC4_RFAL_ERR_AGAIN = 13 , NFC4_RFAL_ERR_MEM_CORRUPT = 14 , NFC4_RFAL_ERR_NOT_IMPLEMENTED = 15 ,
  NFC4_RFAL_ERR_PC_CORRUPT = 16 , NFC4_RFAL_ERR_SEND = 17 , NFC4_RFAL_ERR_IGNORE = 18 , NFC4_RFAL_ERR_SEMANTIC = 19 ,
  NFC4_RFAL_ERR_SYNTAX = 20 , NFC4_RFAL_ERR_CRC = 21 , NFC4_RFAL_ERR_NOTFOUND = 22 , NFC4_RFAL_ERR_NOTUNIQUE = 23 ,
  NFC4_RFAL_ERR_NOTSUPP = 24 , NFC4_RFAL_ERR_WRITE = 25 , NFC4_RFAL_ERR_FIFO = 26 , NFC4_RFAL_ERR_PAR = 27 ,
  NFC4_RFAL_ERR_DONE = 28 , NFC4_RFAL_ERR_RF_COLLISION = 29 , NFC4_RFAL_ERR_HW_OVERRUN = 30 , NFC4_RFAL_ERR_RELEASE_REQ = 31 ,
  NFC4_RFAL_ERR_SLEEP_REQ = 32 , NFC4_RFAL_ERR_WRONG_STATE = 33 , NFC4_RFAL_ERR_MAX_RERUNS = 34 , NFC4_RFAL_ERR_DISABLED = 35 ,
  NFC4_RFAL_ERR_HW_MISMATCH = 36 , NFC4_RFAL_ERR_LINK_LOSS = 37 , NFC4_RFAL_ERR_INVALID_HANDLE = 38 , NFC4_RFAL_ERR_INCOMPLETE_BYTE = 40 ,
  NFC4_RFAL_ERR_INCOMPLETE_BYTE_01 = 41 , NFC4_RFAL_ERR_INCOMPLETE_BYTE_02 = 42 , NFC4_RFAL_ERR_INCOMPLETE_BYTE_03 = 43 , NFC4_RFAL_ERR_INCOMPLETE_BYTE_04 = 44 ,
  NFC4_RFAL_ERR_INCOMPLETE_BYTE_05 = 45 , NFC4_RFAL_ERR_INCOMPLETE_BYTE_06 = 46 , NFC4_RFAL_ERR_INCOMPLETE_BYTE_07 = 47
}
 NFC 4 Click RFAL library return value data. More...
 
enum  nfc4_tx_rx_flags_value_t {
  NFC4_TXRX_FLAGS_CRC_TX_AUTO = ( 0U << 0 ) , NFC4_TXRX_FLAGS_CRC_TX_MANUAL = ( 1U << 0 ) , NFC4_TXRX_FLAGS_CRC_RX_KEEP = ( 1U << 1 ) , NFC4_TXRX_FLAGS_CRC_RX_REMV = ( 0U << 1 ) ,
  NFC4_TXRX_FLAGS_NFCIP1_ON = ( 1U << 2 ) , NFC4_TXRX_FLAGS_NFCIP1_OFF = ( 0U << 2 ) , NFC4_TXRX_FLAGS_AGC_OFF = ( 1U << 3 ) , NFC4_TXRX_FLAGS_AGC_ON = ( 0U << 3 ) ,
  NFC4_TXRX_FLAGS_PAR_RX_KEEP = ( 1U << 4 ) , NFC4_TXRX_FLAGS_PAR_RX_REMV = ( 0U << 0 ) , NFC4_TXRX_FLAGS_PAR_TX_NONE = ( 1U << 5 ) , NFC4_TXRX_FLAGS_PAR_TX_AUTO = ( 0U << 5 ) ,
  NFC4_TXRX_FLAGS_NFCV_FLAG_MANUAL = ( 1U << 6 ) , NFC4_TXRX_FLAGS_NFCV_FLAG_AUTO = ( 0U << 6 )
}
 NFC 4 Click TXRX flags values. More...
 
enum  nfc4_rfal_14443a_short_frame_cmd_t { NFC4_14443A_SHORTFRAME_CMD_WUPA = 0x52 , NFC4_14443A_SHORTFRAME_CMD_REQA = 0x26 }
 NFC 4 Click RFAL ISO 14443A Short Frame Command values. More...
 
enum  nfc4_nfca_sel_value_t { NFC4_NFCA_SEL_CASCADE_L1 = 0 , NFC4_NFCA_SEL_CASCADE_L2 = 1 , NFC4_NFCA_SEL_CASCADE_L3 = 2 }
 NFC 4 Click SDD_REQ (Select) Cascade Levels values. More...
 
enum  nfc4_nfca_cmd_value_t { NFC4_NFCA_CMD_SEL_CL1 = 0x93 , NFC4_NFCA_CMD_SEL_CL2 = 0x95 , NFC4_NFCA_CMD_SEL_CL3 = 0x97 }
 NFC 4 Click SDD_REQ (Select) request Cascade Level command values. More...
 

Functions

void nfc4_cfg_setup (nfc4_cfg_t *cfg)
 NFC 4 configuration object setup function.
 
void nfc4_drv_interface_selection (nfc4_cfg_t *cfg, nfc4_drv_t drv_sel)
 NFC 4 driver interface setup function.
 
err_t nfc4_init (nfc4_t *ctx, nfc4_cfg_t *cfg)
 NFC 4 initialization function.
 
err_t nfc4_default_cfg (nfc4_t *ctx)
 NFC 4 default configuration function.
 
err_t nfc4_generic_write (nfc4_t *ctx, uint8_t reg, uint8_t *data_in, uint16_t len)
 NFC 4 data writing function.
 
err_t nfc4_generic_read (nfc4_t *ctx, uint8_t reg, uint8_t *data_out, uint16_t len)
 NFC 4 data reading function.
 
err_t nfc4_send_direct_command (nfc4_t *ctx, uint8_t cmd)
 NFC 4 send direct command function.
 
err_t nfc4_send_direct_command_with_result (nfc4_t *ctx, uint8_t cmd, uint8_t result_reg, uint32_t timeout, uint8_t *result)
 NFC 4 send direct command with result function.
 
err_t nfc4_write_register (nfc4_t *ctx, uint8_t reg, uint8_t data_in)
 NFC 4 write register function.
 
err_t nfc4_read_register (nfc4_t *ctx, uint8_t reg, uint8_t *data_out)
 NFC 4 read register function.
 
err_t nfc4_write_multiple_registers (nfc4_t *ctx, uint8_t reg, uint8_t *data_in, uint16_t len)
 NFC 4 write multiple registers function.
 
err_t nfc4_read_multiple_registers (nfc4_t *ctx, uint8_t reg, uint8_t *data_out, uint16_t len)
 NFC 4 read multiple registers function.
 
err_t nfc4_clear_register_bits (nfc4_t *ctx, uint8_t reg, uint8_t clr_mask)
 NFC 4 clear register bits function.
 
err_t nfc4_set_register_bits (nfc4_t *ctx, uint8_t reg, uint8_t set_mask)
 NFC 4 set register bits function.
 
err_t nfc4_modify_register_bits (nfc4_t *ctx, uint8_t reg, uint8_t clr_mask, uint8_t set_mask)
 NFC 4 modify register bits function.
 
err_t nfc4_write_fifo (nfc4_t *ctx, uint8_t *data_in, uint16_t len)
 NFC 4 write fifo function.
 
err_t nfc4_read_fifo (nfc4_t *ctx, uint8_t *data_out, uint16_t len)
 NFC 4 read fifo function.
 
err_t nfc4_write_test_register (nfc4_t *ctx, uint8_t reg, uint8_t data_in)
 NFC 4 write test register function.
 
err_t nfc4_read_test_register (nfc4_t *ctx, uint8_t reg, uint8_t *data_out)
 NFC 4 read test register function.
 
err_t nfc4_modify_test_register_bits (nfc4_t *ctx, uint8_t reg, uint8_t clr_mask, uint8_t set_mask)
 NFC 4 modify test register bits function.
 
err_t nfc4_enable_interrupt (nfc4_t *ctx, uint32_t mask)
 NFC 4 enable interrupt function.
 
err_t nfc4_disable_interrupt (nfc4_t *ctx, uint32_t mask)
 NFC 4 disable interrupt function.
 
err_t nfc4_clear_interrupts (nfc4_t *ctx)
 NFC 4 clear interrupts function.
 
err_t nfc4_check_for_received_interrupts (nfc4_t *ctx)
 NFC 4 check for received interrupts function.
 
uint32_t nfc4_wait_for_interrupt (nfc4_t *ctx, uint32_t mask, uint32_t timeout)
 NFC 4 wait for interrupt function.
 
uint32_t nfc4_get_interrupt (nfc4_t *ctx, uint32_t mask)
 NFC 4 get interrupt function.
 
err_t nfc4_check_chip_id (nfc4_t *ctx, uint8_t *revision)
 NFC 4 check chip ID function.
 
err_t nfc4_enable_osc (nfc4_t *ctx)
 NFC 4 enable oscillator and regulator function.
 
err_t nfc4_measure_voltage (nfc4_t *ctx, uint8_t mpsv_src, uint16_t *res_mv)
 NFC 4 measure voltage function.
 
uint8_t nfc4_get_irq_pin (nfc4_t *ctx)
 NFC 4 get irq pin function.
 
err_t nfc4_get_mifare_tag_uid (nfc4_t *ctx, uint8_t *uid, uint8_t *uid_len)
 NFC 4 get mifare tag UID function.
 

Detailed Description

This file contains API for NFC 4 Click Driver.

Typedef Documentation

◆ nfc4_master_io_t

typedef err_t(* nfc4_master_io_t) (struct nfc4_s *, uint8_t, uint8_t *, uint16_t)

NFC 4 Click driver interface.

Definition of driver interface of NFC 4 Click driver. Driver serial interface.

◆ nfc4_t

typedef struct nfc4_s nfc4_t

NFC 4 Click context object.

Context object definition of NFC 4 Click driver.

Enumeration Type Documentation

◆ nfc4_col_res_state_t

NFC 4 Click Colission Resolution states enum.

Predefined enum values for Colission Resolution states.

Enumerator
NFC4_NFCA_CR_CL 

New Cascading Level state.

NFC4_NFCA_CR_SDD 

Perform anticollsion state.

NFC4_NFCA_CR_SEL 

Perform CL Selection state.

NFC4_NFCA_CR_DONE 

Collision Resolution done state.

◆ nfc4_drv_t

enum nfc4_drv_t

NFC 4 Click driver selector.

Selects target driver interface of NFC 4 Click driver.

Enumerator
NFC4_DRV_SEL_SPI 

SPI driver descriptor.

NFC4_DRV_SEL_I2C 

I2C driver descriptor.

◆ nfc4_nfca_cmd_value_t

NFC 4 Click SDD_REQ (Select) request Cascade Level command values.

Predefined enum values for SDD_REQ (Select) request Cascade Level command Digital 1.1 Table 15.

Enumerator
NFC4_NFCA_CMD_SEL_CL1 

SDD_REQ command Cascade Level 1.

NFC4_NFCA_CMD_SEL_CL2 

SDD_REQ command Cascade Level 2.

NFC4_NFCA_CMD_SEL_CL3 

SDD_REQ command Cascade Level 3.

◆ nfc4_nfca_sel_value_t

NFC 4 Click SDD_REQ (Select) Cascade Levels values.

Predefined enum values for SDD_REQ (Select) Cascade Levels.

Enumerator
NFC4_NFCA_SEL_CASCADE_L1 

SDD_REQ Cascade Level 1.

NFC4_NFCA_SEL_CASCADE_L2 

SDD_REQ Cascade Level 2.

NFC4_NFCA_SEL_CASCADE_L3 

SDD_REQ Cascade Level 3.

◆ nfc4_return_value_t

NFC 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
NFC4_OK 
NFC4_ERROR 

◆ nfc4_rfal_14443a_short_frame_cmd_t

NFC 4 Click RFAL ISO 14443A Short Frame Command values.

Predefined enum values for RFAL ISO 14443A Short Frame Command.

Enumerator
NFC4_14443A_SHORTFRAME_CMD_WUPA 

ISO14443A WUPA / NFC-A ALL_REQ.

NFC4_14443A_SHORTFRAME_CMD_REQA 

ISO14443A REQA / NFC-A SENS_REQ.

◆ nfc4_rfal_nfc_state_t

NFC 4 Click RFAL NFC state enum.

Predefined enum valus for RFAL NFC main state.

Enumerator
NFC4_NFC_STATE_NOTINIT 

Not Initialized state.

NFC4_NFC_STATE_IDLE 

Initialize state.

NFC4_NFC_STATE_START_DISCOVERY 

Start Discovery loop state.

NFC4_NFC_STATE_POLL_COLAVOIDANCE 

Collision Avoidance state.

NFC4_NFC_STATE_POLL_ACTIVATION 

Activation state.

NFC4_NFC_STATE_ACTIVATED 

Activated state.

NFC4_NFC_STATE_DEACTIVATION 

Deactivation state.

◆ nfc4_rfal_return_value_t

NFC 4 Click RFAL library return value data.

Predefined enum values for RFAL library return values.

Enumerator
NFC4_RFAL_ERR_NONE 

no error occurred.

NFC4_RFAL_ERR_NOMEM 

not enough memory to perform the requested operation.

NFC4_RFAL_ERR_BUSY 

device or resource busy.

NFC4_RFAL_ERR_IO 

generic IO error.

NFC4_RFAL_ERR_TIMEOUT 

error due to timeout.

NFC4_RFAL_ERR_REQUEST 

invalid request or requested function can't be executed at the moment.

NFC4_RFAL_ERR_NOMSG 

No message of desired type.

NFC4_RFAL_ERR_PARAM 

Parameter error.

NFC4_RFAL_ERR_SYSTEM 

System error.

NFC4_RFAL_ERR_FRAMING 

Framing error.

NFC4_RFAL_ERR_OVERRUN 

lost one or more received bytes.

NFC4_RFAL_ERR_PROTO 

protocol error.

NFC4_RFAL_ERR_INTERNAL 

Internal Error.

NFC4_RFAL_ERR_AGAIN 

Call again.

NFC4_RFAL_ERR_MEM_CORRUPT 

memory corruption.

NFC4_RFAL_ERR_NOT_IMPLEMENTED 

not implemented.

NFC4_RFAL_ERR_PC_CORRUPT 

Program Counter has been manipulated or spike/noise trigger illegal operation.

NFC4_RFAL_ERR_SEND 

error sending.

NFC4_RFAL_ERR_IGNORE 

indicates error detected but to be ignored.

NFC4_RFAL_ERR_SEMANTIC 

indicates error in state machine (unexpected cmd).

NFC4_RFAL_ERR_SYNTAX 

indicates error in state machine (unknown cmd).

NFC4_RFAL_ERR_CRC 

crc error.

NFC4_RFAL_ERR_NOTFOUND 

transponder not found.

NFC4_RFAL_ERR_NOTUNIQUE 

transponder not unique - more than one transponder in field.

NFC4_RFAL_ERR_NOTSUPP 

requested operation not supported.

NFC4_RFAL_ERR_WRITE 

write error.

NFC4_RFAL_ERR_FIFO 

fifo over or underflow error.

NFC4_RFAL_ERR_PAR 

parity error.

NFC4_RFAL_ERR_DONE 

transfer has already finished.

NFC4_RFAL_ERR_RF_COLLISION 

collision error (Bit Collision or during RF Collision avoidance ).

NFC4_RFAL_ERR_HW_OVERRUN 

lost one or more received bytes.

NFC4_RFAL_ERR_RELEASE_REQ 

device requested release.

NFC4_RFAL_ERR_SLEEP_REQ 

device requested sleep.

NFC4_RFAL_ERR_WRONG_STATE 

incorrent state for requested operation.

NFC4_RFAL_ERR_MAX_RERUNS 

blocking procedure reached maximum runs.

NFC4_RFAL_ERR_DISABLED 

operation aborted due to disabled configuration.

NFC4_RFAL_ERR_HW_MISMATCH 

expected hw do not match.

NFC4_RFAL_ERR_LINK_LOSS 

Other device's field didn't behave as expected: turned off by Initiator in Passive mode, or AP2P did not turn on field.

NFC4_RFAL_ERR_INVALID_HANDLE 

invalid or not initalized device handle.

NFC4_RFAL_ERR_INCOMPLETE_BYTE 

Incomplete byte rcvd.

NFC4_RFAL_ERR_INCOMPLETE_BYTE_01 

Incomplete byte rcvd - 1 bit.

NFC4_RFAL_ERR_INCOMPLETE_BYTE_02 

Incomplete byte rcvd - 2 bit.

NFC4_RFAL_ERR_INCOMPLETE_BYTE_03 

Incomplete byte rcvd - 3 bit.

NFC4_RFAL_ERR_INCOMPLETE_BYTE_04 

Incomplete byte rcvd - 4 bit.

NFC4_RFAL_ERR_INCOMPLETE_BYTE_05 

Incomplete byte rcvd - 5 bit.

NFC4_RFAL_ERR_INCOMPLETE_BYTE_06 

Incomplete byte rcvd - 6 bit.

NFC4_RFAL_ERR_INCOMPLETE_BYTE_07 

Incomplete byte rcvd - 7 bit.

◆ nfc4_rfal_transceive_state_t

NFC 4 Click rfal transceive states enum.

Predefined enum values for RFAL transceive states.

Enumerator
NFC4_TXRX_STATE_IDLE 
NFC4_TXRX_STATE_INIT 
NFC4_TXRX_STATE_START 
NFC4_TXRX_STATE_TX_IDLE 
NFC4_TXRX_STATE_TX_WAIT_GT 
NFC4_TXRX_STATE_TX_WAIT_FDT 
NFC4_TXRX_STATE_TX_TRANSMIT 
NFC4_TXRX_STATE_TX_WAIT_WL 
NFC4_TXRX_STATE_TX_RELOAD_FIFO 
NFC4_TXRX_STATE_TX_WAIT_TXE 
NFC4_TXRX_STATE_TX_DONE 
NFC4_TXRX_STATE_TX_FAIL 
NFC4_TXRX_STATE_RX_IDLE 
NFC4_TXRX_STATE_RX_WAIT_EON 
NFC4_TXRX_STATE_RX_WAIT_RXS 
NFC4_TXRX_STATE_RX_WAIT_RXE 
NFC4_TXRX_STATE_RX_READ_FIFO 
NFC4_TXRX_STATE_RX_ERR_CHECK 
NFC4_TXRX_STATE_RX_READ_DATA 
NFC4_TXRX_STATE_RX_WAIT_EOF 
NFC4_TXRX_STATE_RX_DONE 
NFC4_TXRX_STATE_RX_FAIL 

◆ nfc4_tx_rx_flags_value_t

NFC 4 Click TXRX flags values.

Predefined enum values for TXRX flags.

Enumerator
NFC4_TXRX_FLAGS_CRC_TX_AUTO 

CRC will be generated automatic upon transmission.

NFC4_TXRX_FLAGS_CRC_TX_MANUAL 

CRC was calculated manually, included in txBuffer.

NFC4_TXRX_FLAGS_CRC_RX_KEEP 

Upon Reception keep the CRC in rxBuffer (reflected on rcvd length).

NFC4_TXRX_FLAGS_CRC_RX_REMV 

Enable CRC check and remove the CRC from rxBuffer.

NFC4_TXRX_FLAGS_NFCIP1_ON 

Enable NFCIP1 mode: Add SB(F0) and LEN bytes during Tx and skip SB(F0) byte during Rx.

NFC4_TXRX_FLAGS_NFCIP1_OFF 

Disable NFCIP1 mode: do not append protocol bytes while Tx nor skip while Rx.

NFC4_TXRX_FLAGS_AGC_OFF 

Disable Automatic Gain Control, improving multiple devices collision detection.

NFC4_TXRX_FLAGS_AGC_ON 

Enable Automatic Gain Control, improving single device reception.

NFC4_TXRX_FLAGS_PAR_RX_KEEP 

Disable Parity and CRC check and keep the Parity and CRC bits in the received buffer.

NFC4_TXRX_FLAGS_PAR_RX_REMV 

Enable Parity check and remove the parity bits from the received buffer.

NFC4_TXRX_FLAGS_PAR_TX_NONE 

Disable automatic Parity generation (ISO14443A) and use the one provided in the buffer.

NFC4_TXRX_FLAGS_PAR_TX_AUTO 

Enable automatic Parity generation (ISO14443A).

NFC4_TXRX_FLAGS_NFCV_FLAG_MANUAL 

Disable automatic adaption of flag byte (ISO15693) according to current comm params.

NFC4_TXRX_FLAGS_NFCV_FLAG_AUTO 

Enable automatic adaption of flag byte (ISO115693) according to current comm params.