Remove unused macros

Test: boots, NFC enable/disable
Change-Id: I18fe458d016856fd1d883b6fd927d81edb7efa14
diff --git a/src/gki/common/gki.h b/src/gki/common/gki.h
index f3cfa56..4eaf500 100644
--- a/src/gki/common/gki.h
+++ b/src/gki/common/gki.h
@@ -42,9 +42,7 @@
 ** send buffers to the task.
 */
 #define TASK_MBOX_0 0
-#define TASK_MBOX_1 1
 #define TASK_MBOX_2 2
-#define TASK_MBOX_3 3
 
 #define NUM_TASK_MBOX 4
 
@@ -55,7 +53,6 @@
 ** There are 4 reserved events used to signal timeout events.
 ** There are 8 general purpose events available for applications.
 */
-#define MAX_EVENTS 16
 
 #define TASK_MBOX_0_EVT_MASK 0x0001
 #define TASK_MBOX_1_EVT_MASK 0x0002
@@ -73,12 +70,6 @@
 #define TIMER_3_EVT_MASK 0x0080
 
 #define APPL_EVT_0 8
-#define APPL_EVT_1 9
-#define APPL_EVT_2 10
-#define APPL_EVT_3 11
-#define APPL_EVT_4 12
-#define APPL_EVT_5 13
-#define APPL_EVT_6 14
 #define APPL_EVT_7 15
 
 #define EVENT_MASK(evt) ((uint16_t)(0x0001 << (evt)))
@@ -334,8 +325,6 @@
   uint16_t count;
 } BUFFER_Q;
 
-#define GKI_IS_QUEUE_EMPTY(p_q) ((p_q)->count == 0)
-
 /* Task constants
 */
 #ifndef TASKPTR
@@ -343,7 +332,6 @@
 #endif
 
 /* General pool accessible to GKI_getbuf() */
-#define GKI_PUBLIC_POOL 0
 #define GKI_RESTRICTED_POOL 1 /* Inaccessible pool to GKI_getbuf() */
 
 /***********************************************************************
diff --git a/src/gki/common/gki_common.h b/src/gki/common/gki_common.h
index 567cfe8..ba9f8c5 100644
--- a/src/gki/common/gki_common.h
+++ b/src/gki/common/gki_common.h
@@ -23,9 +23,6 @@
 /* Task States: (For OSRdyTbl) */
 #define TASK_DEAD 0    /* b0000 */
 #define TASK_READY 1   /* b0001 */
-#define TASK_WAIT 2    /* b0010 */
-#define TASK_DELAY 4   /* b0100 */
-#define TASK_SUSPEND 8 /* b1000 */
 
 /********************************************************************
 **  Internal Error codes
@@ -40,14 +37,12 @@
 #define GKI_ERROR_DELETE_POOL_BAD_QID 0xFFF8
 #define GKI_ERROR_BUF_SIZE_TOOBIG 0xFFF7
 #define GKI_ERROR_BUF_SIZE_ZERO 0xFFF6
-#define GKI_ERROR_ADDR_NOT_IN_BUF 0xFFF5
 
 /********************************************************************
 **  Misc constants
 *********************************************************************/
 
 #define GKI_MAX_INT32 (0x7fffffffL)
-#define GKI_MAX_TIMESTAMP (0xffffffffL)
 
 /********************************************************************
 **  Buffer Management Data Structures
diff --git a/src/gki/common/gki_inet.h b/src/gki/common/gki_inet.h
index 079dfe3..720f17f 100644
--- a/src/gki/common/gki_inet.h
+++ b/src/gki/common/gki_inet.h
@@ -20,12 +20,6 @@
 
 #include "data_types.h"
 
-#define htons ntohs
-#define htonl ntohl
-
-#define htonets nettohs
-#define htonetl nettohl
-
 #if (BIG_ENDIAN == TRUE)
 #define ntohs(n) (n)
 #define ntohl(n) (n)
diff --git a/src/gki/ulinux/data_types.h b/src/gki/ulinux/data_types.h
index 892b798..5e97d54 100644
--- a/src/gki/ulinux/data_types.h
+++ b/src/gki/ulinux/data_types.h
@@ -49,7 +49,4 @@
 #define BIG_ENDIAN FALSE
 #endif
 
-#define UINT16_LOW_BYTE(x) ((x)&0xff)
-#define UINT16_HI_BYTE(x) ((x) >> 8)
-
 #endif
diff --git a/src/gki/ulinux/gki_ulinux.cc b/src/gki/ulinux/gki_ulinux.cc
index 724949c..3f2346b 100644
--- a/src/gki/ulinux/gki_ulinux.cc
+++ b/src/gki/ulinux/gki_ulinux.cc
@@ -48,10 +48,6 @@
 #define LINUX_SEC (1000 / TICKS_PER_SEC)
 // #define GKI_TICK_TIMER_DEBUG
 
-#define LOCK(m) pthread_mutex_lock(&(m))
-#define UNLOCK(m) pthread_mutex_unlock(&(m))
-#define INIT(m) pthread_mutex_init(&(m), NULL)
-
 /* this kind of mutex go into tGKI_OS control block!!!! */
 /* static pthread_mutex_t GKI_sched_mutex; */
 /*static pthread_mutex_t thread_delay_mutex;
diff --git a/src/include/bt_types.h b/src/include/bt_types.h
index b147756..0617251 100644
--- a/src/include/bt_types.h
+++ b/src/include/bt_types.h
@@ -26,42 +26,14 @@
 #define SCR_PROTO_TRACE_ALL 0x001fffff
 #define SCR_PROTO_TRACE_HCI_SUMMARY 0x00000001
 
-#define TRACE_LAYER_NONE 0x00000000
-#define TRACE_LAYER_HCI 0x00070000
-#define TRACE_LAYER_GKI 0x001a0000
-#define TRACE_LAYER_NFC 0x00270000
-/*it's overwritten in nfc_types.h*/
-#define TRACE_LAYER_NCI 0x00280000
-#define TRACE_LAYER_LLCP 0x00290000
-#define TRACE_LAYER_NDEF 0x002a0000
-#define TRACE_LAYER_RW 0x002b0000
-#define TRACE_LAYER_CE 0x002c0000
-#define TRACE_LAYER_P2P 0x002d0000
-#define TRACE_LAYER_NFA 0x00300000
-/*it's overwritten in nfc_types.h*/
-#define TRACE_LAYER_HAL 0x00310000
-#define TRACE_LAYER_MAX_NUM 0x0032
-
 /* NCI Command, Notification or Data*/
 #define BT_EVT_TO_NFC_NCI 0x4000
-#define BT_EVT_TO_NFC_NCI_VS 0x4200 /* Vendor specific message */
 /* messages between NFC and NCI task */
 #define BT_EVT_TO_NFC_MSGS 0x4300
 
 /* start timer */
 #define BT_EVT_TO_START_TIMER 0x3c00
 
-/* stop timer */
-#define BT_EVT_TO_STOP_TIMER 0x3d00
-
 /* start quick timer */
 #define BT_EVT_TO_START_QUICK_TIMER 0x3e00
-
-#define TRACE_ORG_APPL 0x00000500
-
-#define DEV_CLASS_LEN 3
-typedef uint8_t DEV_CLASS[DEV_CLASS_LEN]; /* Device class */
-
-#define BD_ADDR_LEN 6                 /* Device address length */
-typedef uint8_t BD_ADDR[BD_ADDR_LEN]; /* Device address */
 #endif
diff --git a/src/include/buildcfg.h b/src/include/buildcfg.h
index 52597fe..87bfc4c 100644
--- a/src/include/buildcfg.h
+++ b/src/include/buildcfg.h
@@ -26,10 +26,6 @@
 #define NFC_CONTORLLER_ID (1)
 #endif
 
-#define BTE_APPL_MAX_USERIAL_DEV_NAME (256)
-
-#define TRACE_TASK_INCLUDED TRUE
-
 #define GKI_BUF1_MAX 0
 // 2 is in use
 #define GKI_BUF3_MAX 30
@@ -46,7 +42,6 @@
 #define GKI_BUF0_SIZE 268
 #define GKI_BUF0_MAX 40
 
-#define NCI_BUF_POOL_ID GKI_POOL_ID_0
 #define GKI_NUM_FIXED_BUF_POOLS 4
 
 extern uint8_t* scru_dump_hex(uint8_t* p, char* p_title, uint32_t len,
@@ -59,7 +54,6 @@
 void ProtoDispAdapterDisplayNciPacket(uint8_t* nciPacket, uint16_t nciPacketLen,
                                       bool is_recv);
 #define DISP_NCI ProtoDispAdapterDisplayNciPacket
-#define LOGMSG_TAG_NAME "BrcmNfcNfa"
 
 #ifndef _TIMEB
 #define _TIMEB
@@ -72,5 +66,4 @@
 void _ftime(struct _timeb*);
 
 #endif
-
 #endif
diff --git a/src/include/config.h b/src/include/config.h
index ff5d705..59a804b 100644
--- a/src/include/config.h
+++ b/src/include/config.h
@@ -22,75 +22,24 @@
 int GetNumValue(const char* name, void* p_value, unsigned long len);
 
 #define NAME_POLLING_TECH_MASK "POLLING_TECH_MASK"
-#define NAME_REGISTER_VIRTUAL_SE "REGISTER_VIRTUAL_SE"
 #define NAME_APPL_TRACE_LEVEL "APPL_TRACE_LEVEL"
 #define NAME_USE_RAW_NCI_TRACE "USE_RAW_NCI_TRACE"
-#define NAME_LOGCAT_FILTER "LOGCAT_FILTER"
-#define NAME_LPTD_CFG "LPTD_CFG"
-#define NAME_SCREEN_OFF_POWER_STATE "SCREEN_OFF_POWER_STATE"
-#define NAME_PREINIT_DSP_CFG "PREINIT_DSP_CFG"
-#define NAME_DTA_START_CFG "DTA_START_CFG"
-#define NAME_TRANSPORT_DRIVER "TRANSPORT_DRIVER"
-#define NAME_POWER_CONTROL_DRIVER "POWER_CONTROL_DRIVER"
 #define NAME_PROTOCOL_TRACE_LEVEL "PROTOCOL_TRACE_LEVEL"
-#define NAME_UART_PORT "UART_PORT"
-#define NAME_UART_BAUD "UART_BAUD"
-#define NAME_UART_PARITY "UART_PARITY"
-#define NAME_UART_STOPBITS "UART_STOPBITS"
-#define NAME_UART_DATABITS "UART_DATABITS"
-#define NAME_CLIENT_ADDRESS "BCMI2CNFC_ADDRESS"
-#define NAME_NFA_DM_START_UP_CFG "NFA_DM_START_UP_CFG"
 #define NAME_NFA_DM_CFG "NFA_DM_CFG"
-#define NAME_NFA_DM_LP_CFG "NFA_DM_LP_CFG"
-#define NAME_LOW_SPEED_TRANSPORT "LOW_SPEED_TRANSPORT"
-#define NAME_NFC_WAKE_DELAY "NFC_WAKE_DELAY"
-#define NAME_NFC_WRITE_DELAY "NFC_WRITE_DELAY"
-#define NAME_PERF_MEASURE_FREQ "REPORT_PERFORMANCE_MEASURE"
-#define NAME_READ_MULTI_PACKETS "READ_MULTIPLE_PACKETS"
-#define NAME_POWER_ON_DELAY "POWER_ON_DELAY"
-#define NAME_PRE_POWER_OFF_DELAY "PRE_POWER_OFF_DELAY"
-#define NAME_POST_POWER_OFF_DELAY "POST_POWER_OFF_DELAY"
-#define NAME_APPL_DTA_MODE "APPL_DTA_MODE"
-#define NAME_CE3_PRE_POWER_OFF_DELAY "CE3_PRE_POWER_OFF_DELAY"
+#define NAME_SCREEN_OFF_POWER_STATE "SCREEN_OFF_POWER_STATE"
 #define NAME_NFA_STORAGE "NFA_STORAGE"
-#define NAME_NFA_DM_START_UP_VSC_CFG "NFA_DM_START_UP_VSC_CFG"
-#define NAME_NFA_DTA_START_UP_VSC_CFG "NFA_DTA_START_UP_VSC_CFG"
 #define NAME_UICC_LISTEN_TECH_MASK "UICC_LISTEN_TECH_MASK"
-#define NAME_UICC_LISTEN_TECH_EX_MASK "UICC_LISTEN_TECH_EXCLUDE_MASK"
-#define NAME_SNOOZE_MODE_CFG "SNOOZE_MODE_CFG"
 #define NAME_NFA_DM_DISC_DURATION_POLL "NFA_DM_DISC_DURATION_POLL"
-#define NAME_SPD_DEBUG "SPD_DEBUG"
-#define NAME_SPD_MAXRETRYCOUNT "SPD_MAX_RETRY_COUNT"
-#define NAME_SPI_NEGOTIATION "SPI_NEGOTIATION"
 #define NAME_AID_FOR_EMPTY_SELECT "AID_FOR_EMPTY_SELECT"
 #define NAME_PRESERVE_STORAGE "PRESERVE_STORAGE"
 #define NAME_NFA_MAX_EE_SUPPORTED "NFA_MAX_EE_SUPPORTED"
-#define NAME_NFCC_ENABLE_TIMEOUT "NFCC_ENABLE_TIMEOUT"
-#define NAME_NFA_DM_PRE_DISCOVERY_CFG "NFA_DM_PRE_DISCOVERY_CFG"
 #define NAME_POLL_FREQUENCY "POLL_FREQUENCY"
-#define NAME_XTAL_HARDWARE_ID "XTAL_HARDWARE_ID"
-#define NAME_XTAL_FREQUENCY "XTAL_FREQUENCY"
-#define NAME_XTAL_FREQ_INDEX "XTAL_FREQ_INDEX"
-#define NAME_XTAL_PARAMS_CFG "XTAL_PARAMS_CFG"
-#define NAME_EXCLUSIVE_SE_ACCESS "EXCLUSIVE_SE_ACCESS"
-#define NAME_DBG_NO_UICC_IDLE_TIMEOUT_TOGGLING \
-  "DBG_NO_UICC_IDLE_TIMEOUT_TOGGLING"
 #define NAME_PRESENCE_CHECK_ALGORITHM "PRESENCE_CHECK_ALGORITHM"
-#define NAME_ALLOW_NO_NVM "ALLOW_NO_NVM"
 #define NAME_DEVICE_HOST_WHITE_LIST "DEVICE_HOST_WHITE_LIST"
-#define NAME_POWER_OFF_MODE "POWER_OFF_MODE"
-#define NAME_GLOBAL_RESET "DO_GLOBAL_RESET"
-#define NAME_NCI_HAL_MODULE "NCI_HAL_MODULE"
 #define NAME_NFA_POLL_BAIL_OUT_MODE "NFA_POLL_BAIL_OUT_MODE"
 #define NAME_NFA_PROPRIETARY_CFG "NFA_PROPRIETARY_CFG"
 #define NAME_NFA_AID_BLOCK_ROUTE "NFA_AID_BLOCK_ROUTE"
 
-#define LPTD_PARAM_LEN (40)
-
-// default configuration
-#define default_transport "/dev/bcm2079x"
-#define default_storage_location "/data/nfc"
-
 struct tUART_CONFIG {
   int m_iBaudrate;  // 115200
   int m_iDatabits;  // 8
@@ -99,7 +48,7 @@
 };
 
 extern struct tUART_CONFIG uartConfig;
-#define MAX_CHIPID_LEN (16)
+
 void readOptionalConfig(const char* option);
 
 /* Snooze mode configuration structure */
diff --git a/src/include/gki_target.h b/src/include/gki_target.h
index 957b23f..0de753f 100644
--- a/src/include/gki_target.h
+++ b/src/include/gki_target.h
@@ -24,14 +24,6 @@
 
 #include "data_types.h"
 
-/* Operating System Selection */
-#ifndef BTE_SIM_APP
-#define _GKI_ARM
-#define _GKI_STANDALONE
-#else
-#define _BT_WIN32
-#endif
-
 /******************************************************************************
 **
 ** Task configuration
diff --git a/src/include/nci_defs.h b/src/include/nci_defs.h
index 22192da..23b4ae6 100644
--- a/src/include/nci_defs.h
+++ b/src/include/nci_defs.h
@@ -27,21 +27,17 @@
 
 #include <stdint.h>
 
-#define NCI_BRCM_CO_ID 0x2E
-
 /* Define the message header size for all NCI Commands and Notifications.
 */
 #define NCI_MSG_HDR_SIZE 3  /* per NCI spec */
 #define NCI_DATA_HDR_SIZE 3 /* per NCI spec */
 #define NCI_MAX_PAYLOAD_SIZE 0xFE
-#define NCI_MAX_CTRL_SIZE 0xFF /* max control message size */
 #define NCI_CTRL_INIT_SIZE 32  /* initial NFCC control payload size */
 #define NCI_MAX_VSC_SIZE 0xFF
 #define APPL_DTA_MODE FALSE
 /* NCI header (3) + callback function pointer(8; use 8 to be safe) + HCIT (1
  * byte) */
 #define NCI_VSC_MSG_HDR_SIZE 12
-#define NCI_TL_SIZE 2
 
 /* Max frame size (256) - Prologue (1) - Epilogue (2) in ISO-DEP, CID and NAD
  * are not used*/
@@ -62,12 +58,6 @@
 #define NCI_MT_CMD 1 /* (NCI_MT_CMD << NCI_MT_SHIFT) = 0x20 */
 #define NCI_MT_RSP 2 /* (NCI_MT_RSP << NCI_MT_SHIFT) = 0x40 */
 #define NCI_MT_NTF 3 /* (NCI_MT_NTF << NCI_MT_SHIFT) = 0x60 */
-#define NCI_MT_CFG 4 /* (NCI_MT_CFG << NCI_MT_SHIFT) = 0x80 */
-
-#define NCI_MTS_CMD 0x20
-#define NCI_MTS_RSP 0x40
-#define NCI_MTS_NTF 0x60
-#define NCI_MTS_CFG 0x80
 
 #define NCI_NTF_BIT 0x80 /* the tNFC_VS_EVT is a notification */
 #define NCI_RSP_BIT 0x40 /* the tNFC_VS_EVT is a response     */
@@ -75,18 +65,13 @@
 /* for internal use only; not from specification */
 /* the following 2 flags are used in layer_specific for fragmentation/reassembly
  * of data packets */
-#define NCI_LS_DATA 0x00
-#define NCI_LS_DATA_PBF 0x01
 
 /* PBF: Packet Boundary Flag (byte 0) */
 #define NCI_PBF_MASK 0x10
 #define NCI_PBF_SHIFT 4
-#define NCI_PBF_NO_OR_LAST 0x00 /* not fragmented or last fragment */
-#define NCI_PBF_ST_CONT 0x10    /* start or continuing fragment */
 
 /* GID: Group Identifier (byte 0) */
 #define NCI_GID_MASK 0x0F
-#define NCI_GID_SHIFT 0
 #define NCI_GID_CORE 0x00      /* 0000b NCI Core group */
 #define NCI_GID_RF_MANAGE 0x01 /* 0001b RF Management group */
 #define NCI_GID_EE_MANAGE 0x02 /* 0010b NFCEE Management group */
@@ -111,9 +96,6 @@
 #define NCI_MSG_BLD_HDR0(p, mt, gid) \
   *(p)++ = (uint8_t)(((mt) << NCI_MT_SHIFT) | (gid));
 
-#define NCI_MSG_PBLD_HDR0(p, mt, pbf, gid) \
-  *(p)++ = (uint8_t)(((mt) << NCI_MT_SHIFT) | ((pbf) << NCI_PBF_SHIFT) | (gid));
-
 /* builds byte1 of NCI Command and Notification packet */
 #define NCI_MSG_BLD_HDR1(p, oid) *(p)++ = (uint8_t)(((oid) << NCI_OID_SHIFT));
 
@@ -123,11 +105,6 @@
   (pbf) = (*(p)&NCI_PBF_MASK) >> NCI_PBF_SHIFT; \
   (gid) = *(p)++ & NCI_GID_MASK;
 
-/* parse MT and PBF bits of NCI packet */
-#define NCI_MSG_PRS_MT_PBF(p, mt, pbf)     \
-  mt = (*(p)&NCI_MT_MASK) >> NCI_MT_SHIFT; \
-  (pbf) = (*(p)&NCI_PBF_MASK) >> NCI_PBF_SHIFT;
-
 /* parse byte1 of NCI Cmd/Ntf */
 #define NCI_MSG_PRS_HDR1(p, oid) \
   (oid) = (*(p)&NCI_OID_MASK);   \
@@ -141,12 +118,6 @@
  * is predefined  */
 #define NCI_CID_MASK 0x0F
 
-/* builds 3-byte message header of NCI Data packet */
-#define NCI_DATA_BLD_HDR(p, cid, len) \
-  *(p)++ = (uint8_t)(cid);            \
-  *(p)++ = 0;                         \
-  *(p)++ = (uint8_t)(len);
-
 #define NCI_DATA_PBLD_HDR(p, pbf, cid, len)             \
   *(p)++ = (uint8_t)(((pbf) << NCI_PBF_SHIFT) | (cid)); \
   *(p)++ = 0;                                           \
@@ -162,7 +133,6 @@
 /* Logical target ID 0x01-0xFE */
 
 /* CORE_RESET_NTF reset trigger type*/
-#define NCI2_0_RESET_TRIGGER_TYPE_ERROR 0x00
 #define NCI2_0_RESET_TRIGGER_TYPE_POWERED_ON 0x01
 #define NCI2_0_RESET_TRIGGER_TYPE_CORE_RESET_CMD_RECEIVED 0x02
 
@@ -256,8 +226,6 @@
  * NCI Core Group Params
  **********************************************/
 #define NCI_CORE_PARAM_SIZE_RESET 0x01
-#define NCI_CORE_PARAM_SIZE_RESET_RSP 0x03
-#define NCI_CORE_PARAM_SIZE_RESET_NTF 0x02
 
 /**********************************************
  * NCI Feature Bit
@@ -267,52 +235,20 @@
 #define NCI_CORE_PARAM_SIZE_INIT(X) (((X) == NCI_VERSION_2_0) ? (0x02) : (0x00))
 #define NCI2_0_CORE_INIT_CMD_BYTE_0 0x00
 #define NCI2_0_CORE_INIT_CMD_BYTE_1 0x00
-#define NCI_CORE_PARAM_SIZE_INIT_RSP 0x11
-#define NCI_CORE_INIT_RSP_OFFSET_NUM_INTF 0x05
 
 /* Status (1 octet) and number of params */
-#define NCI_CORE_PARAM_SIZE_SET_CONFIG_RSP 0x02
 #define NCI_CORE_PARAM_SIZE_SET_POWER_SUB_STATE 0x01
 
-/* octet 0 */
-#define NCI_FEAT_DISCOVERY_FREG 0x00000001
-#define NCI_FEAT_DISCOVERY_CFGM 0x00000006
-/* octet 1 */
-#define NCI_FEAT_TECHNOLOGY_ROUTING 0x00000200
-#define NCI_FEAT_PROTOCOL_ROUTING 0x00000400
-#define NCI_FEAT_AID_ROUTING 0x00000800
-/* octet 2 */
-#define NCI_FEAT_BATTERY_OFF_MD 0x00010000
-#define NCI_FEAT_SWITCH_OFF_MD 0x00020000
-
-/* supported Interfaces */
-#define NCI_SUP_INTF_FRAME 0x0001
-#define NCI_SUP_INTF_ISO_DEP 0x0002
-#define NCI_SUP_INTF_NFC_DEP 0x0004
-
 #define NCI_CORE_PARAM_SIZE_CON_CREATE 0x02 /* handle, num_tlv, (tlv) */
 /* status, size, credits, conn_id */
-#define NCI_CORE_PARAM_SIZE_CON_CREATE_RSP 0x04
-#define NCI_CON_CREATE_TAG_EE_INTF 0x00 /* old */
 #define NCI_CON_CREATE_TAG_RF_DISC_ID 0x00
 #define NCI_CON_CREATE_TAG_NFCEE_VAL 0x01
 
 #define NCI_CORE_PARAM_SIZE_CON_CLOSE 0x01     /* Conn ID (1 octet) */
-#define NCI_CORE_PARAM_SIZE_CON_CLOSE_RSP 0x01 /* Status (1 octet) */
 
-/* RF Field Status (1 octet) */
-#define NCI_CORE_PARAM_SIZE_RF_FIELD_NTF 0x01
-
-/* Keep the NCI configuration (if possible) and perform NCI initialization. */
-#define NCI_RESET_TYPE_KEEP_CFG 0x00
 /* Reset the NCI configuration, and perform NCI initialization. */
 #define NCI_RESET_TYPE_RESET_CFG 0x01
 
-/* NCI Configuration has been kept  */
-#define NCI_RESET_STATUS_KEPT_CFG 0x00
-/* NCI Configuration has been reset */
-#define NCI_RESET_STATUS_RESET_CFG 0x01
-
 /* No operating field generated by remote device  */
 #define NCI_RF_STS_NO_REMOTE 0x00
 /* Operating field generated by remote device  */
@@ -321,15 +257,10 @@
 /* Discovery Action (1 octet) */
 #define NCI_PARAM_SIZE_DISCOVER_NFCEE(X) \
   (((X) == NCI_VERSION_2_0) ? 0X00 : 0X01)
-/* Status (1 octet)Number of NFCEEs (1 octet) */
-#define NCI_PARAM_SIZE_DISCOVER_NFCEE_RSP 0x02
 
 #define NCI_DISCOVER_ACTION_DISABLE 0
 #define NCI_DISCOVER_ACTION_ENABLE 1
 
-#define NCI_EE_DISCOVER_REQ_TYPE_LISTEN 0x01
-#define NCI_EE_DISCOVER_REQ_TYPE_POLL 0x02
-
 #define NCI_RF_PARAM_ID_TECH_N_MODE 0x00 /* RF Technology and Mode   */
 #define NCI_RF_PARAM_ID_TX_BIT_RATE 0x01 /* Transmit Bit Rate        */
 #define NCI_RF_PARAM_ID_RX_BIT_RATE 0x02 /* Receive Bit Rate         */
@@ -353,11 +284,9 @@
 #define NCI_NFCEE_STS_CONN_ACTIVE 0x00
 #define NCI_NFCEE_STS_CONN_INACTIVE 0x01
 #define NCI_NFCEE_STS_REMOVED 0x02
-#define NCI_NUM_NFCEE_STS 3
 
 /* Logical Target ID (1 octet)NFCEE Mode (1 octet) */
 #define NCI_CORE_PARAM_SIZE_NFCEE_MODE_SET 0x02
-#define NCI_CORE_PARAM_SIZE_NFCEE_MODE_SET_RSP 0x01 /* Status (1 octet) */
 
 /* Deactivate the connected NFCEE */
 #define NCI_NFCEE_MD_DEACTIVATE 0x00
@@ -384,23 +313,14 @@
 #define NCI_DEACTIVATE_REASON_DH_REQ_FAILED 4
 
 /* The NFCEE status in NFCEE Status Notification */
-#define NCI_NFCEE_NTF_STATUS_ERROR 0x00        /* Unrecoverable Error */
-#define NCI_NFCEE_NTF_STATUS_INIT_STARTED 0x01 /* NFCEE init seq started */
-#define NCI_NFCEE_NTF_STATUS_INIT_DONE 0x02    /* NFCEE init seq completed */
 typedef uint8_t tNCI_EE_NTF_STATUS;
 
 /* NFCEE Power and Link Configuration */
-#define NFCEE_PL_CONFIG_NFCC_DECIDES 0x00
-#define NFCEE_PL_CONFIG_PWR_ALWAYS_ON 0x01
-#define NFCEE_PL_CONFIG_LNK_ON_WHEN_PWR_ON 0x02
-#define NFCEE_PL_CONFIG_PWR_LNK_ALWAYS_ON 0x03
 typedef uint8_t tNCI_NFCEE_PL_CONFIG;
 
 /**********************************************
 * NCI Interface Mode
 **********************************************/
-#define NCI_INTERFACE_MODE_POLL 1
-#define NCI_INTERFACE_MODE_LISTEN 2
 #define NCI_INTERFACE_MODE_POLL_N_LISTEN 3
 
 /**********************************************
@@ -418,15 +338,9 @@
 /**********************************************
  * NCI RF Management / DISCOVERY Group Params
  **********************************************/
-#define NCI_DISCOVER_PARAM_SIZE_RSP 0x01
 
 #define NCI_DISCOVER_PARAM_SIZE_SELECT 0x03     /* ID, protocol, interface */
-#define NCI_DISCOVER_PARAM_SIZE_SELECT_RSP 0x01 /* Status (1 octet) */
-#define NCI_DISCOVER_PARAM_SIZE_STOP 0x00       /*  */
-#define NCI_DISCOVER_PARAM_SIZE_STOP_RSP 0x01   /* Status (1 octet) */
 #define NCI_DISCOVER_PARAM_SIZE_DEACT 0x01      /* type */
-#define NCI_DISCOVER_PARAM_SIZE_DEACT_RSP 0x01  /* Status (1 octet) */
-#define NCI_DISCOVER_PARAM_SIZE_DEACT_NTF 0x01  /* type */
 
 /**********************************************
  * Supported Protocols
@@ -456,7 +370,6 @@
 #define NCI_DISCOVERY_TYPE_LISTEN_ACTIVE 0x83
 #define NCI_DISCOVERY_TYPE_LISTEN_F_ACTIVE 0x85
 #define NCI_DISCOVERY_TYPE_LISTEN_ISO15693 0x86
-#define NCI_DISCOVERY_TYPE_MAX NCI_DISCOVERY_TYPE_LISTEN_ISO15693
 
 typedef uint8_t tNCI_DISCOVERY_TYPE;
 
@@ -466,15 +379,11 @@
 #define NCI_EE_TRIG_APP_INIT 0x10
 
 #define NCI_EE_ACT_TAG_AID 0xC0   /* AID                 */
-#define NCI_EE_ACT_TAG_PROTO 0xC1 /* RF protocol         */
-#define NCI_EE_ACT_TAG_TECH 0xC2  /* RF technology       */
 #define NCI_EE_ACT_TAG_DATA 0xC3  /* hex data for app    */
-#define NCI_EE_ACT_TAG_DEBUG 0xC4 /* debug trace         */
 
 /* NFCEE ID (1 octet) PL config (1 octet) */
 #define NCI_CORE_PARAM_SIZE_NFCEE_PL_CTRL 0x02
 /* Status (1 octet) */
-#define NCI_CORE_PARAM_SIZE_NFCEE_PL_CTRL_RSP 0x01
 /* Technology based routing  */
 #define NCI_ROUTE_TAG_TECH 0x00
 /* Protocol based routing  */
@@ -487,11 +396,9 @@
 /* The device's battery is removed */
 #define NCI_ROUTE_PWR_STATE_BATT_OFF 0x04
 /* The device is in screen off Unlock mode */
-#define NCI_ROUTE_PWR_STATE_SCREEN_OFF_UNLOCK 0x08
 /* The device is in screen on lock mode */
 #define NCI_ROUTE_PWR_STATE_SCREEN_ON_LOCK 0x10
 /* The device is in screen off lock mode */
-#define NCI_ROUTE_PWR_STATE_SCREEN_OFF_LOCK 0x20
 
 /* Hardware / Registration Identification  */
 #define NCI_NFCEE_TAG_HW_ID 0x00
@@ -574,25 +481,8 @@
 #define NCI_PARAM_ID_ATR_RSP_CONFIG 0x62
 
 #define NCI_PARAM_ID_RF_FIELD_INFO 0x80
-#define NCI_PARAM_ID_RF_NFCEE_ACTION 0x81
 #define NCI_PARAM_ID_NFC_DEP_OP 0x82
 
-/* NCI_PARAM_ID_HOST_LISTEN_MASK (byte1 for DH, byte2 for UICC) */
-/* (0x01 << (NCI_DISCOVERY_TYPE_LISTEN_A_PASSIVE & 0x0F)) */
-#define NCI_LISTEN_MASK_A 0x01
-/* (0x01 << (NCI_DISCOVERY_TYPE_LISTEN_B_PASSIVE & 0x0F)) */
-#define NCI_LISTEN_MASK_B 0x02
-/* (0x01 << (NCI_DISCOVERY_TYPE_LISTEN_F_PASSIVE & 0x0F)) */
-#define NCI_LISTEN_MASK_F 0x04
-/* (0x01 << (NCI_DISCOVERY_TYPE_LISTEN_A_ACTIVE & 0x0F))  */
-#define NCI_LISTEN_MASK_A_ACTIVE 0x08
-/* (0x01 << (NCI_DISCOVERY_TYPE_LISTEN_B_PRIME & 0x0F))   */
-#define NCI_LISTEN_MASK_B_PRIME 0x10
-/* (0x01 << (NCI_DISCOVERY_TYPE_LISTEN_F_ACTIVE & 0x0F))  */
-#define NCI_LISTEN_MASK_F_ACTIVE 0x20
-/* (0x01 << (NCI_DISCOVERY_TYPE_LISTEN_ISO15693 & 0x0F))  */
-#define NCI_LISTEN_MASK_ISO15693 0x40
-
 /* Type A Parameters */
 #define NCI_PARAM_PLATFORM_T1T 0x0C
 #define NCI_PARAM_SEL_INFO_ISODEP 0x20
@@ -604,8 +494,6 @@
 
 #define NCI_PARAM_LEN_CON_DISCOVERY_PARAM 1
 
-#define NCI_PARAM_LEN_PA_FSDI 1
-
 #define NCI_PARAM_LEN_PF_RC 1
 
 #define NCI_PARAM_LEN_LA_BIT_FRAME_SDD 1
@@ -624,8 +512,6 @@
 #define NCI_PARAM_LEN_LF_CON_ADV_FEAT 1
 
 #define NCI_PARAM_LEN_LF_T3T_RD_ALLOWED 1  // Listen F NCI2.0 Parameter
-#define NCI_PARAM_LEN_LF_T3T_ID_MAX 16     // LF T3T indentifier Max Value 16
-#define NFA_CE_LISTEN_INFO_LF_MAX 16       // LF T3T indentifier Max Value 16
 
 #define NCI_PARAM_LEN_FWI 1
 #define NCI_PARAM_LEN_WT 1
@@ -636,11 +522,8 @@
 #define NCI_LISTEN_PROTOCOL_ISO_DEP 0x01
 #define NCI_LISTEN_PROTOCOL_NFC_DEP 0x02
 
-#define NCI_DISCOVER_PARAM_SIZE_TEST_RF 0x06
-
 /* LF_T3T_FLAGS2 listen bits all-disabled definition */
 #define NCI_LF_T3T_FLAGS2_ALL_DISABLED 0x0000
-#define NCI_LF_T3T_FLAGS2_ID1_ENABLED 0x0001
 
 /* The DH-NFCEE listen is considered as a enable NFCEE */
 #define NCI_LISTEN_DH_NFCEE_ENABLE_MASK 0x00
@@ -651,7 +534,6 @@
 /* The DH polling is considered as a enable NFCEE */
 #define NCI_POLLING_DH_ENABLE_MASK 0x01
 
-#define NCI_ROUTE_QUAL_MASK 0x70
 /* AID matching is allowed when the SELECT AID is longer */
 #define NCI_ROUTE_QUAL_LONG_SELECT 0x10
 /* AID matching is allowed when the SELECT AID is shorter */
@@ -726,8 +608,6 @@
 } tNCI_RF_PB_PARAMS;
 
 #define NCI_MAX_SENSF_RES_LEN 18
-#define NCI_SENSF_RES_OFFSET_PAD0 8
-#define NCI_SENSF_RES_OFFSET_RD 16
 #define NCI_NFCID2_LEN 8
 #define NCI_T3T_PMM_LEN 8
 #define NCI_SYSTEMCODE_LEN 2
@@ -771,7 +651,6 @@
 #define NCI_ATS_TC_MASK 0x40
 #define NCI_ATS_TB_MASK 0x20
 #define NCI_ATS_TA_MASK 0x10
-#define NCI_ATS_FSCI_MASK 0x0F
 typedef struct {
   uint8_t ats_res_len;              /* Length of ATS RES */
   uint8_t ats_res[NCI_MAX_ATS_LEN]; /* ATS RES defined in [DIGPROT] */
diff --git a/src/include/nfc_brcm_defs.h b/src/include/nfc_brcm_defs.h
index c66ecd4..62a0995 100644
--- a/src/include/nfc_brcm_defs.h
+++ b/src/include/nfc_brcm_defs.h
@@ -26,246 +26,39 @@
 #ifndef NFC_BRCM_DEFS_H
 #define NFC_BRCM_DEFS_H
 
-/*****************************************************************************
-** Broadcom HW ID definitions
-*****************************************************************************/
-#define BRCM_20791B3_ID 0x20791b03
-#define BRCM_20791B4_ID 0x20791b04
-#define BRCM_20791B5_ID 0x20791b05
-#define BRCM_43341B0_ID 0x43341b00
-#define BRCM_20795T1_ID 0x20795a01
-#define BRCM_20795A0_ID 0x20795a00
-#define BRCM_20795A1_ID 0x20795a10
-
-#define BRCM_NFC_GEN_MASK 0xFFFFF000 /* HW generation mask */
-#define BRCM_NFC_REV_MASK 0x00000FFF /* HW revision mask   */
-#define BRCM_NFC_20791_GEN 0x20791000
-#define BRCM_NFC_20791_GEN_MAX_EE 3 /* HCI access and 2 UICCs */
-#define BRCM_NFC_43341_GEN 0x43341000
-#define BRCM_NFC_43341_GEN_MAX_EE 3 /* HCI access and 2 UICCs */
-#define BRCM_NFC_20795_GEN 0x20795000
-#define BRCM_NFC_20795_GEN_MAX_EE 4 /* HCI access and 3 UICCs */
-
-/*****************************************************************************
-** Broadcom-specific NCI definitions
-*****************************************************************************/
-
 /**********************************************
  * NCI Message Proprietary  Group       - F
  **********************************************/
-#define NCI_MSG_TAG_SET_MEM 0x00
-#define NCI_MSG_TAG_GET_MEM 0x01
-#define NCI_MSG_T1T_SET_HR 0x02
-#define NCI_MSG_SET_CLF_REGISTERS 0x03
 #define NCI_MSG_GET_BUILD_INFO 0x04
 #define NCI_MSG_HCI_NETWK 0x05
-#define NCI_MSG_SET_FWFSM 0x06
-#define NCI_MSG_SET_UICCRDRF 0x07
 #define NCI_MSG_POWER_LEVEL 0x08
-#define NCI_MSG_FRAME_LOG 0x09
 #define NCI_MSG_UICC_READER_ACTION 0x0A
-#define NCI_MSG_SET_PPSE_RESPONSE 0x0B
-#define NCI_MSG_PRBS_SET 0x0C
 /* reset HCI network/close all pipes (S,D) register */
-#define NCI_MSG_RESET_ALL_UICC_CFG 0x0D
-#define NCI_MSG_GET_NFCEE_INFO 0x0E
-#define NCI_MSG_DISABLE_INIT_CHECK 0x0F
-#define NCI_MSG_ANTENNA_SELF_TEST 0x10
-#define NCI_MSG_SET_MAX_PKT_SIZE 0x11
-#define NCI_MSG_NCIP_CLK_REQ_OR_CAR_DET 0x12
-#define NCI_MSG_NCIP_CONFIG_DBUART 0x13
-#define NCI_MSG_NCIP_ENABLE_DVT_DRIVER 0x14
-#define NCI_MSG_SET_ASWP 0x15
-#define NCI_MSG_ENCAPSULATE_NCI 0x16
-#define NCI_MSG_CONFIGURE_ARM_JTAG 0x17
-#define NCI_MSG_STATISTICS 0x18
-#define NCI_MSG_SET_DSP_TABLE 0x19
-#define NCI_MSG_GET_DSP_TABLE 0x1a
-#define NCI_MSG_READY_RX_CMD 0x1b
-#define NCI_MSG_GET_VBAT 0x1c
-#define NCI_MSG_GET_XTAL_INDEX_FROM_DH 0x1d
-#define NCI_MSG_SWP_LOG 0x1e
-#define NCI_MSG_GET_PWRLEVEL 0x1f
-#define NCI_MSG_SET_VBAT_MONITOR 0x20
-#define NCI_MSG_SET_TINT_MODE 0x21
-#define NCI_MSG_ACCESS_APP 0x22
-#define NCI_MSG_SET_SECURE_MODE 0x23
 #define NCI_MSG_GET_NV_DEVICE 0x24
 #define NCI_MSG_LPTD 0x25
-#define NCI_MSG_SET_CE4_AS_SNOOZE 0x26
-#define NCI_MSG_NFCC_SEND_HCI 0x27
-#define NCI_MSG_CE4_PATCH_DOWNLOAD_DONE 0x28
 #define NCI_MSG_EEPROM_RW 0x29
-#define NCI_MSG_GET_CLF_REGISTERS 0x2A
-#define NCI_MSG_RF_TEST 0x2B
-#define NCI_MSG_DEBUG_PRINT 0x2C
 #define NCI_MSG_GET_PATCH_VERSION 0x2D
 #define NCI_MSG_SECURE_PATCH_DOWNLOAD 0x2E
-#define NCI_MSG_SPD_FORMAT_NVM 0x2F
-#define NCI_MSG_SPD_READ_NVM 0x30
-#define NCI_MSG_SWP_BIST 0x31
-#define NCI_MSG_WLESS_DBG_MODE 0x32
-#define NCI_MSG_I2C_REQ_POLARITY 0x33
-#define NCI_MSG_AID_FILTER 0x39
-
-/**********************************************
- * Proprietary  NCI status codes
- **********************************************/
-#define NCI_STATUS_SPD_ERROR_ORDER 0xE0
-#define NCI_STATUS_SPD_ERROR_DEST 0xE1
-#define NCI_STATUS_SPD_ERROR_PROJECTID 0xE2
-#define NCI_STATUS_SPD_ERROR_CHIPVER 0xE3
-#define NCI_STATUS_SPD_ERROR_MAJORVER 0xE4
-#define NCI_STATUS_SPD_ERROR_INVALID_PARAM 0xE5
-#define NCI_STATUS_SPD_ERROR_INVALID_SIG 0xE6
-#define NCI_STATUS_SPD_ERROR_NVM_CORRUPTED 0xE7
-#define NCI_STATUS_SPD_ERROR_PWR_MODE 0xE8
-#define NCI_STATUS_SPD_ERROR_MSG_LEN 0xE9
-#define NCI_STATUS_SPD_ERROR_PATCHSIZE 0xEA
-
-#define NCI_NV_DEVICE_NONE 0x00
-#define NCI_NV_DEVICE_EEPROM 0x08
-#define NCI_NV_DEVICE_UICC1 0x10
-
-/* The events reported on tNFC_VS_CBACK */
-/* The event is (NCI_NTF_BIT|oid) or (NCI_RSP_BIT|oid) */
-#define NFC_VS_HCI_NETWK_EVT (NCI_NTF_BIT | NCI_MSG_HCI_NETWK)
-#define NFC_VS_HCI_NETWK_RSP (NCI_RSP_BIT | NCI_MSG_HCI_NETWK)
-#define NFC_VS_UICC_READER_ACTION_EVT (NCI_NTF_BIT | NCI_MSG_UICC_READER_ACTION)
-#define NFC_VS_POWER_LEVEL_RSP (NCI_RSP_BIT | NCI_MSG_POWER_LEVEL)
-#define NFC_VS_GET_NV_DEVICE_EVT (NCI_RSP_BIT | NCI_MSG_GET_NV_DEVICE)
-#define NFC_VS_LPTD_EVT (NCI_NTF_BIT | NCI_MSG_LPTD)
-#define NFC_VS_GET_BUILD_INFO_EVT (NCI_RSP_BIT | NCI_MSG_GET_BUILD_INFO)
-#define NFC_VS_GET_PATCH_VERSION_EVT (NCI_RSP_BIT | NCI_MSG_GET_PATCH_VERSION)
-#define NFC_VS_SEC_PATCH_DOWNLOAD_EVT \
-  (NCI_RSP_BIT | NCI_MSG_SECURE_PATCH_DOWNLOAD)
-#define NFC_VS_SEC_PATCH_AUTH_EVT (NCI_NTF_BIT | NCI_MSG_SECURE_PATCH_DOWNLOAD)
-#define NFC_VS_EEPROM_RW_EVT (NCI_RSP_BIT | NCI_MSG_EEPROM_RW)
-
-#define NCI_GET_PATCH_VERSION_NVM_OFFSET 37
-
-/* Static and dynamic pipe id and status for each pipe to uicc0 and uicc1. */
-#define NCI_NFCC_PIPE_INFO_NV_SIZE 24
-#define NCI_PERSONALITY_SLOT_SIZE 19
-#define NCI_DYNAMIC_PIPE_SIZE 8
-
-/* Type of TLV in NCI_MSG_HCI_NETWK */
-#define NCI_SWP_INTERFACE_TYPE 0xFF
-/* Type of TLV in NCI_MSG_HCI_NETWK */
-#define NCI_HCI_GATE_TYPE 0xFE
 
 /* Secure Patch Download definitions (patch type definitions) */
 #define NCI_SPD_TYPE_HEADER 0x00
-#define NCI_SPD_TYPE_SRAM 0x01
-#define NCI_SPD_TYPE_AON 0x02
-#define NCI_SPD_TYPE_PATCH_TABLE 0x03
-#define NCI_SPD_TYPE_SECURE_CONFIG 0x04
-#define NCI_SPD_TYPE_CONTROLLED_CONFIG 0x05
-#define NCI_SPD_TYPE_SIGNATURE 0x06
-#define NCI_SPD_TYPE_SIGCHEK 0x07
-
-/* Secure Patch Download definitions (NCI_SPD_TYPE_HEADER definitions) */
-#define NCI_SPD_HEADER_OFFSET_CHIPVERLEN 0x18
-#define NCI_SPD_HEADER_CHIPVER_LEN 16
-
-/* NVM Type (in GET_PATCH_VERSION RSP) */
-#define NCI_SPD_NVM_TYPE_NONE 0x00
-#define NCI_SPD_NVM_TYPE_EEPROM 0x01
-#define NCI_SPD_NVM_TYPE_UICC 0x02
-
-/**********************************************
- * NCI NFCC proprietary features in octet 3
- **********************************************/
-#define NCI_FEAT_SIGNED_PATCH 0x01000000
 
 /**********************************************
  * NCI Interface Types
  **********************************************/
 #define NCI_INTERFACE_VS_MIFARE 0x80
-#define NCI_INTERFACE_VS_CALYPSO_CE 0x81
 #define NCI_INTERFACE_VS_T2T_CE 0x82 /* for Card Emulation side */
-/* for both Reader/Writer and Card Emulation side */
-#define NCI_INTERFACE_VS_15693 0x83
-#define NCI_INTERFACE_VS_T1T_CE 0x84 /* for Card Emulation side */
 
 /**********************************************
  * NCI Proprietary Parameter IDs
  **********************************************/
-#define NCI_PARAM_ID_LA_FSDI 0xA0
-#define NCI_PARAM_ID_LB_FSDI 0xA1
 #define NCI_PARAM_ID_HOST_LISTEN_MASK 0xA2
-#define NCI_PARAM_ID_CHIP_TYPE 0xA3 /* NFCDEP */
-#define NCI_PARAM_ID_PA_ANTICOLL 0xA4
-#define NCI_PARAM_ID_CONTINUE_MODE 0xA5
-#define NCI_PARAM_ID_LBP 0xA6
-#define NCI_PARAM_ID_T1T_RDR_ONLY 0xA7
-#define NCI_PARAM_ID_LA_SENS_RES 0xA8
-#define NCI_PARAM_ID_PWR_SETTING_BITMAP 0xA9
-#define NCI_PARAM_ID_WI_NTF_ENABLE 0xAA
-#define NCI_PARAM_ID_LN_BITRATE 0xAB /* NFCDEP Listen Bitrate */
-#define NCI_PARAM_ID_LF_BITRATE 0xAC /* FeliCa */
-#define NCI_PARAM_ID_SWP_BITRATE_MASK 0xAD
-#define NCI_PARAM_ID_KOVIO 0xAE
-#define NCI_PARAM_ID_UICC_NTF_TO 0xAF
-#define NCI_PARAM_ID_NFCDEP 0xB0
-#define NCI_PARAM_ID_CLF_REGS_CFG 0xB1
-#define NCI_PARAM_ID_NFCDEP_TRANS_TIME 0xB2
-#define NCI_PARAM_ID_CREDIT_TIMER 0xB3
-#define NCI_PARAM_ID_CORRUPT_RX 0xB4
-#define NCI_PARAM_ID_ISODEP 0xB5
-#define NCI_PARAM_ID_LF_CONFIG 0xB6
-#define NCI_PARAM_ID_I93_DATARATE 0xB7
-#define NCI_PARAM_ID_CREDITS_THRESHOLD 0xB8
 #define NCI_PARAM_ID_TAGSNIFF_CFG 0xB9
-#define NCI_PARAM_ID_PA_FSDI 0xBA /* ISODEP */
-#define NCI_PARAM_ID_PB_FSDI 0xBB /* ISODEP */
-#define NCI_PARAM_ID_FRAME_INTF_RETXN 0xBC
-
-#define NCI_PARAM_ID_UICC_RDR_PRIORITY 0xBD
-#define NCI_PARAM_ID_GUARD_TIME 0xBE
-#define NCI_PARAM_ID_STDCONFIG 0xBF /* dont not use this config item */
-/* dont not use this config item  */
-#define NCI_PARAM_ID_PROPCFG 0xC0
-#define NCI_PARAM_ID_MAXTRY2ACTIVATE 0xC1
-#define NCI_PARAM_ID_SWPCFG 0xC2
-#define NCI_PARAM_ID_CLF_LPM_CFG 0xC3
-#define NCI_PARAM_ID_DCLB 0xC4
 #define NCI_PARAM_ID_ACT_ORDER 0xC5
-#define NCI_PARAM_ID_DEP_DELAY_ACT 0xC6
-#define NCI_PARAM_ID_DH_PARITY_CRC_CTL 0xC7
-#define NCI_PARAM_ID_PREINIT_DSP_CFG 0xC8
-#define NCI_PARAM_ID_FW_WORKAROUND 0xC9
-#define NCI_PARAM_ID_RFU_CONFIG 0xCA
-#define NCI_PARAM_ID_EMVCO_ENABLE 0xCB
-#define NCI_PARAM_ID_ANTDRIVER_PARAM 0xCC
-#define NCI_PARAM_ID_PLL325_CFG_PARAM 0xCD
-#define NCI_PARAM_ID_OPNLP_ADPLL_ENABLE 0xCE
-#define NCI_PARAM_ID_CONFORMANCE_MODE 0xCF
 
-#define NCI_PARAM_ID_LPO_ON_OFF_ENABLE 0xD0
-#define NCI_PARAM_ID_FORCE_VANT 0xD1
-#define NCI_PARAM_ID_COEX_CONFIG 0xD2
-#define NCI_PARAM_ID_INTEL_MODE 0xD3
-
-#define NCI_PARAM_ID_AID 0xFF
-
-/**********************************************
- * NCI Parameter ID Lens
- **********************************************/
-#define NCI_PARAM_LEN_PWR_SETTING_BITMAP 3
-#define NCI_PARAM_LEN_HOST_LISTEN_MASK 2
-#define NCI_PARAM_LEN_PLL325_CFG_PARAM 14
-#define NCI_PARAM_LEN_POWER_LEVEL 6
-
-/**********************************************
- * Snooze Mode
- **********************************************/
-#define NFC_SNOOZE_MODE_NONE 0x00    /* Snooze mode disabled    */
 #define NFC_SNOOZE_MODE_UART 0x01    /* Snooze mode for UART    */
-#define NFC_SNOOZE_MODE_SPI_I2C 0x08 /* Snooze mode for SPI/I2C */
 
 #define NFC_SNOOZE_ACTIVE_LOW 0x00  /* high to low voltage is asserting */
-#define NFC_SNOOZE_ACTIVE_HIGH 0x01 /* low to high voltage is asserting */
 
 /**********************************************
  * HCI definitions
@@ -273,13 +66,6 @@
 #define NFC_HAL_HCI_SESSION_ID_LEN 8
 #define NFC_HAL_HCI_SYNC_ID_LEN 2
 
-/* HCI Network command definitions */
-#define NFC_HAL_HCI_NETWK_INFO_SIZE 250
-#define NFC_HAL_HCI_NO_RW_MODE_NETWK_INFO_SIZE 184
-#define NFC_HAL_HCI_DH_NETWK_INFO_SIZE 111
-#define NFC_HAL_HCI_MIN_NETWK_INFO_SIZE 12
-#define NFC_HAL_HCI_MIN_DH_NETWK_INFO_SIZE 11
-
 /* Card emulation RF Gate A definitions */
 #define NFC_HAL_HCI_CE_RF_A_UID_REG_LEN 10
 #define NFC_HAL_HCI_CE_RF_A_ATQA_RSP_CODE_LEN 2
@@ -302,12 +88,6 @@
 /* DH HCI Network command definitions */
 #define NFC_HAL_HCI_DH_MAX_DYN_PIPES 20
 
-/* Target handle for different host in the network */
-#define NFC_HAL_HCI_DH_TARGET_HANDLE 0xF2
-#define NFC_HAL_HCI_UICC0_TARGET_HANDLE 0xF3
-#define NFC_HAL_HCI_UICC1_TARGET_HANDLE 0xF4
-#define NFC_HAL_HCI_UICC2_TARGET_HANDLE 0xF5
-
 /* Card emulation RF Gate A registry information */
 typedef struct {
   uint8_t pipe_id; /* if MSB is set then valid, 7 bits for Pipe ID */
diff --git a/src/include/nfc_hal_api.h b/src/include/nfc_hal_api.h
index b7cc0af..8022587 100644
--- a/src/include/nfc_hal_api.h
+++ b/src/include/nfc_hal_api.h
@@ -27,14 +27,6 @@
 #include "data_types.h"
 #include "nfc_hal_target.h"
 
-/*******************************************************************************
-** tHAL_HCI_NETWK_CMD Definitions
-*******************************************************************************/
-#define HAL_NFC_HCI_NO_UICC_HOST 0x00
-#define HAL_NFC_HCI_UICC0_HOST 0x01
-#define HAL_NFC_HCI_UICC1_HOST 0x02
-#define HAL_NFC_HCI_UICC2_HOST 0x04
-
 typedef uint8_t tHAL_NFC_STATUS;
 typedef void(tHAL_NFC_STATUS_CBACK)(tHAL_NFC_STATUS status);
 typedef void(tHAL_NFC_CBACK)(uint8_t event, tHAL_NFC_STATUS status);
@@ -57,7 +49,6 @@
 typedef void(tHAL_API_POWER_CYCLE)(void);
 typedef uint8_t(tHAL_API_GET_MAX_NFCEE)(void);
 
-#define NFC_HAL_DM_PRE_SET_MEM_LEN 5
 typedef struct {
   uint32_t addr;
   uint32_t data;
diff --git a/src/include/nfc_hal_int.h b/src/include/nfc_hal_int.h
index 99f3467..6f10161 100644
--- a/src/include/nfc_hal_int.h
+++ b/src/include/nfc_hal_int.h
@@ -32,20 +32,6 @@
 #include "nfc_hal_int_api.h"
 #include "nfc_hal_target.h"
 
-/****************************************************************************
-** NFC HAL TASK transport definitions
-****************************************************************************/
-/* NFC HAL Task event masks */
-#define NFC_HAL_TASK_EVT_DATA_RDY EVENT_MASK(APPL_EVT_0)
-#define NFC_HAL_TASK_EVT_INITIALIZE EVENT_MASK(APPL_EVT_5)
-#define NFC_HAL_TASK_EVT_TERMINATE EVENT_MASK(APPL_EVT_6)
-#define NFC_HAL_TASK_EVT_POWER_CYCLE EVENT_MASK(APPL_EVT_7)
-
-#define NFC_HAL_TASK_EVT_MBOX (TASK_MBOX_0_EVT_MASK)
-
-/* NFC HAL Task mailbox definitions */
-#define NFC_HAL_TASK_MBOX (TASK_MBOX_0)
-
 /* NFC HAL Task Timer events */
 #ifndef NFC_HAL_QUICK_TIMER_EVT_MASK
 #define NFC_HAL_QUICK_TIMER_EVT_MASK (TIMER_0_EVT_MASK)
@@ -55,61 +41,14 @@
 #define NFC_HAL_QUICK_TIMER_ID (TIMER_0)
 #endif
 
-/* NFC HAL Task Timer types */
-#define NFC_HAL_TTYPE_NCI_WAIT_RSP 0
-#define NFC_HAL_TTYPE_POWER_CYCLE 1
-#define NFC_HAL_TTYPE_NFCC_ENABLE 2
-
-/* NFC HAL Task Wait Response flag */
-/* wait response on an NCI command                  */
-#define NFC_HAL_WAIT_RSP_CMD 0x10
-/* wait response on an NCI vendor specific command  */
-#define NFC_HAL_WAIT_RSP_VSC 0x20
-/* wait response on a proprietary command           */
-#define NFC_HAL_WAIT_RSP_PROP 0x40
-/* not waiting for anything                         */
-#define NFC_HAL_WAIT_RSP_NONE 0x00
-
 typedef uint8_t tNFC_HAL_WAIT_RSP;
 
 #if (NFC_HAL_HCI_INCLUDED == TRUE)
 
 typedef uint16_t tNFC_HAL_HCI_EVT;
 
-#define NFC_HAL_HCI_PIPE_INFO_SIZE 5
-
-#define NFC_HAL_HCI_ANY_SET_PARAMETER 0x01
-#define NFC_HAL_HCI_ANY_GET_PARAMETER 0x02
-#define NFC_HAL_HCI_ADM_NOTIFY_ALL_PIPE_CLEARED 0x15
-
-#define NFC_HAL_HCI_SESSION_IDENTITY_INDEX 0x01
-#define NFC_HAL_HCI_WHITELIST_INDEX 0x03
-
-#define NFC_HAL_HCI_ADMIN_PIPE 0x01
-/* Host ID for UICC 0 */
-#define NFC_HAL_HCI_HOST_ID_UICC0 0x02
-/* Host ID for UICC 1 */
-#define NFC_HAL_HCI_HOST_ID_UICC1 0x03
-/* Host ID for UICC 2 */
-#define NFC_HAL_HCI_HOST_ID_UICC2 0x04
-#define NFC_HAL_HCI_COMMAND_TYPE 0x00
-#define NFC_HAL_HCI_RESPONSE_TYPE 0x02
-
-/* NFC HAL HCI responses */
-#define NFC_HAL_HCI_ANY_OK 0x00
-
 #endif
 
-/* Flag defintions for tNFC_HAL_NVM */
-/* No NVM available                     */
-#define NFC_HAL_NVM_FLAGS_NO_NVM 0x01
-/* FPM patch in NVM failed CRC check    */
-#define NFC_HAL_NVM_FLAGS_LPM_BAD 0x02
-/* LPM patch in NVM failed CRC check    */
-#define NFC_HAL_NVM_FLAGS_FPM_BAD 0x04
-/* Patch is present in NVM              */
-#define NFC_HAL_NVM_FLAGS_PATCH_PRESENT 0x08
-
 /* NFC HAL transport configuration */
 typedef struct {
   bool shared_transport; /* TRUE if using shared HCI/NCI transport */
@@ -126,29 +65,6 @@
 #endif
 extern NFC_HAL_TRANS_CFG_QUALIFIER tNFC_HAL_TRANS_CFG nfc_hal_trans_cfg;
 
-/*****************************************************************************
-* BT HCI definitions
-*****************************************************************************/
-
-/* Tranport message type */
-#define HCIT_TYPE_COMMAND 0x01
-#define HCIT_TYPE_EVENT 0x04
-#define HCIT_TYPE_NFC 0x10
-
-/* Vendor-Specific BT HCI definitions */
-#define HCI_SUCCESS 0x00
-#define HCI_GRP_VENDOR_SPECIFIC (0x3F << 10) /* 0xFC00 */
-#define HCI_BRCM_WRITE_SLEEP_MODE (0x0027 | HCI_GRP_VENDOR_SPECIFIC)
-#define HCI_GRP_HOST_CONT_BASEBAND_CMDS (0x03 << 10) /* 0x0C00 */
-#define HCI_RESET (0x0003 | HCI_GRP_HOST_CONT_BASEBAND_CMDS)
-#define HCI_COMMAND_COMPLETE_EVT 0x0E
-#define HCI_BRCM_WRITE_SLEEP_MODE_LENGTH 12
-#define HCI_BRCM_UPDATE_BAUD_RATE_UNENCODED_LENGTH 0x06
-#define HCIE_PREAMBLE_SIZE 2
-#define HCI_BRCM_PRE_SET_MEM (0x000C | HCI_GRP_VENDOR_SPECIFIC)
-#define HCI_BRCM_PRE_SET_MEM_LENGTH 10
-#define HCI_BRCM_PRE_SET_MEM_TYPE 8
-
 /****************************************************************************
 ** Internal constants and definitions
 ****************************************************************************/
@@ -164,9 +80,6 @@
   NFC_HAL_RCV_BT_PAYLOAD_ST   /* reading BT HCI payload                   */
 };
 
-/* errors during NCI packet reassembly process */
-#define NFC_HAL_NCI_RAS_TOO_BIG 0x01
-#define NFC_HAL_NCI_RAS_ERROR 0x02
 typedef uint8_t tNFC_HAL_NCI_RAS;
 
 /* NFC HAL power mode */
@@ -185,12 +98,6 @@
 };
 typedef uint8_t tNFC_HAL_LP_EVT;
 
-#define NFC_HAL_ASSERT_NFC_WAKE 0x00   /* assert NFC_WAKE      */
-#define NFC_HAL_DEASSERT_NFC_WAKE 0x01 /* deassert NFC_WAKE    */
-
-#define NFC_HAL_BT_HCI_CMD_HDR_SIZE 3 /* opcode (2) +  length (1)    */
-#define NFC_HAL_CMD_TOUT (2000)       /* timeout for NCI CMD (in ms) */
-
 #define NFC_HAL_SAVED_HDR_SIZE (2)
 #define NFC_HAL_SAVED_CMD_SIZE (2)
 
@@ -297,7 +204,6 @@
 
 /* Maximum number of patches (currently 2: LPM and FPM) */
 #define NFC_HAL_PRM_MAX_PATCH_COUNT 2
-#define NFC_HAL_PRM_PATCH_MASK_ALL 0xFFFFFFFF
 #define NFC_HAL_PRM_MAX_CHIP_VER_LEN 8
 
 /* Structures for PRM Control Block */
@@ -419,7 +325,6 @@
 
 #endif
 
-#define NFC_HAL_FLAGS_NEED_DISABLE_VSC 0x01
 typedef uint8_t tNFC_HAL_FLAGS;
 
 typedef struct {
diff --git a/src/include/nfc_hal_int_api.h b/src/include/nfc_hal_int_api.h
index 6579c91..9198c90 100644
--- a/src/include/nfc_hal_int_api.h
+++ b/src/include/nfc_hal_int_api.h
@@ -28,8 +28,6 @@
 ** Device Configuration definitions
 ****************************************************************************/
 
-#define NFC_HAL_PLL_325_SETCONFIG_PARAM_LEN (2 + NCI_PARAM_LEN_PLL325_CFG_PARAM)
-
 /* Crystal Frequency Index (in 1 KHz) */
 enum {
   NFC_HAL_XTAL_INDEX_9600,
@@ -62,29 +60,10 @@
 } tNFC_HAL_DEV_INIT_CFG;
 
 /*****************************************************************************
-**  Low Power Mode definitions
-*****************************************************************************/
-
-/* Snooze mode disabled    */
-#define NFC_HAL_LP_SNOOZE_MODE_NONE NFC_SNOOZE_MODE_NONE
-/* Snooze mode for UART    */
-#define NFC_HAL_LP_SNOOZE_MODE_UART NFC_SNOOZE_MODE_UART
-/* Snooze mode for SPI/I2C */
-#define NFC_HAL_LP_SNOOZE_MODE_SPI_I2C NFC_SNOOZE_MODE_SPI_I2C
-
-/* high to low voltage is asserting */
-#define NFC_HAL_LP_ACTIVE_LOW NFC_SNOOZE_ACTIVE_LOW
-/* low to high voltage is asserting */
-#define NFC_HAL_LP_ACTIVE_HIGH NFC_SNOOZE_ACTIVE_HIGH
-
-/*****************************************************************************
 **  Patch RAM Constants
 *****************************************************************************/
 
 /* patch format type */
-#define NFC_HAL_PRM_FORMAT_BIN 0x00
-#define NFC_HAL_PRM_FORMAT_HCD 0x01
-#define NFC_HAL_PRM_FORMAT_NCD 0x02
 typedef uint8_t tNFC_HAL_PRM_FORMAT;
 
 /*****************************************************************************
diff --git a/src/include/nfc_hal_nv_co.h b/src/include/nfc_hal_nv_co.h
index 2891c27..8497321 100644
--- a/src/include/nfc_hal_nv_co.h
+++ b/src/include/nfc_hal_nv_co.h
@@ -38,21 +38,6 @@
 **  Common Definitions
 ***************************/
 
-/* Status codes returned by call-out functions, or in call-in functions as
- * status */
-#define NFC_HAL_NV_CO_OK 0x00
-#define NFC_HAL_NV_CO_FAIL 0x01 /* Used to pass all other errors */
-#define NFC_HAL_NV_CO_EACCES 0x02
-#define NFC_HAL_NV_CO_ENOTEMPTY 0x03
-#define NFC_HAL_NV_CO_EOF 0x04
-#define NFC_HAL_NV_CO_EODIR 0x05
-/* Returned in nfa_nv_ci_open if no room */
-#define NFC_HAL_NV_CO_ENOSPACE 0x06
-#define NFC_HAL_NV_CO_EIS_DIR 0x07
-#define NFC_HAL_NV_CO_RESUME 0x08 /* used in nfa_nv_ci_open, on resume */
-/* used in nfa_nv_ci_open, on resume (no file to resume) */
-#define NFC_HAL_NV_CO_NONE 0x09
-
 typedef uint8_t tNFC_HAL_NV_CO_STATUS;
 
 #define DH_NV_BLOCK 0x01
diff --git a/src/include/nfc_hal_post_reset.h b/src/include/nfc_hal_post_reset.h
index 7ce3953..ceb0ca4 100644
--- a/src/include/nfc_hal_post_reset.h
+++ b/src/include/nfc_hal_post_reset.h
@@ -28,7 +28,6 @@
 ** Application control block definitions
 ******************************************************************************/
 #define NFA_APP_PATCHFILE_MAX_PATH 255
-#define NFA_APP_MAX_NUM_REINIT 5
 
 typedef struct {
   uint8_t prm_file[NFA_APP_PATCHFILE_MAX_PATH + 1]; /* Filename of patchram */
diff --git a/src/include/nfc_hal_target.h b/src/include/nfc_hal_target.h
index 3e74216..5fb0ceb 100644
--- a/src/include/nfc_hal_target.h
+++ b/src/include/nfc_hal_target.h
@@ -120,7 +120,6 @@
 
 /* Data rate for 15693 command/response, it must be same as
  * RW_I93_FLAG_DATA_RATE in nfc_target.h */
-#define NFC_HAL_I93_FLAG_DATA_RATE_LOW 0x00
 #define NFC_HAL_I93_FLAG_DATA_RATE_HIGH 0x02
 
 #ifndef NFC_HAL_I93_FLAG_DATA_RATE
diff --git a/src/include/nfc_target.h b/src/include/nfc_target.h
index 96ed6eb..efa1294 100644
--- a/src/include/nfc_target.h
+++ b/src/include/nfc_target.h
@@ -156,13 +156,11 @@
 ******************************************************************************/
 #define NCI_VERSION_UNKNOWN 0x00
 #define NCI_VERSION_1_0 0x10
-#define NCI_VERSION_1_1 0x11
 #define NCI_VERSION_2_0 0x20
 #ifndef NCI_VERSION
 #define NCI_VERSION NCI_VERSION_2_0
 #endif
 #define NCI_CORE_RESET_RSP_LEN(X) (((X) == NCI_VERSION_2_0) ? (0x01) : (0x03))
-#define NCI_VERSION_0_F 0x0F
 
 /* TRUE I2C patch is needed */
 #ifndef NFC_I2C_PATCH_INCLUDED
diff --git a/src/include/nfc_types.h b/src/include/nfc_types.h
index c72b0a2..e6619ed 100644
--- a/src/include/nfc_types.h
+++ b/src/include/nfc_types.h
@@ -32,38 +32,16 @@
 
 /* Mask for NFC_HDR event field */
 #define NFC_EVT_MASK 0xFF00
-#define NFC_SUB_EVT_MASK 0x00FF
 
 /****************************************************************************
 ** NFC_HAL_TASK  definitions
 *****************************************************************************/
 
-/* NFC_HAL_TASK event messages */
-/* NCI message for sending to NFCC          */
-#define NFC_HAL_EVT_TO_NFC_NCI 0x0100
-/* Request to start NCIT quick timer        */
-#define NFC_HAL_EVT_POST_CORE_RESET 0x0200
-/* Request to start chip-specific config    */
-#define NFC_HAL_EVT_TO_START_QUICK_TIMER 0x0300
 /* NCI message for hci persistency data     */
 #define NFC_HAL_EVT_HCI 0x0400
-/* NCI message to issue prediscover config  */
-#define NFC_HAL_EVT_PRE_DISCOVER 0x0500
-/* permission to send commands queued in HAL*/
-#define NFC_HAL_EVT_CONTROL_GRANTED 0x0600
 
-/* NFC_HAL_TASK sub event messages */
-#define NFC_HAL_HCI_RSP_NV_READ_EVT (0x01 | NFC_HAL_EVT_HCI)
-#define NFC_HAL_HCI_RSP_NV_WRITE_EVT (0x02 | NFC_HAL_EVT_HCI)
-#define NFC_HAL_HCI_VSC_TIMEOUT_EVT (0x03 | NFC_HAL_EVT_HCI)
-
-/* Event masks for NFC_TASK messages */
 /* NCI message for sending to host stack    */
 #define NFC_EVT_TO_NFC_NCI 0x4000
-/* Error notification to NFC Task           */
-#define NFC_EVT_TO_NFC_ERR 0x4100
-/* Messages between NFC and NCI task        */
-#define NFC_EVT_TO_NFC_MSGS 0x4200
 
 /*****************************************************************************
 ** Macros to get and put bytes to and from a stream (Little Endian format).
@@ -76,12 +54,6 @@
     *(p)++ = (uint8_t)((u32) >> 16); \
     *(p)++ = (uint8_t)((u32) >> 24); \
   }
-#define UINT24_TO_STREAM(p, u24)     \
-  {                                  \
-    *(p)++ = (uint8_t)(u24);         \
-    *(p)++ = (uint8_t)((u24) >> 8);  \
-    *(p)++ = (uint8_t)((u24) >> 16); \
-  }
 #define UINT16_TO_STREAM(p, u16)    \
   {                                 \
     *(p)++ = (uint8_t)(u16);        \
@@ -89,51 +61,16 @@
   }
 #define UINT8_TO_STREAM(p, u8) \
   { *(p)++ = (uint8_t)(u8); }
-#define INT8_TO_STREAM(p, u8) \
-  { *(p)++ = (int8_t)(u8); }
-#define ARRAY32_TO_STREAM(p, a)                                     \
-  {                                                                 \
-    register int ijk;                                               \
-    for (ijk = 0; ijk < 32; ijk++) *(p)++ = (uint8_t)(a)[31 - ijk]; \
-  }
-#define ARRAY16_TO_STREAM(p, a)                                     \
-  {                                                                 \
-    register int ijk;                                               \
-    for (ijk = 0; ijk < 16; ijk++) *(p)++ = (uint8_t)(a)[15 - ijk]; \
-  }
 #define ARRAY8_TO_STREAM(p, a)                                    \
   {                                                               \
     register int ijk;                                             \
     for (ijk = 0; ijk < 8; ijk++) *(p)++ = (uint8_t)(a)[7 - ijk]; \
   }
-#define BDADDR_TO_STREAM(p, a)                      \
-  {                                                 \
-    register int ijk;                               \
-    for (ijk = 0; ijk < BD_ADDR_LEN; ijk++)         \
-      *(p)++ = (uint8_t)(a)[BD_ADDR_LEN - 1 - ijk]; \
-  }
-#define LAP_TO_STREAM(p, a)                     \
-  {                                             \
-    register int ijk;                           \
-    for (ijk = 0; ijk < LAP_LEN; ijk++)         \
-      *(p)++ = (uint8_t)(a)[LAP_LEN - 1 - ijk]; \
-  }
-#define DEVCLASS_TO_STREAM(p, a)                      \
-  {                                                   \
-    register int ijk;                                 \
-    for (ijk = 0; ijk < DEV_CLASS_LEN; ijk++)         \
-      *(p)++ = (uint8_t)(a)[DEV_CLASS_LEN - 1 - ijk]; \
-  }
 #define ARRAY_TO_STREAM(p, a, len)                                \
   {                                                               \
     register int ijk;                                             \
     for (ijk = 0; ijk < (len); ijk++) *(p)++ = (uint8_t)(a)[ijk]; \
   }
-#define REVERSE_ARRAY_TO_STREAM(p, a, len)                                  \
-  {                                                                         \
-    register int ijk;                                                       \
-    for (ijk = 0; ijk < (len); ijk++) *(p)++ = (uint8_t)(a)[(len)-1 - ijk]; \
-  }
 
 #define STREAM_TO_UINT8(u8, p) \
   {                            \
@@ -145,12 +82,6 @@
     (u16) = ((uint16_t)(*(p)) + (((uint16_t)(*((p) + 1))) << 8)); \
     (p) += 2;                                                     \
   }
-#define STREAM_TO_UINT24(u32, p)                                      \
-  {                                                                   \
-    (u32) = (((uint32_t)(*(p))) + ((((uint32_t)(*((p) + 1)))) << 8) + \
-             ((((uint32_t)(*((p) + 2)))) << 16));                     \
-    (p) += 3;                                                         \
-  }
 #define STREAM_TO_UINT32(u32, p)                                      \
   {                                                                   \
     (u32) = (((uint32_t)(*(p))) + ((((uint32_t)(*((p) + 1)))) << 8) + \
@@ -158,79 +89,17 @@
              ((((uint32_t)(*((p) + 3)))) << 24));                     \
     (p) += 4;                                                         \
   }
-#define STREAM_TO_BDADDR(a, p)                                \
-  {                                                           \
-    register int ijk;                                         \
-    register uint8_t* pbda = (uint8_t*)(a) + BD_ADDR_LEN - 1; \
-    for (ijk = 0; ijk < BD_ADDR_LEN; ijk++) *pbda-- = *(p)++; \
-  }
-#define STREAM_TO_ARRAY32(a, p)                     \
-  {                                                 \
-    register int ijk;                               \
-    register uint8_t* _pa = (uint8_t*)(a) + 31;     \
-    for (ijk = 0; ijk < 32; ijk++) *_pa-- = *(p)++; \
-  }
-#define STREAM_TO_ARRAY16(a, p)                     \
-  {                                                 \
-    register int ijk;                               \
-    register uint8_t* _pa = (uint8_t*)(a) + 15;     \
-    for (ijk = 0; ijk < 16; ijk++) *_pa-- = *(p)++; \
-  }
 #define STREAM_TO_ARRAY8(a, p)                     \
   {                                                \
     register int ijk;                              \
     register uint8_t* _pa = (uint8_t*)(a) + 7;     \
     for (ijk = 0; ijk < 8; ijk++) *_pa-- = *(p)++; \
   }
-#define STREAM_TO_DEVCLASS(a, p)                               \
-  {                                                            \
-    register int ijk;                                          \
-    register uint8_t* _pa = (uint8_t*)(a) + DEV_CLASS_LEN - 1; \
-    for (ijk = 0; ijk < DEV_CLASS_LEN; ijk++) *_pa-- = *(p)++; \
-  }
-#define STREAM_TO_LAP(a, p)                               \
-  {                                                       \
-    register int ijk;                                     \
-    register uint8_t* plap = (uint8_t*)(a) + LAP_LEN - 1; \
-    for (ijk = 0; ijk < LAP_LEN; ijk++) *plap-- = *(p)++; \
-  }
 #define STREAM_TO_ARRAY(a, p, len)                                   \
   {                                                                  \
     register int ijk;                                                \
     for (ijk = 0; ijk < (len); ijk++) ((uint8_t*)(a))[ijk] = *(p)++; \
   }
-#define REVERSE_STREAM_TO_ARRAY(a, p, len)             \
-  {                                                    \
-    register int ijk;                                  \
-    register uint8_t* _pa = (uint8_t*)(a) + (len)-1;   \
-    for (ijk = 0; ijk < (len); ijk++) *_pa-- = *(p)++; \
-  }
-
-/*****************************************************************************
-** Macros to get and put bytes to and from a field (Little Endian format).
-** These are the same as to stream, except the pointer is not incremented.
-*****************************************************************************/
-
-#define UINT32_TO_FIELD(p, u32)                    \
-  {                                                \
-    *(uint8_t*)(p) = (uint8_t)(u32);               \
-    *((uint8_t*)(p) + 1) = (uint8_t)((u32) >> 8);  \
-    *((uint8_t*)(p) + 2) = (uint8_t)((u32) >> 16); \
-    *((uint8_t*)(p) + 3) = (uint8_t)((u32) >> 24); \
-  }
-#define UINT24_TO_FIELD(p, u24)                    \
-  {                                                \
-    *(uint8_t*)(p) = (uint8_t)(u24);               \
-    *((uint8_t*)(p) + 1) = (uint8_t)((u24) >> 8);  \
-    *((uint8_t*)(p) + 2) = (uint8_t)((u24) >> 16); \
-  }
-#define UINT16_TO_FIELD(p, u16)                   \
-  {                                               \
-    *(uint8_t*)(p) = (uint8_t)(u16);              \
-    *((uint8_t*)(p) + 1) = (uint8_t)((u16) >> 8); \
-  }
-#define UINT8_TO_FIELD(p, u8) \
-  { *(uint8_t*)(p) = (uint8_t)(u8); }
 
 /*****************************************************************************
 ** Macros to get and put bytes to and from a stream (Big Endian format)
@@ -272,66 +141,19 @@
     (u16) = (uint16_t)(((uint16_t)(*(p)) << 8) + (uint16_t)(*((p) + 1))); \
     (p) += 2;                                                             \
   }
-#define BE_STREAM_TO_UINT24(u32, p)                                     \
-  {                                                                     \
-    (u32) = (((uint32_t)(*((p) + 2))) + ((uint32_t)(*((p) + 1)) << 8) + \
-             ((uint32_t)(*(p)) << 16));                                 \
-    (p) += 3;                                                           \
-  }
 #define BE_STREAM_TO_UINT32(u32, p)                                      \
   {                                                                      \
     (u32) = ((uint32_t)(*((p) + 3)) + ((uint32_t)(*((p) + 2)) << 8) +    \
              ((uint32_t)(*((p) + 1)) << 16) + ((uint32_t)(*(p)) << 24)); \
     (p) += 4;                                                            \
   }
-#define BE_STREAM_TO_ARRAY(p, a, len)                                \
-  {                                                                  \
-    register int ijk;                                                \
-    for (ijk = 0; ijk < (len); ijk++) ((uint8_t*)(a))[ijk] = *(p)++; \
-  }
 
 /*****************************************************************************
 ** Macros to get and put bytes to and from a field (Big Endian format).
 ** These are the same as to stream, except the pointer is not incremented.
 *****************************************************************************/
 
-#define UINT32_TO_BE_FIELD(p, u32)                 \
-  {                                                \
-    *(uint8_t*)(p) = (uint8_t)((u32) >> 24);       \
-    *((uint8_t*)(p) + 1) = (uint8_t)((u32) >> 16); \
-    *((uint8_t*)(p) + 2) = (uint8_t)((u32) >> 8);  \
-    *((uint8_t*)(p) + 3) = (uint8_t)(u32);         \
-  }
-#define UINT24_TO_BE_FIELD(p, u24)                \
-  {                                               \
-    *(uint8_t*)(p) = (uint8_t)((u24) >> 16);      \
-    *((uint8_t*)(p) + 1) = (uint8_t)((u24) >> 8); \
-    *((uint8_t*)(p) + 2) = (uint8_t)(u24);        \
-  }
-#define UINT16_TO_BE_FIELD(p, u16)          \
-  {                                         \
-    *(uint8_t*)(p) = (uint8_t)((u16) >> 8); \
-    *((uint8_t*)(p) + 1) = (uint8_t)(u16);  \
-  }
 #define UINT8_TO_BE_FIELD(p, u8) \
   { *(uint8_t*)(p) = (uint8_t)(u8); }
 
-/*****************************************************************************
-** Define trace levels
-*****************************************************************************/
-#define TRACE_CTRL_GENERAL 0x00000000
-#define TRACE_LAYER_NCI 0x00280000
-#define TRACE_LAYER_HAL 0x00310000
-#define TRACE_LAYER_GKI 0x001a0000
-#define TRACE_ORG_STACK 0x00000000
-#define TRACE_ORG_GKI 0x00000400
-
-#define TRACE_TYPE_ERROR 0x00000000
-#define TRACE_TYPE_WARNING 0x00000001
-#define TRACE_TYPE_API 0x00000002
-#define TRACE_TYPE_EVENT 0x00000003
-#define TRACE_TYPE_DEBUG 0x00000004
-
-#define TRACE_TYPE_GENERIC 0x00000008
-
 #endif /* NFC_TYPES_H */
diff --git a/src/nfa/include/nfa_api.h b/src/nfa/include/nfa_api.h
index 79a5c16..f11898a 100644
--- a/src/nfa/include/nfa_api.h
+++ b/src/nfa/include/nfa_api.h
@@ -120,8 +120,6 @@
 /* NFA Handle definitions */
 
 /* The upper byte of NFA_HANDLE signifies the handle group */
-/* Connection handles           */
-#define NFA_HANDLE_GROUP_CONNECTION 0x0100
 /* NDEF Type Handler handles    */
 #define NFA_HANDLE_GROUP_NDEF_HANDLER 0x0200
 /* DH Card Emulation handles    */
@@ -210,8 +208,6 @@
 #define NFA_T1T_HR_LEN T1T_HR_LEN
 /* Max UID length of T1/T2  */
 #define NFA_MAX_UID_LEN TAG_MAX_UID_LEN
-/* T1T UID length           */
-#define NFA_T1T_UID_LEN T1T_UID_LEN
 /* UID len for T1T cmds     */
 #define NFA_T1T_CMD_UID_LEN T1T_CMD_UID_LEN
 /* T2T UID length           */
diff --git a/src/nfa/include/nfa_dm_int.h b/src/nfa/include/nfa_dm_int.h
index a791b62..f17f380 100644
--- a/src/nfa/include/nfa_dm_int.h
+++ b/src/nfa/include/nfa_dm_int.h
@@ -141,7 +141,6 @@
   NFC_HDR hdr;
   uint16_t rf_disc_dur_ms;
 } tNFA_DM_API_SET_RF_DISC_DUR;
-#define NFA_RF_DISC_DURATION_MAX 0xFFFF
 
 /* data type for NFA_DM_API_REG_NDEF_HDLR_EVT */
 #define NFA_NDEF_FLAGS_HANDLE_WHOLE_MESSAGE 0x01
@@ -368,8 +367,6 @@
   NFA_DM_DISC_LRT_NFC_BP
 };
 
-/* SLP_REQ (HLTA) command */
-#define SLP_REQ_CMD 0x5000
 /* NFA_EE_MAX_TECH_ROUTE. only A, B, F, Bprime are supported by UICC now */
 #define NFA_DM_MAX_TECH_ROUTE 4
 
@@ -415,8 +412,6 @@
 /* Default handler entry in ndef_handler table      */
 #define NFA_NDEF_DEFAULT_HANDLER_IDX 0
 
-#define NFA_PARAM_ID_INVALID 0xFF
-
 /* Maximum number of pending SetConfigs */
 #define NFA_DM_SETCONFIG_PENDING_MAX 32
 
diff --git a/src/nfa/include/nfa_dta_int.h b/src/nfa/include/nfa_dta_int.h
index c050292..c49336b 100644
--- a/src/nfa/include/nfa_dta_int.h
+++ b/src/nfa/include/nfa_dta_int.h
@@ -36,29 +36,9 @@
 /*****************************************************************************
 **  DTA definitions
 *****************************************************************************/
-#define NFA_DTA_PATTERN_NUMBER_INVALID 0xFFFF
-
-#define NFA_DTA_PATTERN_NUMBER_LLCP_CONNECT_BY_SAP 0x1200
-#define NFA_DTA_PATTERN_NUMBER_LLCP_CONNECT_BY_SN 0x1240
-#define NFA_DTA_PATTERN_NUMBER_LLCP_CONNECT_BY_SNL 0x1280
-
-#define NFA_DTA_PATTERN_NUMBER_SNEP_SERVER_ONLY 0x1300
-#define NFA_DTA_PATTERN_NUMBER_SNEP_DEFAULT_PUT_SHORT_NDEF 0x1301
-#define NFA_DTA_PATTERN_NUMBER_SNEP_DEFAULT_PUT_LONG_NDEF 0x1302
-#define NFA_DTA_PATTERN_NUMBER_SNEP_EXTENDED_GET 0x1303
 
 #define NFA_DTA_DISCOVER_PARAMS_MAX 6
 
-/* Header length for long NDEF text message */
-#define NDEF_WKT_TEXT_HDR_LEN 7
-/* Size of NDEF message for T3T write-tests ([DTA] $5.5.6) */
-#define NFA_DTA_T3T_WRITE_NDEF_SIZE 192
-/* System code to use for T3T Listen mode tests */
-#define NFA_DTA_T3T_LISTEN_SYSTEMCODE 0xBABE
-
-/* Maximum protocol preference rank */
-#define NFA_PROTOCOL_RANK_INVALID 0xFF
-
 #define NFA_DTA_SCRATCH_BUF_SIZE T3T_MSG_BLOCKSIZE
 
 #ifndef NFA_DTA_DEFAULT_CO_OUT_DSAP
@@ -176,9 +156,6 @@
 };
 typedef uint8_t tNFA_DTA_STATE;
 
-/* DTA Substates (while in ACTIVATED state) - substate enumerations are found in
- * protocol-specific files (nfa_dta_XXX.c) */
-#define NFA_DTA_SST_IDLE 0
 typedef uint8_t tNFA_DTA_SUBSTATE;
 
 /* DTA discovery states */
@@ -221,17 +198,6 @@
 /* DTA test step command */
 typedef tNFC_STATUS (*tNFA_DTA_CMD_FCN)(void*);
 
-/* dta control block flags */
-#define NFA_DTA_FL_ENABLED 0x00000001 /* DTA is enabled */
-/* Automatically start discovery when NFC is enabled */
-#define NFA_DTA_FL_AUTOSTART 0x00000002
-/* DTA is stopping (NFA_DtaStop called) */
-#define NFA_DTA_FL_STOPPING 0x00000004
-/* DTA is being disabled (NFA_DtaDisable called) */
-#define NFA_DTA_FL_DISABLING 0x00000008
-/* T4T/NFCDEP is deactivating to IDLE (need to DESELECT first) */
-#define NFA_DTA_FL_T4T_DESELECT_DEACT 0x00000010
-
 /* DTA control block */
 typedef struct {
   uint32_t dta_flags; /* dta_flags must be first item in structure (statically
@@ -293,11 +259,6 @@
   uint16_t llcp_co_out_remote_miu; /* MIU of LT-CO-OUT-DEST */
   uint8_t llcp_co_out_remote_rw;   /* RW of LT-CO-OUT-DEST  */
 
-/* establishing outbound on connection-oriented */
-#define NFA_DTA_LLCP_FLAGS_CO_OUT_CONNECTING 0x01
-/* established outbound on connection-oriented  */
-#define NFA_DTA_LLCP_FLAGS_CO_OUT_CONNECTED 0x02
-
   uint8_t llcp_flags;      /* internal flags for LLCP echo test */
   uint8_t llcp_sdp_tid_cl; /* SDP transaction ID for outbound connectionless */
   uint8_t
diff --git a/src/nfa/include/nfa_ee_api.h b/src/nfa/include/nfa_ee_api.h
index e9e7022..6b344f9 100644
--- a/src/nfa/include/nfa_ee_api.h
+++ b/src/nfa/include/nfa_ee_api.h
@@ -33,7 +33,6 @@
 *****************************************************************************/
 /* 16 per ISO 7816 specification    */
 #define NFA_MAX_AID_LEN NFC_MAX_AID_LEN
-#define NFA_EE_HANDLE_DH (NFA_HANDLE_GROUP_EE | NFC_DH_ID)
 
 /* NFA EE callback events */
 enum {
@@ -65,26 +64,10 @@
 typedef uint8_t tNFA_EE_EVT;
 
 /* tNFA_NFCEE_INTERFACE values */
-/* APDU Interface       */
-#define NFA_EE_INTERFACE_APDU NFC_NFCEE_INTERFACE_APDU
 /* HCI Access Interface*/
 #define NFA_EE_INTERFACE_HCI_ACCESS NFC_NFCEE_INTERFACE_HCI_ACCESS
-/* T3T Command Interface*/
-#define NFA_EE_INTERFACE_T3T NFC_NFCEE_INTERFACE_T3T
-/* Transparent Interface*/
-#define NFA_EE_INTERFACE_TRANSPARENT NFC_NFCEE_INTERFACE_TRANSPARENT
-/* Proprietary          */
-#define NFA_EE_INTERFACE_PROPRIETARY NFC_NFCEE_INTERFACE_PROPRIETARY
 typedef uint8_t tNFA_EE_INTERFACE;
 
-/* HW/Registration ID   */
-#define NFA_EE_TAG_HW_ID NFC_NFCEE_TAG_HW_ID
-/* ATR Bytes            */
-#define NFA_EE_TAG_ATR_BYTES NFC_NFCEE_TAG_ATR_BYTES
-/* T3T Supplement. Info */
-#define NFA_EE_TAG_T3T_INFO NFC_NFCEE_TAG_T3T_INFO
-/* Broadcom Proprietary */
-#define NFA_EE_TAG_HCI_HOST_ID NFC_NFCEE_TAG_HCI_HOST_ID
 typedef uint8_t tNFA_EE_TAG;
 
 /* for NFA_EeModeSet () */
@@ -98,9 +81,6 @@
 #define NFA_EE_PWR_STATE_SWITCH_OFF 0x02
 /* The device's battery is removed  */
 #define NFA_EE_PWR_STATE_BATT_OFF 0x04
-/* used to remove a particular technology or protocol based routing cfg of a
- * handle from the routing table. */
-#define NFA_EE_PWR_STATE_NONE 0
 typedef uint8_t tNFA_EE_PWR_STATE;
 
 /* NFCEE connected and inactive */
@@ -111,10 +91,6 @@
 #define NFA_EE_STATUS_REMOVED NFC_NFCEE_STATUS_REMOVED
 /* waiting for response from NFCC */
 #define NFA_EE_STATUS_PENDING 0x10
-#define NFA_EE_STATUS_ACTIVATING \
-  (NFA_EE_STATUS_PENDING + NFC_NFCEE_STATUS_ACTIVE)
-#define NFA_EE_STATUS_DEACTIVATING \
-  (NFA_EE_STATUS_PENDING + NFC_NFCEE_STATUS_INACTIVE)
 typedef uint8_t tNFA_EE_STATUS;
 
 /* additional NFCEE Info */
@@ -148,14 +124,6 @@
       ee_interface; /* NFCEE interface associated with this connection  */
 } tNFA_EE_CONNECT;
 
-/* ISO 7816-4 SELECT command */
-#define NFA_EE_TRGR_SELECT NFC_EE_TRIG_SELECT
-/* RF Protocol changed       */
-#define NFA_EE_TRGR_RF_PROTOCOL NFC_EE_TRIG_RF_PROTOCOL
-/* RF Technology changed     */
-#define NFA_EE_TRGR_RF_TECHNOLOGY NFC_EE_TRIG_RF_TECHNOLOGY
-/* Application initiation    */
-#define NFA_EE_TRGR_APP_INIT NFC_EE_TRIG_APP_INIT
 typedef tNFC_EE_TRIGGER tNFA_EE_TRIGGER;
 
 /* Union of NFCEE action parameter depending on the associated trigger */
diff --git a/src/nfa/include/nfa_ee_int.h b/src/nfa/include/nfa_ee_int.h
index 65ea748..7f7fb5b 100644
--- a/src/nfa/include/nfa_ee_int.h
+++ b/src/nfa/include/nfa_ee_int.h
@@ -103,7 +103,6 @@
 typedef uint8_t tNFA_EE_CONN_ST;
 
 #define NFA_EE_MAX_AID_CFG_LEN (510)
-#define NFA_EE_7816_STATUS_LEN (2)
 
 /* NFA EE control block flags:
  * use to indicate an API function has changed the configuration of the
@@ -377,7 +376,6 @@
 
 /* the following status are the definition used in ee_cfg_sts */
 #define NFA_EE_STS_CHANGED_ROUTING 0x01
-#define NFA_EE_STS_CHANGED_VS 0x02
 #define NFA_EE_STS_CHANGED 0x0f
 #define NFA_EE_STS_PREV_ROUTING 0x10
 #define NFA_EE_STS_PREV 0xf0
@@ -434,8 +432,6 @@
 
 /* Order of Routing entries in Routing Table */
 #define NCI_ROUTE_ORDER_AID 0x01        /* AID routing order */
-#define NCI_ROUTE_ORDER_PATTERN 0x02    /* Pattern routing order*/
-#define NCI_ROUTE_ORDER_SYS_CODE 0x03   /* System Code routing order*/
 #define NCI_ROUTE_ORDER_PROTOCOL 0x04   /* Protocol routing order*/
 #define NCI_ROUTE_ORDER_TECHNOLOGY 0x05 /* Technology routing order*/
 
diff --git a/src/nfa/include/nfa_hci_defs.h b/src/nfa/include/nfa_hci_defs.h
index 981febb..2737531 100644
--- a/src/nfa/include/nfa_hci_defs.h
+++ b/src/nfa/include/nfa_hci_defs.h
@@ -31,7 +31,6 @@
 #define NFA_HCI_IDENTITY_MANAGEMENT_GATE 0x05
 
 #define NFA_HCI_FIRST_HOST_SPECIFIC_GENERIC_GATE 0x10
-#define NFA_HCI_LAST_HOST_SPECIFIC_GENERIC_GATE 0xEF
 #define NFA_HCI_FIRST_PROP_GATE 0xF0
 #define NFA_HCI_LAST_PROP_GATE 0xFF
 
@@ -52,8 +51,6 @@
 
 /* host_table */
 #define NFA_HCI_HOST_CONTROLLER 0x00
-#define NFA_HCI_DH_HOST 0x01
-#define NFA_HCI_UICC_HOST 0x02
 
 /* Type of instruction */
 #define NFA_HCI_COMMAND_TYPE 0x00
@@ -109,13 +106,9 @@
 
 /* Host controller Admin gate registry identifiers */
 #define NFA_HCI_SESSION_IDENTITY_INDEX 0x01
-#define NFA_HCI_MAX_PIPE_INDEX 0x02
 #define NFA_HCI_WHITELIST_INDEX 0x03
 #define NFA_HCI_HOST_LIST_INDEX 0x04
 
-/* Host controller and DH Link management gate registry identifier */
-#define NFA_HCI_REC_ERROR_INDEX 0x02
-
 /* DH Identity management gate registry identifier */
 #define NFA_HCI_VERSION_SW_INDEX 0x01
 #define NFA_HCI_VERSION_HW_INDEX 0x03
diff --git a/src/nfa/include/nfa_hci_int.h b/src/nfa/include/nfa_hci_int.h
index 9a26511..bfd4c7c 100644
--- a/src/nfa/include/nfa_hci_int.h
+++ b/src/nfa/include/nfa_hci_int.h
@@ -42,8 +42,6 @@
 #define NFA_HCI_LAST_HOST_SPECIFIC_GATE 0xEF
 
 #define NFA_HCI_SESSION_ID_LEN 8 /* HCI Session ID length */
-/* Maximum pipes that can be created on a generic pipe  */
-#define NFA_MAX_PIPES_IN_GENERIC_GATE 0x0F
 
 /* HCI SW Version number                       */
 #define NFA_HCI_VERSION_SW 0x090000
@@ -81,8 +79,6 @@
 #define NFA_HCI_PIPE_CLOSED 0x00 /* Pipe is closed */
 #define NFA_HCI_PIPE_OPENED 0x01 /* Pipe is opened */
 
-#define NFA_HCI_INVALID_INX 0xFF
-
 typedef uint8_t tNFA_HCI_COMMAND;
 typedef uint8_t tNFA_HCI_RESPONSE;
 
@@ -359,11 +355,6 @@
   uint8_t hci_version;     /* HCI Version */
 } tNFA_ID_MGMT_GATE_INFO;
 
-/* Internal flags */
-/* sub system is being disabled */
-#define NFA_HCI_FL_DISABLING 0x01
-#define NFA_HCI_FL_NV_CHANGED 0x02 /* NV Ram changed */
-
 /* NFA HCI control block */
 typedef struct {
   tNFA_HCI_STATE hci_state; /* state of the HCI */
diff --git a/src/nfa/include/nfa_nv_co.h b/src/nfa/include/nfa_nv_co.h
index e183c3e..0f32e9c 100644
--- a/src/nfa/include/nfa_nv_co.h
+++ b/src/nfa/include/nfa_nv_co.h
@@ -41,22 +41,12 @@
  * status */
 #define NFA_NV_CO_OK 0x00
 #define NFA_NV_CO_FAIL 0x01 /* Used to pass all other errors */
-#define NFA_NV_CO_EACCES 0x02
-#define NFA_NV_CO_ENOTEMPTY 0x03
-#define NFA_NV_CO_EOF 0x04
-#define NFA_NV_CO_EODIR 0x05
-#define NFA_NV_CO_ENOSPACE 0x06 /* Returned in nfa_nv_ci_open if no room */
-#define NFA_NV_CO_EIS_DIR 0x07
-#define NFA_NV_CO_RESUME 0x08 /* used in nfa_nv_ci_open, on resume */
-/* used in nfa_nv_ci_open, on resume (no file to resume) */
-#define NFA_NV_CO_NONE 0x09
 
 typedef uint8_t tNFA_NV_CO_STATUS;
 
 #define DH_NV_BLOCK 0x01
 #define HC_F3_NV_BLOCK 0x02
 #define HC_F4_NV_BLOCK 0x03
-#define HC_DH_NV_BLOCK 0x04
 #define HC_F5_NV_BLOCK 0x05
 
 /*****************************************************************************
diff --git a/src/nfa/include/nfa_p2p_api.h b/src/nfa/include/nfa_p2p_api.h
index 49b9abd..bcfc234 100644
--- a/src/nfa/include/nfa_p2p_api.h
+++ b/src/nfa/include/nfa_p2p_api.h
@@ -41,12 +41,8 @@
   0x02 /* no service bound in remote      */
 #define NFA_P2P_DISC_REASON_REMOTE_REJECT \
   0x03 /* remote rejected connection      */
-#define NFA_P2P_DISC_REASON_FRAME_ERROR \
-  0x04 /* sending or receiving FRMR PDU   */
 #define NFA_P2P_DISC_REASON_LLCP_DEACTIVATED \
   0x05 /* LLCP link deactivated           */
-#define NFA_P2P_DISC_REASON_NO_RESOURCE \
-  0x06 /* Out of resource in local device */
 #define NFA_P2P_DISC_REASON_NO_INFORMATION \
   0x80 /* Without information             */
 
@@ -79,16 +75,6 @@
 #define NFA_P2P_ANY_SAP LLCP_INVALID_SAP
 #define NFA_P2P_INVALID_SAP LLCP_INVALID_SAP
 
-/* Recommanded MIU's for connection-oriented */
-#define NFA_P2P_MIU_1 \
-  (NCI_NFC_DEP_MAX_DATA - LLCP_PDU_HEADER_SIZE - LLCP_SEQUENCE_SIZE)
-#define NFA_P2P_MIU_2 \
-  (2 * NCI_NFC_DEP_MAX_DATA - LLCP_PDU_HEADER_SIZE - LLCP_SEQUENCE_SIZE)
-#define NFA_P2P_MIU_3 \
-  (3 * NCI_NFC_DEP_MAX_DATA - LLCP_PDU_HEADER_SIZE - LLCP_SEQUENCE_SIZE)
-#define NFA_P2P_MIU_8 \
-  (8 * NCI_NFC_DEP_MAX_DATA - LLCP_PDU_HEADER_SIZE - LLCP_SEQUENCE_SIZE)
-
 #define NFA_P2P_LLINK_TYPE LLCP_LINK_TYPE_LOGICAL_DATA_LINK
 #define NFA_P2P_DLINK_TYPE LLCP_LINK_TYPE_DATA_LINK_CONNECTION
 typedef uint8_t tNFA_P2P_LINK_TYPE;
diff --git a/src/nfa/include/nfa_snep_api.h b/src/nfa/include/nfa_snep_api.h
index ca1dc07..bb711c1 100644
--- a/src/nfa/include/nfa_snep_api.h
+++ b/src/nfa/include/nfa_snep_api.h
@@ -30,36 +30,15 @@
 /*****************************************************************************
 **  Constants and data types
 *****************************************************************************/
-#define NFA_SNEP_VERSION 0x10 /* SNEP Version 1.0          */
 
-/* send remaining fragments         */
-#define NFA_SNEP_REQ_CODE_CONTINUE 0x00
 /* return an NDEF message           */
 #define NFA_SNEP_REQ_CODE_GET 0x01
 /* accept an NDEF message           */
 #define NFA_SNEP_REQ_CODE_PUT 0x02
 /* do not send remaining fragments  */
-#define NFA_SNEP_REQ_CODE_REJECT 0x7F
 
 #define tNFA_SNEP_REQ_CODE uint8_t
 
-/* continue send remaining fragments    */
-#define NFA_SNEP_RESP_CODE_CONTINUE 0x80
-/* the operation succeeded              */
-#define NFA_SNEP_RESP_CODE_SUCCESS 0x81
-/* resource not found                   */
-#define NFA_SNEP_RESP_CODE_NOT_FOUND 0xC0
-/* resource exceeds data size limit     */
-#define NFA_SNEP_RESP_CODE_EXCESS_DATA 0xC1
-/* malformed request not understood     */
-#define NFA_SNEP_RESP_CODE_BAD_REQ 0xC2
-/* unsupported functionality requested  */
-#define NFA_SNEP_RESP_CODE_NOT_IMPLM 0xE0
-/* unsupported protocol version         */
-#define NFA_SNEP_RESP_CODE_UNSUPP_VER 0xE1
-/* do not send remaining fragments      */
-#define NFA_SNEP_RESP_CODE_REJECT 0xFF
-
 #define tNFA_SNEP_RESP_CODE uint8_t
 
 /* NFA SNEP callback events */
@@ -89,15 +68,8 @@
 /* GET response sent to client          */
 #define NFA_SNEP_GET_RESP_CMPL_EVT 0x0B
 
-/* SNEP default server is started       */
-#define NFA_SNEP_DEFAULT_SERVER_STARTED_EVT 0x0C
-/* SNEP default server is stopped       */
-#define NFA_SNEP_DEFAULT_SERVER_STOPPED_EVT 0x0D
-
 typedef uint8_t tNFA_SNEP_EVT;
 
-#define NFA_SNEP_ANY_SAP LLCP_INVALID_SAP
-
 /* Data for NFA_SNEP_REG_EVT */
 typedef struct {
   tNFA_STATUS status;
diff --git a/src/nfa/include/nfa_snep_int.h b/src/nfa/include/nfa_snep_int.h
index cff4710..bc2b3d9 100644
--- a/src/nfa/include/nfa_snep_int.h
+++ b/src/nfa/include/nfa_snep_int.h
@@ -31,11 +31,7 @@
 /*****************************************************************************
 **  Constants and data types
 *****************************************************************************/
-#define NFA_SNEP_DEFAULT_SERVER_SAP 0x04 /* SNEP default server SAP   */
-#define NFA_SNEP_HEADER_SIZE 6           /* SNEP header size          */
 /* SNEP Acceptable Length size */
-#define NFA_SNEP_ACCEPT_LEN_SIZE 4
-#define NFA_SNEP_CLIENT_TIMEOUT 1000 /* ms, waiting for response  */
 
 /* NFA SNEP events */
 enum {
@@ -157,17 +153,10 @@
 
 /* NFA SNEP service control block */
 /* ignore flags while searching   */
-#define NFA_SNEP_FLAG_ANY 0x00
-#define NFA_SNEP_FLAG_SERVER 0x01 /* server */
-#define NFA_SNEP_FLAG_CLIENT 0x02 /* client */
 /* waiting for connection confirm */
-#define NFA_SNEP_FLAG_CONNECTING 0x04
 /* data link connected            */
-#define NFA_SNEP_FLAG_CONNECTED 0x08
 /* Waiting for continue response  */
-#define NFA_SNEP_FLAG_W4_RESP_CONTINUE 0x10
 /* Waiting for continue request   */
-#define NFA_SNEP_FLAG_W4_REQ_CONTINUE 0x20
 
 typedef struct {
   uint8_t local_sap;        /* local SAP of service */
diff --git a/src/nfc/include/ce_api.h b/src/nfc/include/ce_api.h
index 680493a..b4ff029 100644
--- a/src/nfc/include/ce_api.h
+++ b/src/nfc/include/ce_api.h
@@ -49,8 +49,6 @@
   CE_T4T_MAX_EVT
 };
 
-#define CE_RAW_FRAME_EVT 0xFF
-
 typedef uint8_t tCE_EVENT;
 
 typedef struct {
diff --git a/src/nfc/include/ce_int.h b/src/nfc/include/ce_int.h
index 9ae7119..1a48a36 100644
--- a/src/nfc/include/ce_int.h
+++ b/src/nfc/include/ce_int.h
@@ -36,9 +36,6 @@
 #define CE_MAX_SUP_PROTO NCI_PROTOCOL_MIFARE
 #endif
 
-/* 2^8=256. CB use uint8_t for BytesPerPage, so max is 7 */
-#define CE_MAX_BYTE_PER_PAGE 7
-
 /* CE Type 3 Tag structures */
 
 /* Type 3 Tag NDEF card-emulation */
diff --git a/src/nfc/include/llcp_api.h b/src/nfc/include/llcp_api.h
index 84d2e56..b71fca4 100644
--- a/src/nfc/include/llcp_api.h
+++ b/src/nfc/include/llcp_api.h
@@ -87,8 +87,6 @@
 #define LLCP_LINK_VERSION_FAILED 0x01
 /* Failed to parse received general bytes   */
 #define LLCP_LINK_BAD_GEN_BYTES 0x02
-/* internal error                           */
-#define LLCP_LINK_INTERNAL_ERROR 0x03
 /* Link has been deactivated by local       */
 #define LLCP_LINK_LOCAL_INITIATED 0x04
 /* Link has been deactivated by remote      */
@@ -99,9 +97,6 @@
 #define LLCP_LINK_FRAME_ERROR 0x07
 /* RF link loss without any rx LLC PDU      */
 #define LLCP_LINK_RF_LINK_LOSS_NO_RX_LLC 0x08
-#define LLCP_LINK_RF_TRANSMISSION_ERR NFC_STATUS_RF_TRANSMISSION_ERR
-#define LLCP_LINK_RF_PROTOCOL_ERR NFC_STATUS_RF_PROTOCOL_ERR
-#define LLCP_LINK_RF_TIMEOUT NFC_STATUS_TIMEOUT
 #define LLCP_LINK_RF_LINK_LOSS_ERR NFC_STATUS_LINK_LOSS
 
 typedef void(tLLCP_LINK_CBACK)(uint8_t event, uint8_t reason);
diff --git a/src/nfc/include/llcp_defs.h b/src/nfc/include/llcp_defs.h
index ba25710..f79c029 100644
--- a/src/nfc/include/llcp_defs.h
+++ b/src/nfc/include/llcp_defs.h
@@ -52,12 +52,9 @@
 #define LLCP_PDU_DM_TYPE 7
 #define LLCP_PDU_FRMR_TYPE 8
 #define LLCP_PDU_SNL_TYPE 9
-#define LLCP_PDU_RESERVED_1010 10
-#define LLCP_PDU_RESERVED_1011 11
 #define LLCP_PDU_I_TYPE 12
 #define LLCP_PDU_RR_TYPE 13
 #define LLCP_PDU_RNR_TYPE 14
-#define LLCP_PDU_RESERVED_1111 15
 
 #define LLCP_PDU_SYMM_SIZE 2
 #define LLCP_PDU_DISC_SIZE 2
@@ -81,16 +78,6 @@
 #define LLCP_FRMR_R_ERROR_FLAG 0x02 /* Receive Sequence Error */
 #define LLCP_FRMR_S_ERROR_FLAG 0x01 /* Send Sequence Error */
 
-#define LLCP_GET_FRMR_W_ERROR_FLAG(u8) (((uint8_t)(u8) >> 7) & 0x01)
-#define LLCP_GET_FRMR_I_ERROR_FLAG(u8) (((uint8_t)(u8) >> 6) & 0x01)
-#define LLCP_GET_FRMR_R_ERROR_FLAG(u8) (((uint8_t)(u8) >> 5) & 0x01)
-#define LLCP_GET_FRMR_S_ERROR_FLAG(u8) (((uint8_t)(u8) >> 4) & 0x01)
-#define LLCP_GET_FRMR_PTYPE(u8) ((uint8_t)(u8)&0x0F)
-#define LLCP_GET_FRMR_VS(u16) (((uint16_t)(u16) >> 12) & 0x000F)
-#define LLCP_GET_FRMR_VR(u16) (((uint16_t)(u16) >> 8) & 0x000F)
-#define LLCP_GET_FRMR_VSA(u16) (((uint16_t)(u16) >> 4) & 0x000F)
-#define LLCP_GET_FRMR_VRA(u16) (((uint16_t)(u16) >> 0) & 0x000F)
-
 /*
 ** LLCP Parameter Descriptions
 */
@@ -122,21 +109,10 @@
 
 /* Well-Known Service Bitmap */
 #define LLCP_WKS_MASK_LM 0x0001  /* Link Management */
-#define LLCP_WKS_MASK_SDP 0x0002 /* Service Discovery "urn:nfc:sn:sdp" */
-#define LLCP_WKS_MASK_IP 0x0004  /* IP over LLCP Binding "urn:nfc:sn:ip" */
-/* OBEX over LLCP Binding "urn:nfc:sn:obex" */
-#define LLCP_WKS_MASK_OBEX 0x0008
-/* Simple NDEP Exchange Protocol "urn:nfc:sn:snep" */
-#define LLCP_WKS_MASK_SNEP 0x0010
 
 /* Well-Known Service Access Points */
 #define LLCP_SAP_LM 0x00  /* Link Management */
 #define LLCP_SAP_SDP 0x01 /* Service Discovery "urn:nfc:sn:sdp" */
-#define LLCP_SAP_IP 0x02  /* IP over LLCP Binding "urn:nfc:sn:ip" */
-/* OBEX over LLCP Binding "urn:nfc:sn:obex" */
-#define LLCP_SAP_OBEX 0x03
-/* Simple NDEP Exchange Protocol "urn:nfc:sn:snep" */
-#define LLCP_SAP_SNEP 0x04
 
 /* Link Timeout, LTO */
 #define LLCP_LTO_TYPE 0x04
@@ -157,7 +133,6 @@
 /* Option, OPT */
 #define LLCP_OPT_TYPE 0x07
 #define LLCP_OPT_LEN 0x01
-#define LLCP_GET_OPT_LSC(u8) ((uint8_t)(u8)&0x03)
 
 /* Service Discovery Request, SDREQ */
 #define LLCP_SDREQ_TYPE 0x08
@@ -182,7 +157,6 @@
 #define LLCP_SEQ_MODULO 16
 
 #define LLCP_NUM_SAPS 64
-#define LLCP_LOWER_BOUND_WK_SAP 0x00
 #define LLCP_UPPER_BOUND_WK_SAP 0x0F
 #define LLCP_LOWER_BOUND_SDP_SAP 0x10
 #define LLCP_UPPER_BOUND_SDP_SAP 0x1F
@@ -192,10 +166,6 @@
 /* Max Payload */
 /* Maximum Payload size, Length Reduction LRi/LRt */
 #define LLCP_NCI_MAX_PAYL_SIZE 254
-/* Data exchange protocol header, 3 bytes */
-#define LLCP_NFC_DEP_HEADER_SIZE 3
-#define LLCP_MAX_PAYLOAD_SIZE \
-  (LLCP_NCI_MAX_PAYL_SIZE - LLCP_NFC_DEP_HEADER_SIZE)
 
 #define LLCP_MAX_GEN_BYTES 48
 
diff --git a/src/nfc/include/ndef_utils.h b/src/nfc/include/ndef_utils.h
index c70a787..00150cf 100644
--- a/src/nfc/include/ndef_utils.h
+++ b/src/nfc/include/ndef_utils.h
@@ -68,15 +68,6 @@
 };
 typedef uint8_t tNDEF_STATUS;
 
-#define HR_REC_TYPE_LEN 2        /* Handover Request Record Type     */
-#define HS_REC_TYPE_LEN 2        /* Handover Select Record Type      */
-#define HC_REC_TYPE_LEN 2        /* Handover Carrier recrod Type     */
-#define CR_REC_TYPE_LEN 2        /* Collision Resolution Record Type */
-#define AC_REC_TYPE_LEN 2        /* Alternative Carrier Record Type  */
-#define ERR_REC_TYPE_LEN 3       /* Error Record Type                */
-#define BT_OOB_REC_TYPE_LEN 32   /* Bluetooth OOB Data Type          */
-#define WIFI_WSC_REC_TYPE_LEN 23 /* Wifi WSC Data Type               */
-
 /* Functions to parse a received NDEF Message
 */
 /*******************************************************************************
diff --git a/src/nfc/include/nfc_api.h b/src/nfc/include/nfc_api.h
index 02401ec..2014e43 100644
--- a/src/nfc/include/nfc_api.h
+++ b/src/nfc/include/nfc_api.h
@@ -113,51 +113,22 @@
  * NFC Config Parameter IDs defined by NCI
  **********************************************/
 #define NFC_PMID_TOTAL_DURATION NCI_PARAM_ID_TOTAL_DURATION
-#define NFC_PMID_CON_DEVICES_LIMIT NCI_PARAM_ID_CON_DEVICES_LIMIT
-#define NFC_PMID_PA_BAILOUT NCI_PARAM_ID_PA_BAILOUT
-#define NFC_PMID_CON_DISCOVERY_PARAM NCI_PARAM_ID_CON_DISCOVERY_PARAM
-#define NFC_PMID_PB_AFI NCI_PARAM_ID_PB_AFI
-#define NFC_PMID_PB_BAILOUT NCI_PARAM_ID_PB_BAILOUT
-#define NFC_PMID_PB_ATTRIB_PARAM1 NCI_PARAM_ID_PB_ATTRIB_PARAM1
-#define NFC_PMID_PF_BIT_RATE NCI_PARAM_ID_PF_BIT_RATE
 #define NFC_PMID_PF_RC NCI_PARAM_ID_PF_RC
-#define NFC_PMID_PB_H_INFO NCI_PARAM_ID_PB_H_INFO
-#define NFC_PMID_BITR_NFC_DEP NCI_PARAM_ID_BITR_NFC_DEP
 #define NFC_PMID_ATR_REQ_GEN_BYTES NCI_PARAM_ID_ATR_REQ_GEN_BYTES
-#define NFC_PMID_ATR_REQ_CONFIG NCI_PARAM_ID_ATR_REQ_CONFIG
 #define NFC_PMID_LA_HIST_BY NCI_PARAM_ID_LA_HIST_BY
 #define NFC_PMID_LA_NFCID1 NCI_PARAM_ID_LA_NFCID1
-#define NFC_PMID_PI_BIT_RATE NCI_PARAM_ID_PI_BIT_RATE
 #define NFC_PMID_LA_BIT_FRAME_SDD NCI_PARAM_ID_LA_BIT_FRAME_SDD
 #define NFC_PMID_LA_PLATFORM_CONFIG NCI_PARAM_ID_LA_PLATFORM_CONFIG
 #define NFC_PMID_LA_SEL_INFO NCI_PARAM_ID_LA_SEL_INFO
-#define NFC_PMID_LI_BIT_RATE NCI_PARAM_ID_LI_BIT_RATE
 #define NFC_PMID_LB_SENSB_INFO NCI_PARAM_ID_LB_SENSB_INFO
-#define NFC_PMID_LB_PROTOCOL NCI_PARAM_ID_LB_PROTOCOL
 #define NFC_PMID_LB_H_INFO NCI_PARAM_ID_LB_H_INFO_RSP
 #define NFC_PMID_LB_NFCID0 NCI_PARAM_ID_LB_NFCID0
 #define NFC_PMID_LB_APPDATA NCI_PARAM_ID_LB_APPDATA
 #define NFC_PMID_LB_SFGI NCI_PARAM_ID_LB_SFGI
 #define NFC_PMID_LB_ADC_FO NCI_PARAM_ID_LB_ADC_FO
 #define NFC_PMID_LF_T3T_ID1 NCI_PARAM_ID_LF_T3T_ID1
-#define NFC_PMID_LF_T3T_ID2 NCI_PARAM_ID_LF_T3T_ID2
-#define NFC_PMID_LF_T3T_ID3 NCI_PARAM_ID_LF_T3T_ID3
-#define NFC_PMID_LF_T3T_ID4 NCI_PARAM_ID_LF_T3T_ID4
-#define NFC_PMID_LF_T3T_ID5 NCI_PARAM_ID_LF_T3T_ID5
-#define NFC_PMID_LF_T3T_ID6 NCI_PARAM_ID_LF_T3T_ID6
-#define NFC_PMID_LF_T3T_ID7 NCI_PARAM_ID_LF_T3T_ID7
-#define NFC_PMID_LF_T3T_ID8 NCI_PARAM_ID_LF_T3T_ID8
-#define NFC_PMID_LF_T3T_ID9 NCI_PARAM_ID_LF_T3T_ID9
-#define NFC_PMID_LF_T3T_ID10 NCI_PARAM_ID_LF_T3T_ID10
-#define NFC_PMID_LF_T3T_ID11 NCI_PARAM_ID_LF_T3T_ID11
-#define NFC_PMID_LF_T3T_ID12 NCI_PARAM_ID_LF_T3T_ID12
-#define NFC_PMID_LF_T3T_ID13 NCI_PARAM_ID_LF_T3T_ID13
-#define NFC_PMID_LF_T3T_ID14 NCI_PARAM_ID_LF_T3T_ID14
-#define NFC_PMID_LF_T3T_ID15 NCI_PARAM_ID_LF_T3T_ID15
-#define NFC_PMID_LF_T3T_ID16 NCI_PARAM_ID_LF_T3T_ID16
 #define NFC_PMID_LF_PROTOCOL NCI_PARAM_ID_LF_PROTOCOL
 #define NFC_PMID_LF_T3T_PMM NCI_PARAM_ID_LF_T3T_PMM
-#define NFC_PMID_LF_T3T_MAX NCI_PARAM_ID_LF_T3T_MAX
 #define NFC_PMID_LF_T3T_FLAGS2 NCI_PARAM_ID_LF_T3T_FLAGS2
 #define NFC_PMID_FWI NCI_PARAM_ID_FWI
 #define NFC_PMID_LF_CON_BITR_F NCI_PARAM_ID_LF_CON_BITR_F
@@ -165,9 +136,6 @@
 #define NFC_PMID_ATR_RES_GEN_BYTES NCI_PARAM_ID_ATR_RES_GEN_BYTES
 #define NFC_PMID_ATR_RSP_CONFIG NCI_PARAM_ID_ATR_RSP_CONFIG
 #define NFC_PMID_RF_FIELD_INFO NCI_PARAM_ID_RF_FIELD_INFO
-#define NFC_PMID_NFC_DEP_OP NCI_PARAM_ID_NFC_DEP_OP
-#define NFC_PARAM_ID_RF_EE_ACTION NCI_PARAM_ID_RF_EE_ACTION
-#define NFC_PARAM_ID_ISO_DEP_OP NCI_PARAM_ID_ISO_DEP_OP
 
 /* Technology based routing  */
 #define NFC_ROUTE_TAG_TECH NCI_ROUTE_TAG_TECH
@@ -175,7 +143,6 @@
 #define NFC_ROUTE_TAG_PROTO NCI_ROUTE_TAG_PROTO
 #define NFC_ROUTE_TAG_AID NCI_ROUTE_TAG_AID /* AID routing */
 /* tag, len, 2 byte value for technology/protocol based routing */
-#define NFC_ROUTE_TLV_ENTRY_SIZE 4
 
 /* For routing */
 #define NFC_DH_ID NCI_DH_ID /* for DH */
@@ -307,11 +274,6 @@
 /* NFCEE removed                */
 #define NFC_NFCEE_STATUS_REMOVED NCI_NFCEE_STS_REMOVED
 
-#define NFC_NFCEE_STS_INTF_ACTIVATION_FAILED \
-  NCI_NFCEE_STS_INTF_ACTIVATION_FAILED
-#define NFC_NFCEE_STS_TRANSMISSION_ERROR NCI_NFCEE_STS_TRANSMISSION_ERROR
-#define NFC_NFCEE_STS_PROTOCOL_ERROR NCI_NFCEE_STS_PROTOCOL_ERROR
-#define NFC_NFCEE_STS_TIMEOUT_ERROR NCI_NFCEE_STS_TIMEOUT_ERROR
 /* the data type associated with NFC_NFCEE_INFO_REVT */
 typedef struct {
   tNFC_STATUS status;    /* The event status - place holder  */
@@ -387,17 +349,12 @@
   tNCI_EE_NTF_STATUS nfcee_status; /* NFCEE status */
 } tNFC_NFCEE_STATUS_REVT;
 /* RF Field Status */
-/* No field generated by remote device  */
-#define NFC_RF_STS_NO_REMOTE NCI_RF_STS_NO_REMOTE
-/* field generated by remote device     */
-#define NFC_RF_STS_REMOTE NCI_RF_STS_REMOTE
 typedef uint8_t tNFC_RF_STS;
 
 /* RF Field Technologies */
 #define NFC_RF_TECHNOLOGY_A NCI_RF_TECHNOLOGY_A
 #define NFC_RF_TECHNOLOGY_B NCI_RF_TECHNOLOGY_B
 #define NFC_RF_TECHNOLOGY_F NCI_RF_TECHNOLOGY_F
-#define NFC_RF_TECHNOLOGY_V NCI_RF_TECHNOLOGY_V
 typedef uint8_t tNFC_RF_TECH;
 
 extern uint8_t NFC_GetNCIVersion();
@@ -447,16 +404,10 @@
 
 /* Select Response codes */
 #define NFC_SEL_RES_NFC_FORUM_T2T 0x00
-#define NFC_SEL_RES_MF_CLASSIC 0x08
 
 /* Bit Rates */
-#define NFC_BIT_RATE_106 NCI_BIT_RATE_106   /* 106 kbit/s */
 #define NFC_BIT_RATE_212 NCI_BIT_RATE_212   /* 212 kbit/s */
 #define NFC_BIT_RATE_424 NCI_BIT_RATE_424   /* 424 kbit/s */
-#define NFC_BIT_RATE_848 NCI_BIT_RATE_848   /* 848 Kbit/s */
-#define NFC_BIT_RATE_1696 NCI_BIT_RATE_1696 /* 1696 Kbit/s*/
-#define NFC_BIT_RATE_3392 NCI_BIT_RATE_3392 /* 3392 Kbit/s*/
-#define NFC_BIT_RATE_6784 NCI_BIT_RATE_6784 /* 6784 Kbit/s*/
 typedef uint8_t tNFC_BIT_RATE;
 
 /**********************************************
@@ -465,11 +416,7 @@
 #define NFC_INTERFACE_EE_DIRECT_RF NCI_INTERFACE_EE_DIRECT_RF
 #define NFC_INTERFACE_FRAME NCI_INTERFACE_FRAME
 #define NFC_INTERFACE_ISO_DEP NCI_INTERFACE_ISO_DEP
-#define NFC_INTERFACE_NDEF NCI_INTERFACE_NDEF
 #define NFC_INTERFACE_NFC_DEP NCI_INTERFACE_NFC_DEP
-#define NFC_INTERFACE_LLCP_LOW NCI_INTERFACE_LLCP_LOW
-#define NFC_INTERFACE_LLCP_HIGH NCI_INTERFACE_LLCP_HIGH
-#define NFC_INTERFACE_VS_T2T_CE NCI_INTERFACE_VS_T2T_CE
 #define NFC_INTERFACE_MIFARE NCI_INTERFACE_VS_MIFARE
 typedef tNCI_INTF_TYPE tNFC_INTF_TYPE;
 
@@ -485,10 +432,6 @@
 /**********************************************
  *  Deactivation Reasons
  **********************************************/
-#define NFC_DEACTIVATE_REASON_DH_REQ NCI_DEACTIVATE_REASON_DH_REQ
-#define NFC_DEACTIVATE_REASON_ENDPOINT_REQ NCI_DEACTIVATE_REASON_ENDPOINT_REQ
-#define NFC_DEACTIVATE_REASON_RF_LINK_LOSS NCI_DEACTIVATE_REASON_RF_LINK_LOSS
-#define NFC_DEACTIVATE_REASON_NFCB_BAD_AFI NCI_DEACTIVATE_REASON_NFCB_BAD_AFI
 #define NFC_DEACTIVATE_REASON_DH_REQ_FAILED NCI_DEACTIVATE_REASON_DH_REQ_FAILED
 typedef uint8_t tNFC_DEACT_REASON;
 
@@ -537,7 +480,6 @@
 } tNFC_EE_ACTION_REVT;
 
 #define NFC_EE_DISC_OP_ADD 0
-#define NFC_EE_DISC_OP_REMOVE 1
 typedef uint8_t tNFC_EE_DISC_OP;
 typedef struct {
   tNFC_EE_DISC_OP op;              /* add or remove this entry         */
@@ -792,30 +734,6 @@
   tNFC_DEACTIVATE_DEVT deactivate;
 } tNFC_DISCOVER;
 
-/* Min TR0 indicates to tag the min delay before responding after the end of
- * command */
-#define NFC_RF_PARAM_MIN_TR0_DEFAULT 0x00
-#define NFC_RF_PARAM_MIN_TR0_48X 0x01 /* 48 x 16/fc */
-#define NFC_RF_PARAM_MIN_TR0_16X 0x02 /* 16 x 16/fc */
-
-/* Min TR1 indicates to tag the min delay between subcarrier modulation and data
- * transmission */
-#define NFC_RF_PARAM_MIN_TR1_DEFAULT 0x00
-#define NFC_RF_PARAM_MIN_TR1_64X 0x01 /* 64 x 16/fc */
-#define NFC_RF_PARAM_MIN_TR1_16X 0x02 /* 16 x 16/fc */
-
-/* Min TR2 indicates to RW the min delay between EoS of tag and SoS of RW */
-#define NFC_RF_PARAM_MIN_TR2_1792 0x00 /* 1792/fc (10etu + 32/fc) */
-#define NFC_RF_PARAM_MIN_TR2_3328 0x01 /* 3328/fc (10etu + 128/fc) */
-#define NFC_RF_PARAM_MIN_TR2_5376 0x02 /* 5376/fc (10etu + 256/fc) */
-#define NFC_RF_PARAM_MIN_TR2_9472 0x03 /* 9472/fc (10etu + 512/fc) */
-
-#define NFC_RF_PARAM_EOS_REQUIRED 0x00     /* EoS required */
-#define NFC_RF_PARAM_EOS_NOT_REQUIRED 0x01 /* EoS not required */
-
-#define NFC_RF_PARAM_SOS_REQUIRED 0x00     /* SoS required */
-#define NFC_RF_PARAM_SOS_NOT_REQUIRED 0x01 /* SoS not required */
-
 typedef struct {
   bool include_rf_tech_mode; /* TRUE if including RF Tech and Mode update    */
   tNFC_RF_TECH_N_MODE rf_tech_n_mode; /* RF tech and mode */
diff --git a/src/nfc/include/nfc_int.h b/src/nfc/include/nfc_int.h
index f8b013f..ab1003b 100644
--- a/src/nfc/include/nfc_int.h
+++ b/src/nfc/include/nfc_int.h
@@ -62,7 +62,6 @@
 #define NFC_TTYPE_P2P_PRIO_RESPONSE 110
 /* added for p2p prio logic clenaup */
 #define NFC_TTYPE_P2P_PRIO_LOGIC_CLEANUP 111
-#define NFC_TTYPE_VS_BASE 200
 /* time out for mode set notification */
 #define NFC_MODE_SET_NTF_TIMEOUT 2
 /* NFC Task event messages */
@@ -107,11 +106,9 @@
 #define NFC_FL_WAIT_MODE_SET_NTF 0x0100
 
 #define NFC_PEND_CONN_ID 0xFE
-#define NFC_CONN_ID_INT_MASK 0xF0
 #define NFC_CONN_ID_ID_MASK NCI_CID_MASK
 /* set num_buff to this for no flow control */
 #define NFC_CONN_NO_FC 0xFF
-#define NFC_NCI_CONN_NO_FC 0xFF
 
 #if (NFC_RW_ONLY == FALSE)
 /* only allow the entries that the NFCC can support */
diff --git a/src/nfc/include/nfc_vs.h b/src/nfc/include/nfc_vs.h
index adc2f25..8cedbdd 100644
--- a/src/nfc/include/nfc_vs.h
+++ b/src/nfc/include/nfc_vs.h
@@ -25,17 +25,4 @@
 #ifndef NFC_VS_H_
 #define NFC_VS_H_
 
-// DTA API for MW Version need to change according to release
-#define NXP_EN_PN547C2 0
-#define NXP_EN_PN65T 0
-#define NXP_EN_PN548C2 0
-#define NXP_EN_PN66T 0
-#define NXP_EN_PN551 0
-#define NXP_EN_PN67T 0
-#define NXP_EN_PN553 1
-#define NXP_EN_PN80T 1
-#define NXP_ANDROID_VER (7U)        /* NXP android version */
-#define NFC_NXP_MW_VERSION_MAJ (4U) /* MW Major Version */
-#define NFC_NXP_MW_VERSION_MIN (9U) /* MW Minor Version */
-
 #endif /* NFC_VS_H_ */
diff --git a/src/nfc/include/rw_api.h b/src/nfc/include/rw_api.h
index 12ca5f0..75970e8 100644
--- a/src/nfc/include/rw_api.h
+++ b/src/nfc/include/rw_api.h
@@ -150,8 +150,6 @@
 
 /* options for RW_T4tPresenceCheck  */
 #define RW_T4T_CHK_READ_BINARY_CH0 0
-#define RW_T4T_CHK_READ_BINARY_CH1 1
-#define RW_T4T_CHK_READ_BINARY_CH2 2
 #define RW_T4T_CHK_READ_BINARY_CH3 3
 #define RW_T4T_CHK_EMPTY_I_BLOCK 4
 #define RW_T4T_CHK_ISO_DEP_NAK_PRES_CHK 5
diff --git a/src/nfc/include/rw_int.h b/src/nfc/include/rw_int.h
index 5f8f062..e6d1c71 100644
--- a/src/nfc/include/rw_int.h
+++ b/src/nfc/include/rw_int.h
@@ -31,14 +31,6 @@
 #include "tags_int.h"
 
 /* Proprietary definitions for HR0 and HR1 */
-/* HI NIB Tag                                               */
-#define RW_T1T_HR0_HI_NIB 0xF0
-/* Jewel 64 Tag                                             */
-#define RW_T1T_IS_JEWEL64 0x20
-/* Jewel Tag                                                */
-#define RW_T1T_IS_JEWEL 0x00
-/* TOPAZ Tag                                                */
-#define RW_T1T_IS_TOPAZ 0x10
 /* TOPAZ96 Tag                                              */
 #define RW_T1T_IS_TOPAZ96 0x11
 /* TOPAZ512 Tag                                             */
@@ -257,11 +249,6 @@
 #define T2T_NDEF_DETECTED 0x01
 #define T2T_NDEF_READ 0x02
 
-/* Max offset of an NDEF message in a T2 tag */
-#define T2T_MAX_NDEF_OFFSET 128
-#define T2T_MAX_RESERVED_BYTES_IN_TAG 0x64
-#define T2T_MAX_LOCK_BYTES_IN_TAG 0x64
-
 /* Maximum supported Memory control TLVS in the tag         */
 #define RW_T2T_MAX_MEM_TLVS 0x05
 /* Maximum supported Lock control TLVS in the tag           */
diff --git a/src/nfc/include/tags_defs.h b/src/nfc/include/tags_defs.h
index 6ac16ed..3494827 100644
--- a/src/nfc/include/tags_defs.h
+++ b/src/nfc/include/tags_defs.h
@@ -81,27 +81,17 @@
 /* HRO value to indicate static Tag               */
 #define T1T_STATIC_HR0 0x11
 /* 0x1y, as long as (y!=1)                        */
-#define T1T_DYNAMIC_HR0 0x12
 /* HR0 value is 0x1y, indicates NDEF supported    */
 #define T1T_NDEF_SUPPORTED 0x10
-/* should be ignored                              */
-#define T1T_HR1 0x00
 /* UID block                                      */
 #define T1T_UID_BLOCK 0x00
 /* Reserved block                                 */
 #define T1T_RES_BLOCK 0x0D
 /* Static lock block                              */
 #define T1T_LOCK_BLOCK 0x0E
-/* Manufacturer ID offset                         */
-#define T1T_MID_OFFSET 0x06
-/* Reserved bytes offset                          */
-#define T1T_STATIC_RES_OFFSET 0x68
 /* Static lock offset                             */
 #define T1T_LOCK_0_OFFSET 0x70
-/* Static lock offset                             */
-#define T1T_LOCK_1_OFFSET 0x71
 /* Block F - typically used for dynamic locks     */
-#define T1T_DYNAMIC_LOCK_OFFSET 0x78
 #define T1T_DYNAMIC_LOCK_BYTES 0x08
 
 /* the len of reserved byte in T1T block 0        */
@@ -115,10 +105,6 @@
 /* CC offset */
 /* Offset for NDEF magic number in CC             */
 #define T1T_CC_NMN_OFFSET 0x00
-/* Offset for Version number in CC                */
-#define T1T_CC_VNO_OFFSET 0x01
-/* Offset for Tag memory size in CC               */
-#define T1T_CC_TMS_OFFSET 0x02
 /* Offset for Read/Write access in CC             */
 #define T1T_CC_RWA_OFFSET 0x03
 /* NDEF Magic Number byte number                  */
@@ -135,26 +121,11 @@
 #define T1T_CC_LEGACY_VNO 0x10
 /* Version Number                                 */
 #define T1T_CC_VNO 0x11
-/* TMS static memory - (8 * (n+1)).               */
-#define T1T_CC_TMS_STATIC 0x0E
 /* RWA - Read/write allowed                       */
 #define T1T_CC_RWA_RW 0x00
 /* RWA - Read only                                */
 #define T1T_CC_RWA_RO 0x0F
 
-/* May be used for padding. SHALL ignore this     */
-#define T1T_TAG_NULL 0
-/* Defines details of the lock bytes              */
-#define T1T_TAG_LOCK_CTRL 1
-/* Identifies reserved memory areas               */
-#define T1T_TAG_MEM_CTRL 2
-/* Contains the NDEF message                      */
-#define T1T_TAG_NDEF 3
-/* Tag proprietary information                    */
-#define T1T_TAG_PROPRIETARY 0xFD
-/* Last TLV block in the data area                */
-#define T1T_TAG_TERMINATOR 0xFE
-
 /* Tlv len for LOCK_CTRL/MEM TLV per spec         */
 #define T1T_DEFAULT_TLV_LEN 3
 /* Tlv type identifier len                        */
@@ -177,7 +148,6 @@
 /* Byte 0 in Length field to indicate LNDEF*/
 #define T1T_LONG_NDEF_LEN_FIELD_BYTE0 0xFF
 /* Min. len of NDEF to qualify as LNDEF  */
-#define T1T_LONG_NDEF_MIN_LEN 0x00FF
 
 /* Type 1 Tag Commands (7 bits) */
 /* read id                                      */
@@ -204,43 +174,27 @@
 /* Number of static lock bytes in tag   */
 #define T1T_NUM_STATIC_LOCK_BYTES 2
 /* Bytes locked by one static lock bit  */
-#define T1T_BYTES_LOCKED_BY_STATIC_LOCK_BIT 4
 
 /* Type 2 Tag related definitions */
-#define T2T_STATIC_MEM_STR 0
-#define T2T_DYNAMIC_MEM_STR 1
 #define T2T_STATIC_SIZE 64
-#define T2T_STATIC_BLOCKS 16 /* block 0 to Block 15 */
 #define T2T_BLOCK_SIZE 4
-#define T2T_HEADER_BLOCKS 4
 #define T2T_HEADER_SIZE 16
 #define T2T_SECTOR_SIZE 1024
 #define T2T_BLOCKS_PER_SECTOR 0x100
 
 #define T2T_UID_LEN 4        /* the len of UID used in T2T tag */
-#define T2T_BLOCK0_UID_LEN 3 /* the len of UID in Block 0 of T2T tag */
-#define T2T_BCC0_LEN 1       /* the len of BCC0 of T2T tag */
-#define T2T_BLOCK1_UID_LEN 4 /* the len of UID in Block 1 of T2T tag */
-#define T2T_BCC1_LEN 1       /* the len of BCC0 of T2T tag */
 /* the len of Serial number used in T2T tag */
-#define T2T_SNO_LEN 4
 #define T2T_INTERNAL_BYTES_LEN 2 /* the len of internal used in T2T tag */
-/* the len of static lock used in T2T tag */
-#define T2T_STATIC_LOCK_LEN 2
 /* Static Lock Bytes */
 #define T2T_STATIC_LOCK0 0x0A /* Static Lock 0 offset */
 #define T2T_STATIC_LOCK1 0x0B /* Static Lock 1 offset */
 
-/* the len of CC used in T2T tag                  */
-#define T2T_CC_LEN 4
-
 /* Capability Container definitions */
 #define T2T_CC_BLOCK 0x03     /* Capability container block */
 #define T2T_CC0_NMN_BYTE 0x0C /* NDEF Magic Number byte number */
 #define T2T_CC1_VNO_BYTE 0x0D /* Version Number byte number*/
 #define T2T_CC2_TMS_BYTE 0x0E /* Tag Memory Size byte number */
 #define T2T_CC3_RWA_BYTE 0x0F /* Read Write Access byte number */
-#define T2T_DATA_MEM 0x10     /* Data Memory */
 
 #define T2T_CC0_NMN 0xE1        /* NDEF Magic Number */
 #define T2T_CC1_VNO 0x11        /* Version Number */
@@ -260,15 +214,8 @@
 #define T2T_CMD_WRITE 0xA2   /* write 1 block  (4 bytes)  */
 #define T2T_CMD_SEC_SEL 0xC2 /* Sector select             */
 #define T2T_RSP_ACK 0xA
-#define T2T_RSP_NACK5 0x5
-#define T2T_RSP_NACK1 0x1 /* Nack can be either 1    */
 
 #define T2T_STATUS_OK_1_BIT 0x11
-#define T2T_STATUS_OK_2_BIT 0x12
-#define T2T_STATUS_OK_3_BIT 0x13
-#define T2T_STATUS_OK_4_BIT 0x14
-#define T2T_STATUS_OK_5_BIT 0x15
-#define T2T_STATUS_OK_6_BIT 0x16
 #define T2T_STATUS_OK_7_BIT 0x17
 
 #define T2T_FIRST_DATA_BLOCK 4
@@ -279,16 +226,10 @@
 
 /* Type 2 TLV definitions */
 /* May be used for padding. SHALL ignore this */
-#define T2T_TLV_TYPE_NULL 0
 #define T2T_TLV_TYPE_LOCK_CTRL 1      /* Defines details of the lock bytes */
-#define T2T_TLV_TYPE_MEM_CTRL 2       /* Identifies reserved memory areas */
-#define T2T_TLV_TYPE_NDEF 3           /* Contains the NDEF message */
-#define T2T_TLV_TYPE_PROPRIETARY 0xFD /* Tag proprietary information */
-#define T2T_TLV_TYPE_TERMINATOR 0xFE  /* Last TLV block in the data area */
 
 /* Tag len for LOCK_CTRL TLV per spec */
 #define T2T_TLEN_LOCK_CTRL_TLV 3
-#define T2T_TLEN_MEM_CTRL_TLV 3 /* Tag len for MEM_CTRL TLV per spec */
 
 /* Maximum number of sectors supported */
 #if (APPL_DTA_MODE == TRUE)
@@ -299,8 +240,6 @@
 /* Tlv type identifier len                */
 #define T2T_TLV_TYPE_LEN 1
 
-/* Tlv len for LOCK_CTRL/MEM TLV per spec     */
-#define T2T_DEFAULT_TLV_LEN 3
 /* Length Field size of short NDEF Message    */
 #define T2T_SHORT_NDEF_LEN_FIELD_LEN 1
 /* Length Field size of Long NDEF Message     */
@@ -313,11 +252,7 @@
 /* Lock */
 /* Number of static lock bytes in tag   */
 #define T2T_NUM_STATIC_LOCK_BYTES 2
-/* Bytes locked by one static lock bit  */
-#define T2T_BYTES_LOCKED_BY_STATIC_LOCK_BIT 4
 
-#define T2T_CC2_TMS_MUL 0x06
-#define T2T_CC2_TMS_MULC 0x12
 /*
 **
 **  Type 3 Tag Definitions
@@ -339,10 +274,7 @@
 } tT3T_BLOCK_DESC;
 
 /* Poll RC (request code) definitions */
-#define T3T_POLL_RC_NONE 0 /* No RD requested in SENSF_RES */
 #define T3T_POLL_RC_SC 1   /* System code requested in SENSF_RES */
-/* Avanced protocol features requested in SENSF_RES */
-#define T3T_POLL_RC_COMM 2
 typedef uint8_t tT3T_POLL_RC;
 
 /* Definitions for constructing t3t command messages */
@@ -357,7 +289,6 @@
 #define T3T_MSG_OPC_POLL_CMD 0x00
 #define T3T_MSG_OPC_POLL_RSP 0x01
 #define T3T_MSG_OPC_REQ_SERVICE_CMD 0x02
-#define T3T_MSG_OPC_REQ_SERVICE_RSP 0x03
 #define T3T_MSG_OPC_REQ_RESPONSE_CMD 0x04
 #define T3T_MSG_OPC_REQ_RESPONSE_RSP 0x05
 #define T3T_MSG_OPC_REQ_SYSTEMCODE_CMD 0x0C
@@ -375,22 +306,12 @@
 /* Size of NDEF attribute info block (minus checksum) */
 #define T3T_MSG_NDEF_ATTR_INFO_SIZE 14
 
-/* offset of Manufacturer ID in UPDATE/CHECK messages */
-#define T3T_MSG_OFFSET_IDM 1
-/* offset of Number of Services parameter in UPDATE/CHECK messages */
-#define T3T_MSG_OFFSET_NUM_SERVICES 9
-/* offset of Service Code List parameter in UPDATE/CHECK messages */
-#define T3T_MSG_OFFSET_SERVICE_CODE_LIST 10
 /* len flag for Block List Element */
 #define T3T_MSG_MASK_TWO_BYTE_BLOCK_DESC_FORMAT 0x80
 /* service code list mask */
 #define T3T_MSG_SERVICE_LIST_MASK 0x0F
 #define T3T_MSG_SERVICE_LIST_MAX 16
 
-/* Max Number of Services per UPDATE command */
-#define T3T_MSG_NUM_SERVICES_UPDATE_MAX 12
-/* Max Number of Services per CHECK command */
-#define T3T_MSG_NUM_SERVICES_CHECK_MAX 15
 /* Max Number of Blocks per UPDATE command */
 #define T3T_MSG_NUM_BLOCKS_UPDATE_MAX 13
 /* Max Number of Blocks per CHECK command */
@@ -406,8 +327,6 @@
 /* Common header definition for T3t responses */
 /* Common header: rspcode + NFCID2 + StatusFlag1 + StatusFlag2  */
 #define T3T_MSG_RSP_COMMON_HDR_LEN 11
-/* Common header + NumBlocks */
-#define T3T_MSG_RSP_CHECK_HDR_LEN (T3T_MSG_RSP_COMMON_HDR_LEN + 1)
 /* Offset for Response code */
 #define T3T_MSG_RSP_OFFSET_RSPCODE 0
 /* Offset for Manufacturer ID */
@@ -418,22 +337,13 @@
 #define T3T_MSG_RSP_OFFSET_NUMBLOCKS 11
 /* Offset for Block Data (in CHECK response) */
 #define T3T_MSG_RSP_OFFSET_CHECK_DATA 12
-/* Offset for PMm (in POLL response) */
-#define T3T_MSG_RSP_OFFSET_POLL_PMM 9
-/* Offset for RD (in POLL response) */
-#define T3T_MSG_RSP_OFFSET_POLL_RD 17
-/* Offset for Number of Systems */
-#define T3T_MSG_RSP_OFFSET_NUMSYS 9
 
 #define T3T_MSG_RSP_STATUS_OK 0x00
 #define T3T_MSG_RSP_STATUS_ERROR 0x01
 
 #define T3T_MSG_RSP_STATUS2_ERROR_MEMORY 0x70
-#define T3T_MSG_RSP_STATUS2_ERROR_EXCESSIVE_WRITES 0x71
 #define T3T_MSG_RSP_STATUS2_ERROR_PROCESSING 0xFF
 
-/* Maximum payload lenght for NFC-F messages (including SoD) */
-#define T3T_NFC_F_MAX_PAYLOAD_LEN 0xFE
 
 /* Felica Lite defintions */
 /* Block ID for MC (memory configuration)                       */
@@ -442,9 +352,6 @@
 /* Memory Configuration Block offset: MC_SP (Memory Configuration for scratch
  * pad)   */
 #define T3T_MSG_FELICALITE_MC_OFFSET_MC_SP 0x00
-/* Memory Configuration Block offset: MC_ALL (Memory Configuration for system
- * block) */
-#define T3T_MSG_FELICALITE_MC_OFFSET_MC_ALL 0x02
 /* Memory Configuration Block offset: SYS_OP (System Option) */
 #define T3T_MSG_FELICALITE_MC_OFFSET_SYS_OP 0x03
 /* Memory Configuration Block offset: RF_PRM (Memory Configuration for RF
@@ -463,7 +370,6 @@
 #define T4T_VERSION_1_0 0x10 /* version 1.0 */
 #define T4T_MY_VERSION T4T_VERSION_2_0
 #define T4T_GET_MAJOR_VERSION(x) ((x) >> 4)
-#define T4T_GET_MINOR_VERSION(x) ((x)&0x0F)
 
 #define T4T_CMD_CLASS 0x00
 #define T4T_CMD_INS_SELECT 0xA4
@@ -513,8 +419,6 @@
 #define T4T_FC_WRITE_ACCESS_OFFSET_IN_TLV 0x07
 
 #define T4T_NDEF_FILE_CONTROL_TYPE 0x04 /* NDEF File Control Type */
-/* Proprietary File Control Type */
-#define T4T_PROP_FILE_CONTROL_TYPE 0x05
 
 /* size of T(1),L(1),V(6) for file control */
 #define T4T_FILE_CONTROL_TLV_SIZE 0x08
@@ -548,104 +452,48 @@
 **
 */
 
-/* Request flags 1 to 4 definition */
-#define I93_FLAG_SUB_CARRIER_MASK 0x01 /* Sub_carrier_flag */
 /* A single sub-carrier frequency shall be used by VICC */
 #define I93_FLAG_SUB_CARRIER_SINGLE 0x00
-/* Two sub-carriers shall be used by VICC               */
-#define I93_FLAG_SUB_CARRIER_DOUBLE 0x01
 
-#define I93_FLAG_DATA_RATE_MASK 0x02 /* Data_rate_flag */
-/* Low data rate shall be used  */
-#define I93_FLAG_DATA_RATE_LOW 0x00
 /* High data rate shall be used */
 #define I93_FLAG_DATA_RATE_HIGH 0x02
 
-#define I93_FLAG_INVENTORY_MASK 0x04 /* Inventory_flag */
-/* Flags 5 to 8 meaning is according to table 4 */
-#define I93_FLAG_INVENTORY_UNSET 0x00
 /* Flags 5 to 8 meaning is according to table 5 */
 #define I93_FLAG_INVENTORY_SET 0x04
 
-/* Protocol_Extension_flag */
-#define I93_FLAG_PROT_EXT_MASK 0x08
 /* No protocol format extension                         */
 #define I93_FLAG_PROT_EXT_NO 0x00
 /* Protocol format is extended. Reserved for future use */
 #define I93_FLAG_PROT_EXT_YES 0x08
 
-/* Request flags 5 to 6 definition when inventory flag is not set */
-#define I93_FLAG_SELECT_MASK 0x10 /* Select_flag */
-/* Request shall be executed by any VICC according to the setting of
- * Address_flag */
-#define I93_FLAG_SELECT_UNSET 0x00
-/* Request shall be executed only by VICC in selected state */
-#define I93_FLAG_SELECT_SET 0x10
-/* The Address_flag shall be set to 0 and the UID field shall bot be included in
- * the request */
-
-#define I93_FLAG_ADDRESS_MASK 0x20 /* Address_flag */
-/* Request is not addressed. UID field is not included. It shall be executed by
- * any VICC */
-#define I93_FLAG_ADDRESS_UNSET 0x00
 /* Request is addressed. UID field is included. It shall be executed only by
  * VICC */
 #define I93_FLAG_ADDRESS_SET 0x20
 /* whose UID matches the UID specified in the request */
 
-/* Request flags 5 to 6 definition when inventory flag is set */
-#define I93_FLAG_AFI_MASK 0x10 /* AFI_flag */
-/* AFI field is not present */
-#define I93_FLAG_AFI_NOT_PRESENT 0x00
 /* AFI field is present     */
 #define I93_FLAG_AFI_PRESENT 0x10
 
-#define I93_FLAG_SLOT_MASK 0x20 /* Nb_slots_flag */
-#define I93_FLAG_SLOT_16 0x00   /* 16 slots */
 #define I93_FLAG_SLOT_ONE 0x20  /* 1 slot   */
 
-/* Request flags 6 to 8 definition when inventory flag is set or not set */
-
-#define I93_FLAG_OPTION_MASK 0x40 /* Option_flag */
-/* Meaning is defined by the command description. */
-#define I93_FLAG_OPTION_UNSET 0x00
 /* It shall be set to 0 if not otherwise defined by command */
 /* Meaning is defined by the command description. */
 #define I93_FLAG_OPTION_SET 0x40
 
-/* Response flags */
-#define I93_FLAG_ERROR_MASK 0x01 /* Error_flag */
-/* No error                                           */
-#define I93_FLAG_ERORR_NOT_DETECTED 0x00
 /* Error detected, Error code is in the "Error" field */
 #define I93_FLAG_ERROR_DETECTED 0x01
 
 /* Response error code */
-/* The command is not supported, i.e. the request code is not recognized */
-#define I93_ERROR_CODE_NOT_SUPPORTED 0x01
-/* The command is not recognized, for example: a format error occured    */
-#define I93_ERROR_CODE_NOT_RECOGNIZED 0x02
 /* The command option is not supported                                   */
 #define I93_ERROR_CODE_OPTION_NOT_SUPPORTED 0x03
-/* Error with no information given or a specific error code is not supported */
-#define I93_ERROR_CODE_NO_INFO 0x0F
-/* The specific block is not available (doesn't exist)                   */
-#define I93_ERROR_CODE_BLOCK_NOT_AVAILABLE 0x10
-/* The specific block is already locked and thus cannot be locked again  */
-#define I93_ERROR_CODE_BLOCK_ALREADY_LOCKED 0x11
-/* The specific block is locked and its content cannot be changed        */
-#define I93_ERROR_CODE_BLOCK_LOCKED 0x12
 /* The specific block is was not successfully programmed                 */
 #define I93_ERROR_CODE_BLOCK_FAIL_TO_WRITE 0x13
 /* The specific block is was not successfully locked                     */
-#define I93_ERROR_CODE_BLOCK_FAIL_TO_LOCK 0x14
 
 /* UID length in bytes                  */
 #define I93_UID_BYTE_LEN 8
 /* Data Storage Format is not supported */
 #define I93_DFS_UNSUPPORTED 0x00
-/* Block is not locked                  */
-#define I93_BLOCK_UNLOCKED 0x00
 /* Block is locked                      */
 #define I93_BLOCK_LOCKED 0x01
 
@@ -682,13 +530,9 @@
 
 /* Max block size in bytes */
 #define I93_MAX_BLOCK_LENGH 32
-/* Max number of blocks    */
-#define I93_MAX_NUM_BLOCK 256
 
 /* ICODE Capability Container(CC) definition */
 #define I93_ICODE_CC_MAGIC_NUMER 0xE1    /* magic number in CC[0]  */
-#define I93_ICODE_CC_MAJOR_VER_MASK 0xC0 /* major version in CC[1] */
-#define I93_ICODE_CC_MINOR_VER_MASK 0x30 /* minor version in CC[1] */
 /* read access condition in CC[1]        */
 #define I93_ICODE_CC_READ_ACCESS_MASK 0x0C
 /* read access granted without security  */