nfcextend 2.0.0.0
nfcextend.h File Reference

This file contains API for NFC Extend 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  nfcextend_block_t
 I2C communication block object definition. More...
 
struct  nfcextend_t
 Click ctx object definition. More...
 
struct  nfcextend_cfg_t
 Click configuration structure definition. More...
 

Macros

#define NFCEXTEND_MAP_MIKROBUS(cfg, mikrobus)
 
#define NFCEXTEND_RETVAL   uint8_t
 
#define NFCEXTEND_OK   0x00
 
#define NFCEXTEND_INIT_ERROR   0xFF
 
#define NFCEXTEND_I2C_SLAVE_ADDRESS   0x53
 
#define NFCEXTEND_MEMORY_USER   0x01
 
#define NFCEXTEND_MEMORY_DYNAMIC   0x02
 
#define NFCEXTEND_MEMORY_MAILBOX   0x03
 
#define NFCEXTEND_MEMORY_SYSTEM   0x04
 
#define NFCEXTEND_SYSTEM_REG_GPO   0x0000
 
#define NFCEXTEND_SYSTEM_REG_IT_TIME   0x0001
 
#define NFCEXTEND_SYSTEM_REG_EH_MODE   0x0002
 
#define NFCEXTEND_SYSTEM_REG_RF_MNGT   0x0003
 
#define NFCEXTEND_SYSTEM_REG_RFA1SS   0x0004
 
#define NFCEXTEND_SYSTEM_REG_ENDA1   0x0005
 
#define NFCEXTEND_SYSTEM_REG_RFA2SS   0x0006
 
#define NFCEXTEND_SYSTEM_REG_ENDA2   0x0007
 
#define NFCEXTEND_SYSTEM_REG_RFA3SS   0x0008
 
#define NFCEXTEND_SYSTEM_REG_ENDA3   0x0009
 
#define NFCEXTEND_SYSTEM_REG_RFA4SS   0x000A
 
#define NFCEXTEND_SYSTEM_REG_I2CSS   0x000B
 
#define NFCEXTEND_SYSTEM_REG_LOCK_CCFILE   0x000C
 
#define NFCEXTEND_SYSTEM_REG_MB_MODE   0x000D
 
#define NFCEXTEND_SYSTEM_REG_MB_WDG   0x000E
 
#define NFCEXTEND_SYSTEM_REG_LOCK_CFG   0x000F
 
#define NFCEXTEND_SYSTEM_REG_LOCK_DSFID   0x0010
 
#define NFCEXTEND_SYSTEM_REG_LOCK_AFI   0x0011
 
#define NFCEXTEND_SYSTEM_REG_DSFID   0x0012
 
#define NFCEXTEND_SYSTEM_REG_AFI   0x0013
 
#define NFCEXTEND_SYSTEM_REG_MEM_SIZE_1   0x0014
 
#define NFCEXTEND_SYSTEM_REG_MEM_SIZE_2   0x0015
 
#define NFCEXTEND_SYSTEM_REG_BLK_SIZE   0x0016
 
#define NFCEXTEND_SYSTEM_REG_IC_REF   0x0017
 
#define NFCEXTEND_SYSTEM_REG_UID_1   0x0018
 
#define NFCEXTEND_SYSTEM_REG_UID_2   0x0019
 
#define NFCEXTEND_SYSTEM_REG_UID_3   0x001A
 
#define NFCEXTEND_SYSTEM_REG_UID_4   0x001B
 
#define NFCEXTEND_SYSTEM_REG_UID_5   0x001C
 
#define NFCEXTEND_SYSTEM_REG_UID_6   0x001D
 
#define NFCEXTEND_SYSTEM_REG_UID_7   0x001E
 
#define NFCEXTEND_SYSTEM_REG_UID_8   0x001F
 
#define NFCEXTEND_SYSTEM_REG_IC_REV   0x0020
 
#define NFCEXTEND_SYSTEM_REG_ST_RES_1   0x0021
 
#define NFCEXTEND_SYSTEM_REG_ST_RES_2   0x0022
 
#define NFCEXTEND_SYSTEM_REG_ST_RES_3   0x0023
 
#define NFCEXTEND_SYSTEM_REG_I2C_PWD_1   0x0900
 
#define NFCEXTEND_SYSTEM_REG_I2C_PWD_2   0x0901
 
#define NFCEXTEND_SYSTEM_REG_I2C_PWD_3   0x0902
 
#define NFCEXTEND_SYSTEM_REG_I2C_PWD_4   0x0903
 
#define NFCEXTEND_SYSTEM_REG_I2C_PWD_5   0x0904
 
#define NFCEXTEND_SYSTEM_REG_I2C_PWD_6   0x0905
 
#define NFCEXTEND_SYSTEM_REG_I2C_PWD_7   0x0906
 
#define NFCEXTEND_SYSTEM_REG_I2C_PWD_8   0x0907
 
#define NFCEXTEND_DYNAMIC_REG_GPO_CTRL   0x2000
 
#define NFCEXTEND_DYNAMIC_REG_RESERVED_1   0x2001
 
#define NFCEXTEND_DYNAMIC_REG_EH_CTRL   0x2002
 
#define NFCEXTEND_DYNAMIC_REG_RF_MNGT   0x2003
 
#define NFCEXTEND_DYNAMIC_REG_I2C_SSO   0x2004
 
#define NFCEXTEND_DYNAMIC_REG_IT_STS   0x2005
 
#define NFCEXTEND_DYNAMIC_REG_MB_CTRL   0x2006
 
#define NFCEXTEND_DYNAMIC_REG_MB_LEN   0x2007
 
#define NFCEXTEND_MAILBOX_REG_BYTE_0   0x2008
 
#define NFCEXTEND_MAILBOX_DISABLE   0x00
 
#define NFCEXTEND_MAILBOX_ENABLE   0x01
 
#define NFCEXTEND_RF_DISABLE   0x00
 
#define NFCEXTEND_RF_ENABLE   0x01
 
#define NFCEXTEND_PASSWORD_LEN   8
 
#define NFCEXTEND_PASSWORD_BUFFER_SIZE   NFCEXTEND_PASSWORD_LEN * 2 + 1
 

Functions

void nfcextend_cfg_setup (nfcextend_cfg_t *cfg)
 Config Object Initialization function.
 
NFCEXTEND_RETVAL nfcextend_init (nfcextend_t *ctx, nfcextend_cfg_t *cfg)
 Initialization function.
 
uint8_t nfcextend_default_cfg (nfcextend_t *ctx)
 Click Default Configuration function.
 
uint8_t nfcextend_password_present (nfcextend_t *ctx, uint8_t *pass_buf)
 Password present function.
 
uint8_t nfcextend_i2c_set (nfcextend_t *ctx, nfcextend_block_t *block)
 I2C set function.
 
uint8_t nfcextend_i2c_get (nfcextend_t *ctx, nfcextend_block_t *block)
 I2C get function.
 
uint8_t nfcextend_digital_read_int (nfcextend_t *ctx)
 Digital read interrupt.
 

Detailed Description

This file contains API for NFC Extend Click driver.