nfctag4 2.0.0.0
nfctag4.h File Reference

This file contains API for NFC Tag 4 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  nfctag4_t
 Click ctx object definition. More...
 
struct  nfctag4_cfg_t
 Click configuration structure definition. More...
 
struct  transfer_info
 

Macros

#define NFCTAG4_MAP_MIKROBUS(cfg, mikrobus)
 
#define NFCTAG4_RETVAL   uint8_t
 
#define NFCTAG4_OK   0x00
 
#define NFCTAG4_INIT_ERROR   0xFF
 
#define NFCTAG4_DEVICE_ADDRESS   0x53
 
#define NFCTAG4_MEMORY_USER   0x01
 
#define NFCTAG4_MEMORY_DYNAMIC   0x02
 
#define NFCTAG4_MEMORY_MAILBOX   0x03
 
#define NFCTAG4_MEMORY_SYSTEM   0x04
 
#define NFCTAG4_SYSTEM_REG_GPO   0x0000
 
#define NFCTAG4_SYSTEM_REG_IT_TIME   0x0001
 
#define NFCTAG4_SYSTEM_REG_EH_MODE   0x0002
 
#define NFCTAG4_SYSTEM_REG_RF_MNGT   0x0003
 
#define NFCTAG4_SYSTEM_REG_RFA1SS   0x0004
 
#define NFCTAG4_SYSTEM_REG_ENDA1   0x0005
 
#define NFCTAG4_SYSTEM_REG_RFA2SS   0x0006
 
#define NFCTAG4_SYSTEM_REG_ENDA2   0x0007
 
#define NFCTAG4_SYSTEM_REG_RFA3SS   0x0008
 
#define NFCTAG4_SYSTEM_REG_ENDA3   0x0009
 
#define NFCTAG4_SYSTEM_REG_RFA4SS   0x000A
 
#define NFCTAG4_SYSTEM_REG_I2CSS   0x000B
 
#define NFCTAG4_SYSTEM_REG_LOCK_CCFILE   0x000C
 
#define NFCTAG4_SYSTEM_REG_MB_MODE   0x000D
 
#define NFCTAG4_SYSTEM_REG_MB_WDG   0x000E
 
#define NFCTAG4_SYSTEM_REG_LOCK_CFG   0x000F
 
#define NFCTAG4_SYSTEM_REG_LOCK_DSFID   0x0010
 
#define NFCTAG4_SYSTEM_REG_LOCK_AFI   0x0011
 
#define NFCTAG4_SYSTEM_REG_DSFID   0x0012
 
#define NFCTAG4_SYSTEM_REG_AFI   0x0013
 
#define NFCTAG4_SYSTEM_REG_MEM_SIZE_1   0x0014
 
#define NFCTAG4_SYSTEM_REG_MEM_SIZE_2   0x0015
 
#define NFCTAG4_SYSTEM_REG_BLK_SIZE   0x0016
 
#define NFCTAG4_SYSTEM_REG_IC_REF   0x0017
 
#define NFCTAG4_SYSTEM_REG_UID_1   0x0018
 
#define NFCTAG4_SYSTEM_REG_UID_2   0x0019
 
#define NFCTAG4_SYSTEM_REG_UID_3   0x001A
 
#define NFCTAG4_SYSTEM_REG_UID_4   0x001B
 
#define NFCTAG4_SYSTEM_REG_UID_5   0x001C
 
#define NFCTAG4_SYSTEM_REG_UID_6   0x001D
 
#define NFCTAG4_SYSTEM_REG_UID_7   0x001E
 
#define NFCTAG4_SYSTEM_REG_UID_8   0x001F
 
#define NFCTAG4_SYSTEM_REG_IC_REV   0x0020
 
#define NFCTAG4_SYSTEM_REG_ST_RES_1   0x0021
 
#define NFCTAG4_SYSTEM_REG_ST_RES_2   0x0022
 
#define NFCTAG4_SYSTEM_REG_ST_RES_3   0x0023
 
#define NFCTAG4_SYSTEM_REG_I2C_PWD_1   0x0900
 
#define NFCTAG4_SYSTEM_REG_I2C_PWD_2   0x0901
 
#define NFCTAG4_SYSTEM_REG_I2C_PWD_3   0x0902
 
#define NFCTAG4_SYSTEM_REG_I2C_PWD_4   0x0903
 
#define NFCTAG4_SYSTEM_REG_I2C_PWD_5   0x0904
 
#define NFCTAG4_SYSTEM_REG_I2C_PWD_6   0x0905
 
#define NFCTAG4_SYSTEM_REG_I2C_PWD_7   0x0906
 
#define NFCTAG4_SYSTEM_REG_I2C_PWD_8   0x0907
 
#define NFCTAG4_DYNAMIC_REG_GPO_CTRL   0x2000
 
#define NFCTAG4_DYNAMIC_REG_RESERVED_1   0x2001
 
#define NFCTAG4_DYNAMIC_REG_EH_CTRL   0x2002
 
#define NFCTAG4_DYNAMIC_REG_RF_MNGT   0x2003
 
#define NFCTAG4_DYNAMIC_REG_I2C_SSO   0x2004
 
#define NFCTAG4_DYNAMIC_REG_IT_STS   0x2005
 
#define NFCTAG4_DYNAMIC_REG_MB_CTRL   0x2006
 
#define NFCTAG4_DYNAMIC_REG_MB_LEN   0x2007
 
#define NFCTAG4_MAILBOX_REG_BYTE_0   0x2008
 
#define NFCTAG4_MAILBOX_DISABLE   0x00
 
#define NFCTAG4_MAILBOX_ENABLE   0x01
 
#define NFCTAG4_RF_DISABLE   0x00
 
#define NFCTAG4_RF_ENABLE   0x01
 

Functions

void nfctag4_cfg_setup (nfctag4_cfg_t *cfg)
 Config Object Initialization function.
 
NFCTAG4_RETVAL nfctag4_init (nfctag4_t *ctx, nfctag4_cfg_t *cfg)
 Initialization function.
 
void nfctag4_default_cfg (nfctag4_t *ctx)
 Click Default Configuration function.
 
uint8_t nfctag4_int_get (nfctag4_t *ctx)
 Getting INT pin state.
 
uint8_t nfctag4_i2c_get (nfctag4_t *ctx, transfer_info *dev, uint8_t *register_buffer)
 Getting registers via I2C.
 
uint8_t nfctag4_i2c_set (nfctag4_t *ctx, transfer_info *dev, uint8_t *register_buffer)
 Setting registers via I2C.
 
uint8_t nfctag4_password_present (nfctag4_t *ctx, uint8_t *password_bytes)
 Presenting password to device.
 
uint8_t nfctag4_password_write (nfctag4_t *ctx, uint8_t *password_bytes)
 Writing password to device.
 
uint8_t nfctag4_enable_mailbox (nfctag4_t *ctx, uint8_t enable_mailbox)
 Enabling or disabling mailbox.
 
uint8_t nfctag4_enable_rf (nfctag4_t *ctx, uint8_t enable_rf)
 Enabling or disabling RF.
 

Detailed Description

This file contains API for NFC Tag 4 Click driver.