blob: d7c84d0602ffe9d35da721ea6a1b74e38dfa6de6 [file] [log] [blame]
nxpandroidc7611652015-09-23 16:42:05 +05301/******************************************************************************
2 *
3 * Copyright (C) 2010-2014 Broadcom Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 ******************************************************************************/
18/******************************************************************************
19 *
nxf24591c1cbeab2018-02-21 17:32:26 +053020 * The original Work has been changed by NXP.
nxpandroidc7611652015-09-23 16:42:05 +053021 *
22 * Licensed under the Apache License, Version 2.0 (the "License");
23 * you may not use this file except in compliance with the License.
24 * You may obtain a copy of the License at
25 *
26 * http://www.apache.org/licenses/LICENSE-2.0
27 *
28 * Unless required by applicable law or agreed to in writing, software
29 * distributed under the License is distributed on an "AS IS" BASIS,
30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 * See the License for the specific language governing permissions and
32 * limitations under the License.
33 *
nxf24591c1cbeab2018-02-21 17:32:26 +053034 * Copyright 2018 NXP
35 *
nxpandroidc7611652015-09-23 16:42:05 +053036 ******************************************************************************/
nxpandroidc7611652015-09-23 16:42:05 +053037/******************************************************************************
38 *
39 * This is the private interface file for the NFA EE.
40 *
41 ******************************************************************************/
42#ifndef NFA_EE_INT_H
43#define NFA_EE_INT_H
nxpandroidc7611652015-09-23 16:42:05 +053044#include "nfa_ee_api.h"
45#include "nfa_sys.h"
nxf24591c1cbeab2018-02-21 17:32:26 +053046#include "nfc_api.h"
nxpandroidc7611652015-09-23 16:42:05 +053047
48/*****************************************************************************
49** Constants and data types
50*****************************************************************************/
nxpandroid8f6d0532017-07-12 18:25:30 +053051/* the number of tNFA_EE_ECBs (for NFCEEs and DH) */
52#define NFA_EE_NUM_ECBS (NFA_EE_MAX_EE_SUPPORTED + 1)
53/* The index for DH in nfa_ee_cb.ee_cb[] */
54#define NFA_EE_CB_4_DH NFA_EE_MAX_EE_SUPPORTED
55#define NFA_EE_INVALID 0xFF
56/* only A, B, F, Bprime are supported by UICC now */
57#define NFA_EE_MAX_TECH_ROUTE 4
nxpandroidc7611652015-09-23 16:42:05 +053058
59#ifndef NFA_EE_AID_CFG_TAG_NAME
nxpandroid8f6d0532017-07-12 18:25:30 +053060/* AID */
61#define NFA_EE_AID_CFG_TAG_NAME 0x4F
nxpandroidc7611652015-09-23 16:42:05 +053062#endif
63
Ravishinde26233bb2018-08-06 22:16:08 +053064#if (NXP_EXTNS == TRUE)
65#define NFA_EE_NUM_PROTO 5
66
67#define NFA_EE_NUM_TECH 3
68#define NFA_EE_BUFFER_FUTURE_EXT 15
69#define NFA_EE_PROTO_ROUTE_ENTRY_SIZE 5
70#define NFA_EE_TECH_ROUTE_ENTRY_SIZE 5
71/**
72 * Max Routing Table Size = 720
73 * After allocating size for Technology based routing and Protocol based
74 *routing,
75 * the remaining size can be used for AID based routing
76 *
77 * Size for 1 Technology route entry = 5 bytes (includes Type(1 byte),
78 * Length (1 byte), Value (3 bytes - Power state, Tech Type, Location)
79 * TOTAL TECH ROUTE SIZE = 5 * 3 = 15 (For Tech A, B, F)
80 *
81 * Size for 1 Protocol route entry = 5 bytes (includes Type(1 byte),
82 * Length (1 byte), Value (3 bytes - Power state, Tech Type, Location)
83 * TOTAL PROTOCOL ROUTE SIZE = 5 * 6 = 30 (Protocols ISO-DEP, NFC-DEP, ISO-7816,
84 *T1T, T2T, T3T)
85 *
86 * SIZE FOR AID = 720 - 15 - 30 = 675
87 * BUFFER for future extensions = 15
88 * TOTAL SIZE FOR AID = 675 - 15 = 660
89 */
90#define NFA_EE_TOTAL_TECH_ROUTE_SIZE \
91 (NFA_EE_PROTO_ROUTE_ENTRY_SIZE * NFA_EE_NUM_TECH)
92#define NFA_EE_TOTAL_PROTO_ROUTE_SIZE \
93 (NFA_EE_PROTO_ROUTE_ENTRY_SIZE * NFA_EE_NUM_PROTO)
94
95#define NFA_EE_TOTAL_PROTO_TECH_FUTURE_EXT_ROUTE_SIZE \
96 (NFA_EE_TOTAL_TECH_ROUTE_SIZE + NFA_EE_TOTAL_PROTO_ROUTE_SIZE + \
97 NFA_EE_BUFFER_FUTURE_EXT)
98#endif
nxpandroidc7611652015-09-23 16:42:05 +053099/* NFA EE events */
nxpandroid8f6d0532017-07-12 18:25:30 +0530100enum {
101 NFA_EE_API_DISCOVER_EVT = NFA_SYS_EVT_START(NFA_ID_EE),
102 NFA_EE_API_REGISTER_EVT,
103 NFA_EE_API_DEREGISTER_EVT,
104 NFA_EE_API_MODE_SET_EVT,
105 NFA_EE_API_SET_TECH_CFG_EVT,
106 NFA_EE_API_SET_PROTO_CFG_EVT,
107 NFA_EE_API_ADD_AID_EVT,
108 NFA_EE_API_REMOVE_AID_EVT,
Suraj Uday Kotharkar6f7757b2018-05-10 15:58:29 +0530109 NFA_EE_API_ADD_SYSCODE_EVT,
110 NFA_EE_API_REMOVE_SYSCODE_EVT,
nxpandroid8f6d0532017-07-12 18:25:30 +0530111 NFA_EE_API_LMRT_SIZE_EVT,
112 NFA_EE_API_UPDATE_NOW_EVT,
113 NFA_EE_API_CONNECT_EVT,
114 NFA_EE_API_SEND_DATA_EVT,
115 NFA_EE_API_DISCONNECT_EVT,
nxpandroidc7611652015-09-23 16:42:05 +0530116
nxpandroid8f6d0532017-07-12 18:25:30 +0530117 NFA_EE_NCI_DISC_RSP_EVT,
118 NFA_EE_NCI_DISC_NTF_EVT,
119 NFA_EE_NCI_MODE_SET_RSP_EVT,
nxpandroid8f6d0532017-07-12 18:25:30 +0530120 NFA_EE_NCI_CONN_EVT,
121 NFA_EE_NCI_DATA_EVT,
122 NFA_EE_NCI_ACTION_NTF_EVT,
123 NFA_EE_NCI_DISC_REQ_NTF_EVT,
124 NFA_EE_NCI_WAIT_RSP_EVT,
nxpandroidc7611652015-09-23 16:42:05 +0530125
nxpandroid8f6d0532017-07-12 18:25:30 +0530126 NFA_EE_ROUT_TIMEOUT_EVT,
127 NFA_EE_DISCV_TIMEOUT_EVT,
128 NFA_EE_CFG_TO_NFCC_EVT,
nxf24591c1cbeab2018-02-21 17:32:26 +0530129#if (NXP_EXTNS == TRUE)
130 NFA_EE_NCI_PWR_LNK_CTRL_SET_EVT,
131 NFA_EE_NCI_PWR_LNK_CTRL_RSP_EVT,
nxpandroide5fc6c92017-09-13 13:17:46 +0530132 NFA_EE_NCI_NFCEE_STATUS_NTF_EVT,
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530133 NFA_EE_API_ADD_APDU_EVT,
134 NFA_EE_API_REMOVE_APDU_EVT,
nxf24591c1cbeab2018-02-21 17:32:26 +0530135#endif
nxpandroid8f6d0532017-07-12 18:25:30 +0530136 NFA_EE_MAX_EVT
nxf24591c1cbeab2018-02-21 17:32:26 +0530137
nxpandroidc7611652015-09-23 16:42:05 +0530138};
139
nxpandroid8f6d0532017-07-12 18:25:30 +0530140typedef uint16_t tNFA_EE_INT_EVT;
141/* for listen mode routing table*/
142#define NFA_EE_AE_ROUTE 0x80
143#define NFA_EE_AE_VS 0x40
nxpandroidc7611652015-09-23 16:42:05 +0530144
145/* NFA EE Management state */
nxpandroid8f6d0532017-07-12 18:25:30 +0530146enum {
147 NFA_EE_EM_STATE_INIT = 0,
148 NFA_EE_EM_STATE_INIT_DONE,
149 NFA_EE_EM_STATE_RESTORING,
150 NFA_EE_EM_STATE_DISABLING,
151 NFA_EE_EM_STATE_DISABLED,
nxpandroidc7611652015-09-23 16:42:05 +0530152
nxpandroid8f6d0532017-07-12 18:25:30 +0530153 NFA_EE_EM_STATE_MAX
nxpandroidc7611652015-09-23 16:42:05 +0530154};
nxpandroid8f6d0532017-07-12 18:25:30 +0530155typedef uint8_t tNFA_EE_EM_STATE;
nxpandroidc7611652015-09-23 16:42:05 +0530156
157/* NFA EE connection status */
nxpandroid8f6d0532017-07-12 18:25:30 +0530158enum {
159 NFA_EE_CONN_ST_NONE, /* not connected */
160 NFA_EE_CONN_ST_WAIT, /* connection is initiated; waiting for ack */
161 NFA_EE_CONN_ST_CONN, /* connected; can send/receive data */
nxf24591c1cbeab2018-02-21 17:32:26 +0530162 NFA_EE_CONN_ST_DISC /* disconnecting; waiting for ack */
nxpandroidc7611652015-09-23 16:42:05 +0530163};
nxpandroid8f6d0532017-07-12 18:25:30 +0530164typedef uint8_t tNFA_EE_CONN_ST;
nxpandroid6154b732016-01-14 20:39:23 +0530165
nxpandroid8f6d0532017-07-12 18:25:30 +0530166#define NFA_EE_MAX_AID_CFG_LEN (510)
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530167#if (NXP_EXTNS == TRUE)
168#define NFA_EE_TOTAL_APDU_PATTERN_SIZE 250
169#define NFA_EE_APDU_ROUTE_MASK 8 /* APDU route location mask*/
170#endif
Suraj Uday Kotharkar6f7757b2018-05-10 15:58:29 +0530171#define NFA_EE_SYSTEM_CODE_LEN 02
172#define NFA_EE_SYSTEM_CODE_TLV_SIZE 06
173#define NFA_EE_MAX_SYSTEM_CODE_ENTRIES 10
174#define NFA_EE_MAX_SYSTEM_CODE_CFG_LEN \
175 (NFA_EE_MAX_SYSTEM_CODE_ENTRIES * NFA_EE_SYSTEM_CODE_TLV_SIZE)
176
nxpandroidc7611652015-09-23 16:42:05 +0530177/* NFA EE control block flags:
nxpandroid8f6d0532017-07-12 18:25:30 +0530178 * use to indicate an API function has changed the configuration of the
179 * associated NFCEE
nxpandroidc7611652015-09-23 16:42:05 +0530180 * The flags are cleared when the routing table/VS is updated */
nxpandroid8f6d0532017-07-12 18:25:30 +0530181/* technology routing changed */
182#define NFA_EE_ECB_FLAGS_TECH 0x02
183/* protocol routing changed */
184#define NFA_EE_ECB_FLAGS_PROTO 0x04
185/* AID routing changed */
186#define NFA_EE_ECB_FLAGS_AID 0x08
Suraj Uday Kotharkar6f7757b2018-05-10 15:58:29 +0530187/* System Code routing changed */
188#define NFA_EE_ECB_FLAGS_SYSCODE 0xE0
nxpandroid8f6d0532017-07-12 18:25:30 +0530189/* VS changed */
190#define NFA_EE_ECB_FLAGS_VS 0x10
191/* Restore related */
192#define NFA_EE_ECB_FLAGS_RESTORE 0x20
193/* routing flags changed */
194#define NFA_EE_ECB_FLAGS_ROUTING 0x0E
195/* NFCEE Discover Request NTF is set */
196#define NFA_EE_ECB_FLAGS_DISC_REQ 0x40
197/* DISC_REQ N reported before DISC N */
198#define NFA_EE_ECB_FLAGS_ORDER 0x80
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530199#if (NXP_EXTNS == TRUE)
200/* APDU routing changed */
201#define NFA_EE_ECB_FLAGS_APDU 0x0100
nxpandroidc7611652015-09-23 16:42:05 +0530202
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530203typedef uint16_t tNFA_EE_ECB_FLAGS;
204#else
205typedef uint8_t tNFA_EE_ECB_FLAGS;
206#endif
nxpandroidc7611652015-09-23 16:42:05 +0530207/* part of tNFA_EE_STATUS; for internal use only */
nxpandroid8f6d0532017-07-12 18:25:30 +0530208/* waiting for restore to full power mode to complete */
209#define NFA_EE_STATUS_RESTORING 0x20
210/* this bit is in ee_status for internal use only */
211#define NFA_EE_STATUS_INT_MASK 0x20
nxpandroidc7611652015-09-23 16:42:05 +0530212
213/* NFA-EE information for a particular NFCEE Entity (including DH) */
nxpandroid8f6d0532017-07-12 18:25:30 +0530214typedef struct {
215 tNFA_TECHNOLOGY_MASK
216 tech_switch_on; /* default routing - technologies switch_on */
217 tNFA_TECHNOLOGY_MASK
218 tech_switch_off; /* default routing - technologies switch_off */
219 tNFA_TECHNOLOGY_MASK
220 tech_battery_off; /* default routing - technologies battery_off*/
Suraj Uday Kotharkard70a4c02018-05-15 17:55:49 +0530221 tNFA_TECHNOLOGY_MASK
222 tech_screen_lock; /* default routing - technologies screen_lock*/
223 tNFA_TECHNOLOGY_MASK
224 tech_screen_off; /* default routing - technologies screen_off*/
225 tNFA_TECHNOLOGY_MASK
226 tech_screen_off_lock; /* default routing - technologies screen_off_lock*/
nxpandroid8f6d0532017-07-12 18:25:30 +0530227 tNFA_PROTOCOL_MASK
228 proto_switch_on; /* default routing - protocols switch_on */
229 tNFA_PROTOCOL_MASK
230 proto_switch_off; /* default routing - protocols switch_off */
231 tNFA_PROTOCOL_MASK
nxf24591c1cbeab2018-02-21 17:32:26 +0530232 proto_battery_off; /* default routing - protocols battery_off */
nxpandroid8f6d0532017-07-12 18:25:30 +0530233 tNFA_PROTOCOL_MASK
234 proto_screen_lock; /* default routing - protocols screen_lock */
235 tNFA_PROTOCOL_MASK
236 proto_screen_off; /* default routing - protocols screen_off */
237 tNFA_PROTOCOL_MASK
Suraj Uday Kotharkard70a4c02018-05-15 17:55:49 +0530238 proto_screen_off_lock; /* default routing - protocols screen_off_lock */
nxpandroid8f6d0532017-07-12 18:25:30 +0530239 tNFA_EE_CONN_ST conn_st; /* connection status */
240 uint8_t conn_id; /* connection id */
241 tNFA_EE_CBACK* p_ee_cback; /* the callback function */
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530242 #if (NXP_EXTNS == TRUE)
243 /* Each APDU entry has an associated apdu_pwr_cfg ,apdu_rt_info ,apdu_len
244 * apdu_cfg[] contains APDU and APDU mask and maybe some other VS information in TLV format
245 * The first T is always NFA_EE_APDU_CFG_TAG_NAME, the L is the actual APDU length and mask length
246 * the apdu_len is the total length of all the TLVs associated with this AID
247 * entry
248 */
249 uint8_t apdu_len[NFA_EE_MAX_APDU_PATTERN_ENTRIES]; /* the actual lengths in apdu_cfg */
250 uint8_t apdu_pwr_cfg[NFA_EE_MAX_APDU_PATTERN_ENTRIES]; /* power configuration of this APDU Pattern entry */
251 uint16_t apdu_rt_info[NFA_EE_MAX_APDU_PATTERN_ENTRIES]; /* route/vs info for this APDU PATTERN entry */
252 uint8_t apdu_cfg[NFA_EE_TOTAL_APDU_PATTERN_SIZE]; /* routing entries based on APDU PATTERN */
253 uint8_t apdu_pattern_entries; /* The number of APDU PATTERN entries in aid_cfg */
254 #endif
nxf24591c1cbeab2018-02-21 17:32:26 +0530255 /* Each AID entry has an ssociated aid_len, aid_pwr_cfg, aid_rt_info.
256 * aid_cfg[] contains AID and maybe some other VS information in TLV format
257 * The first T is always NFA_EE_AID_CFG_TAG_NAME, the L is the actual AID
258 * length
259 * the aid_len is the total length of all the TLVs associated with this AID
260 * entry
261 */
nxpandroid8f6d0532017-07-12 18:25:30 +0530262 uint8_t aid_len[NFA_EE_MAX_AID_ENTRIES]; /* the actual lengths in aid_cfg */
263 uint8_t aid_pwr_cfg[NFA_EE_MAX_AID_ENTRIES]; /* power configuration of this
264 AID entry */
265 uint8_t aid_rt_info[NFA_EE_MAX_AID_ENTRIES]; /* route/vs info for this AID
266 entry */
nxf24591c1cbeab2018-02-21 17:32:26 +0530267 uint8_t aid_cfg[NFA_EE_MAX_AID_CFG_LEN]; /* routing entries based on AID */
268 uint8_t aid_entries; /* The number of AID entries in aid_cfg */
nxpandroid8f6d0532017-07-12 18:25:30 +0530269 uint8_t nfcee_id; /* ID for this NFCEE */
270 uint8_t ee_status; /* The NFCEE status */
nxf24591c1cbeab2018-02-21 17:32:26 +0530271#if (NXP_EXTNS == TRUE)
272 uint8_t nfcee_status; /* Current NFCEE status*/
273 uint8_t aid_rt_loc[NFA_EE_MAX_AID_ENTRIES]; /* route/vs info for this AID
274 entry */
275#endif
nxpandroid8f6d0532017-07-12 18:25:30 +0530276 uint8_t ee_old_status; /* The NFCEE status before going to low power mode */
277 tNFA_EE_INTERFACE
278 ee_interface[NFC_MAX_EE_INTERFACE]; /* NFCEE supported interface */
279 tNFA_EE_TLV ee_tlv[NFC_MAX_EE_TLVS]; /* the TLV */
280 uint8_t num_interface; /* number of Target interface */
281 uint8_t num_tlvs; /* number of TLVs */
nxf24591c1cbeab2018-02-21 17:32:26 +0530282 uint8_t ee_power_supply_status; /* power supply of NFCEE*/
nxpandroid8f6d0532017-07-12 18:25:30 +0530283 tNFA_EE_ECB_FLAGS ecb_flags; /* the flags of this control block */
284 tNFA_EE_INTERFACE use_interface; /* NFCEE interface used for the connection */
285 tNFA_NFC_PROTOCOL la_protocol; /* Listen A protocol */
286 tNFA_NFC_PROTOCOL lb_protocol; /* Listen B protocol */
287 tNFA_NFC_PROTOCOL lf_protocol; /* Listen F protocol */
288 tNFA_NFC_PROTOCOL lbp_protocol; /* Listen B' protocol */
289 uint8_t size_mask; /* the size for technology and protocol routing */
290 uint16_t size_aid; /* the size for aid routing */
nxf24591c1cbeab2018-02-21 17:32:26 +0530291 uint8_t aid_info[NFA_EE_MAX_AID_ENTRIES]; /* Aid Info Prefix/Suffix/Exact */
Suraj Uday Kotharkar6f7757b2018-05-10 15:58:29 +0530292 /*System Code Based Routing Variables*/
293 uint8_t sys_code_cfg[NFA_EE_MAX_SYSTEM_CODE_ENTRIES * NFA_EE_SYSTEM_CODE_LEN];
294 uint8_t sys_code_pwr_cfg[NFA_EE_MAX_SYSTEM_CODE_ENTRIES];
295 uint8_t sys_code_rt_loc[NFA_EE_MAX_SYSTEM_CODE_ENTRIES];
296 uint8_t sys_code_rt_loc_vs_info[NFA_EE_MAX_SYSTEM_CODE_ENTRIES];
297 /* The number of SC entries in sys_code_cfg buffer*/
298 uint8_t sys_code_cfg_entries;
299 uint16_t size_sys_code; /* The size for system code routing */
nxpandroid8f6d0532017-07-12 18:25:30 +0530300#if (NXP_EXTNS == TRUE)
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530301 uint16_t size_apdu;/* the size for apdu routing */
nxf24591c1cbeab2018-02-21 17:32:26 +0530302 uint8_t hci_enable_state;
nxf2459148793b62018-06-06 14:40:49 +0530303 tNFA_NFC_PROTOCOL pa_protocol; /* Passive poll A SWP Reader */
304 tNFA_NFC_PROTOCOL pb_protocol; /* Passive poll B SWP Reader */
nxpandroid8f6d0532017-07-12 18:25:30 +0530305 uint8_t ee_req_op; /* add or remove req ntf*/
nxpandroidc7611652015-09-23 16:42:05 +0530306#endif
307} tNFA_EE_ECB;
308
309/* data type for NFA_EE_API_DISCOVER_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530310typedef struct {
311 NFC_HDR hdr;
312 tNFA_EE_CBACK* p_cback;
nxpandroidc7611652015-09-23 16:42:05 +0530313} tNFA_EE_API_DISCOVER;
314
315/* data type for NFA_EE_API_REGISTER_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530316typedef struct {
317 NFC_HDR hdr;
318 tNFA_EE_CBACK* p_cback;
nxpandroidc7611652015-09-23 16:42:05 +0530319} tNFA_EE_API_REGISTER;
320
321/* data type for NFA_EE_API_DEREGISTER_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530322typedef struct {
323 NFC_HDR hdr;
324 int index;
nxpandroidc7611652015-09-23 16:42:05 +0530325} tNFA_EE_API_DEREGISTER;
326
327/* data type for NFA_EE_API_MODE_SET_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530328typedef struct {
329 NFC_HDR hdr;
330 tNFA_EE_ECB* p_cb;
331 uint8_t nfcee_id;
332 uint8_t mode;
nxpandroidc7611652015-09-23 16:42:05 +0530333} tNFA_EE_API_MODE_SET;
nxf24591c1cbeab2018-02-21 17:32:26 +0530334
335#if (NXP_EXTNS == TRUE)
336/* data type for NFA_EE_NCI_NFCEE_STATUS_EVT */
337typedef struct {
338 NFC_HDR hdr;
339 tNFC_NFCEE_STATUS_REVT* p_data;
340} tNFA_EE_NCI_NFCEE_STATUS_NTF;
341
342typedef struct {
343 NFC_HDR hdr;
344 tNFC_NFCEE_MODE_SET_INFO* p_data;
345} tNFA_EE_NCI_SET_MODE_INFO;
346
347/* data type for NFA_EE_NCI_MODE_SET_RSP_EVT */
348typedef struct {
349 NFC_HDR hdr;
350 tNFC_NFCEE_EE_PWR_LNK_REVT* p_data;
351} tNFA_EE_NCI_PWR_LNK_CTRL;
352
nxpandroidfb160962017-09-13 16:09:09 +0530353/* data type for NFA_EE_API_POWER_LINK_EVT */
354typedef struct {
355 NFC_HDR hdr;
356 uint8_t nfcee_id;
357 uint8_t cfg_value;
358} tNFA_EE_API_POWER_LINK_EVT;
nxf24591c1cbeab2018-02-21 17:32:26 +0530359#endif
nxpandroidc7611652015-09-23 16:42:05 +0530360
361/* data type for NFA_EE_API_SET_TECH_CFG_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530362typedef struct {
363 NFC_HDR hdr;
364 tNFA_EE_ECB* p_cb;
365 uint8_t nfcee_id;
366 tNFA_TECHNOLOGY_MASK technologies_switch_on;
367 tNFA_TECHNOLOGY_MASK technologies_switch_off;
368 tNFA_TECHNOLOGY_MASK technologies_battery_off;
nxpandroid8f6d0532017-07-12 18:25:30 +0530369 tNFA_TECHNOLOGY_MASK technologies_screen_lock;
370 tNFA_TECHNOLOGY_MASK technologies_screen_off;
371 tNFA_TECHNOLOGY_MASK technologies_screen_off_lock;
nxpandroidc7611652015-09-23 16:42:05 +0530372} tNFA_EE_API_SET_TECH_CFG;
373
374/* data type for NFA_EE_API_SET_PROTO_CFG_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530375typedef struct {
376 NFC_HDR hdr;
377 tNFA_EE_ECB* p_cb;
378 uint8_t nfcee_id;
379 tNFA_PROTOCOL_MASK protocols_switch_on;
380 tNFA_PROTOCOL_MASK protocols_switch_off;
381 tNFA_PROTOCOL_MASK protocols_battery_off;
nxpandroid8f6d0532017-07-12 18:25:30 +0530382 tNFA_PROTOCOL_MASK protocols_screen_lock;
383 tNFA_PROTOCOL_MASK protocols_screen_off;
384 tNFA_PROTOCOL_MASK protocols_screen_off_lock;
nxpandroidc7611652015-09-23 16:42:05 +0530385} tNFA_EE_API_SET_PROTO_CFG;
386
387/* data type for NFA_EE_API_ADD_AID_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530388typedef struct {
389 NFC_HDR hdr;
390 tNFA_EE_ECB* p_cb;
391 uint8_t nfcee_id;
392 uint8_t aid_len;
393 uint8_t* p_aid;
394 tNFA_EE_PWR_STATE power_state;
nxf24591c1cbeab2018-02-21 17:32:26 +0530395 uint8_t aidInfo;
nxpandroidc7611652015-09-23 16:42:05 +0530396} tNFA_EE_API_ADD_AID;
397
398/* data type for NFA_EE_API_REMOVE_AID_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530399typedef struct {
400 NFC_HDR hdr;
401 uint8_t aid_len;
402 uint8_t* p_aid;
nxpandroidc7611652015-09-23 16:42:05 +0530403} tNFA_EE_API_REMOVE_AID;
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530404#if (NXP_EXTNS == TRUE)
405/* data type for NFA_EE_API_ADD_APDU_EVT */
406typedef struct {
407 NFC_HDR hdr;
408 tNFA_EE_ECB* p_cb;
409 uint8_t nfcee_id;
410 uint8_t* p_apdu;
411 uint8_t apdu_len;
412 uint8_t* p_mask;
413 uint8_t mask_len;
414 tNFA_EE_PWR_STATE power_state;
415} tNFA_EE_API_ADD_APDU;
nxpandroidc7611652015-09-23 16:42:05 +0530416
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530417/* data type for NFA_EE_API_REMOVE_APDU_EVT */
418typedef struct {
419 NFC_HDR hdr;
420 uint8_t apdu_len;
421 uint8_t* p_apdu;
422} tNFA_EE_API_REMOVE_APDU;
423#endif
Suraj Uday Kotharkar6f7757b2018-05-10 15:58:29 +0530424/* data type for NFA_EE_API_ADD_SYSCODE_EVT */
425typedef struct {
426 NFC_HDR hdr;
427 tNFA_EE_ECB* p_cb;
428 uint8_t nfcee_id;
429 uint16_t syscode;
430 tNFA_EE_PWR_STATE power_state;
431} tNFA_EE_API_ADD_SYSCODE;
432
433/* data type for NFA_EE_API_REMOVE_SYSCODE_EVT */
434typedef struct {
435 NFC_HDR hdr;
436 uint16_t syscode;
437} tNFA_EE_API_REMOVE_SYSCODE;
438
nxpandroidc7611652015-09-23 16:42:05 +0530439/* data type for NFA_EE_API_LMRT_SIZE_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530440typedef NFC_HDR tNFA_EE_API_LMRT_SIZE;
nxpandroidc7611652015-09-23 16:42:05 +0530441
442/* data type for NFA_EE_API_CONNECT_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530443typedef struct {
444 NFC_HDR hdr;
445 tNFA_EE_ECB* p_cb;
446 uint8_t nfcee_id;
447 uint8_t ee_interface;
448 tNFA_EE_CBACK* p_cback;
nxpandroidc7611652015-09-23 16:42:05 +0530449} tNFA_EE_API_CONNECT;
450
451/* data type for NFA_EE_API_SEND_DATA_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530452typedef struct {
453 NFC_HDR hdr;
454 tNFA_EE_ECB* p_cb;
455 uint8_t nfcee_id;
456 uint16_t data_len;
457 uint8_t* p_data;
nxpandroidc7611652015-09-23 16:42:05 +0530458} tNFA_EE_API_SEND_DATA;
459
460/* data type for NFA_EE_API_DISCONNECT_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530461typedef struct {
462 NFC_HDR hdr;
463 tNFA_EE_ECB* p_cb;
464 uint8_t nfcee_id;
nxpandroidc7611652015-09-23 16:42:05 +0530465} tNFA_EE_API_DISCONNECT;
466
nxf24591c1cbeab2018-02-21 17:32:26 +0530467/* common data type for internal events with nfa_ee_use_cfg_cb[] as TRUE */
nxpandroid8f6d0532017-07-12 18:25:30 +0530468typedef struct {
469 NFC_HDR hdr;
470 tNFA_EE_ECB* p_cb;
471 uint8_t nfcee_id;
nxpandroidc7611652015-09-23 16:42:05 +0530472} tNFA_EE_CFG_HDR;
473
nxpandroidc7611652015-09-23 16:42:05 +0530474/* data type for NFA_EE_NCI_DISC_RSP_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530475typedef struct {
476 NFC_HDR hdr;
477 tNFC_NFCEE_DISCOVER_REVT* p_data;
nxpandroidc7611652015-09-23 16:42:05 +0530478} tNFA_EE_NCI_DISC_RSP;
479
480/* data type for NFA_EE_NCI_DISC_NTF_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530481typedef struct {
482 NFC_HDR hdr;
483 tNFC_NFCEE_INFO_REVT* p_data;
nxpandroidc7611652015-09-23 16:42:05 +0530484} tNFA_EE_NCI_DISC_NTF;
485
486/* data type for NFA_EE_NCI_MODE_SET_RSP_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530487typedef struct {
488 NFC_HDR hdr;
489 tNFC_NFCEE_MODE_SET_REVT* p_data;
nxpandroidc7611652015-09-23 16:42:05 +0530490} tNFA_EE_NCI_MODE_SET;
491
492/* data type for NFA_EE_NCI_WAIT_RSP_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530493typedef struct {
494 NFC_HDR hdr;
495 void* p_data;
496 uint8_t opcode;
nxpandroidc7611652015-09-23 16:42:05 +0530497} tNFA_EE_NCI_WAIT_RSP;
498
499/* data type for NFA_EE_NCI_CONN_EVT and NFA_EE_NCI_DATA_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530500typedef struct {
501 NFC_HDR hdr;
502 uint8_t conn_id;
503 tNFC_CONN_EVT event;
504 tNFC_CONN* p_data;
nxpandroidc7611652015-09-23 16:42:05 +0530505} tNFA_EE_NCI_CONN;
506
507/* data type for NFA_EE_NCI_ACTION_NTF_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530508typedef struct {
509 NFC_HDR hdr;
510 tNFC_EE_ACTION_REVT* p_data;
nxpandroidc7611652015-09-23 16:42:05 +0530511} tNFA_EE_NCI_ACTION;
512
513/* data type for NFA_EE_NCI_DISC_REQ_NTF_EVT */
nxpandroid8f6d0532017-07-12 18:25:30 +0530514typedef struct {
515 NFC_HDR hdr;
516 tNFC_EE_DISCOVER_REQ_REVT* p_data;
nxpandroidc7611652015-09-23 16:42:05 +0530517} tNFA_EE_NCI_DISC_REQ;
518
519/* union of all event data types */
nxpandroid8f6d0532017-07-12 18:25:30 +0530520typedef union {
521 NFC_HDR hdr;
522 tNFA_EE_CFG_HDR cfg_hdr;
523 tNFA_EE_API_DISCOVER ee_discover;
524 tNFA_EE_API_REGISTER ee_register;
525 tNFA_EE_API_DEREGISTER deregister;
526 tNFA_EE_API_MODE_SET mode_set;
527 tNFA_EE_API_SET_TECH_CFG set_tech;
528 tNFA_EE_API_SET_PROTO_CFG set_proto;
529 tNFA_EE_API_ADD_AID add_aid;
530 tNFA_EE_API_REMOVE_AID rm_aid;
Suraj Uday Kotharkar6f7757b2018-05-10 15:58:29 +0530531 tNFA_EE_API_ADD_SYSCODE add_syscode;
532 tNFA_EE_API_REMOVE_SYSCODE rm_syscode;
nxpandroid8f6d0532017-07-12 18:25:30 +0530533 tNFA_EE_API_LMRT_SIZE lmrt_size;
534 tNFA_EE_API_CONNECT connect;
535 tNFA_EE_API_SEND_DATA send_data;
536 tNFA_EE_API_DISCONNECT disconnect;
537 tNFA_EE_NCI_DISC_RSP disc_rsp;
538 tNFA_EE_NCI_DISC_NTF disc_ntf;
539 tNFA_EE_NCI_MODE_SET mode_set_rsp;
nxpandroid8f6d0532017-07-12 18:25:30 +0530540 tNFA_EE_NCI_WAIT_RSP wait_rsp;
541 tNFA_EE_NCI_CONN conn;
542 tNFA_EE_NCI_ACTION act;
543 tNFA_EE_NCI_DISC_REQ disc_req;
nxf24591c1cbeab2018-02-21 17:32:26 +0530544#if (NXP_EXTNS == TRUE)
545 tNFA_EE_NCI_SET_MODE_INFO mode_set_info;
546 tNFA_EE_API_POWER_LINK_EVT pwr_lnk_ctrl_set;
547 tNFA_EE_NCI_PWR_LNK_CTRL pwr_lnk_ctrl_rsp;
nxpandroide5fc6c92017-09-13 13:17:46 +0530548 tNFA_EE_NCI_NFCEE_STATUS_NTF nfcee_status_ntf;
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530549 tNFA_EE_API_ADD_APDU add_apdu;
550 tNFA_EE_API_REMOVE_APDU rm_apdu;
nxf24591c1cbeab2018-02-21 17:32:26 +0530551#endif
nxpandroidc7611652015-09-23 16:42:05 +0530552} tNFA_EE_MSG;
553
554/* type for State Machine (SM) action functions */
nxpandroid8f6d0532017-07-12 18:25:30 +0530555typedef void (*tNFA_EE_SM_ACT)(tNFA_EE_MSG* p_data);
nxpandroidc7611652015-09-23 16:42:05 +0530556
557/*****************************************************************************
558** control block
559*****************************************************************************/
nxpandroid8f6d0532017-07-12 18:25:30 +0530560#define NFA_EE_CFGED_UPDATE_NOW 0x80
561/* either switch off or battery off is configured */
562#define NFA_EE_CFGED_OFF_ROUTING 0x40
nxpandroidc7611652015-09-23 16:42:05 +0530563
564/* the following status are the definition used in ee_cfg_sts */
nxpandroid8f6d0532017-07-12 18:25:30 +0530565#define NFA_EE_STS_CHANGED_ROUTING 0x01
nxpandroid8f6d0532017-07-12 18:25:30 +0530566#define NFA_EE_STS_CHANGED 0x0f
567#define NFA_EE_STS_PREV_ROUTING 0x10
568#define NFA_EE_STS_PREV 0xf0
nxpandroidc7611652015-09-23 16:42:05 +0530569
nxpandroid8f6d0532017-07-12 18:25:30 +0530570/* need to report NFA_EE_UPDATED_EVT */
571#define NFA_EE_WAIT_UPDATE 0x10
572/* waiting for the rsp of set routing commands */
573#define NFA_EE_WAIT_UPDATE_RSP 0x20
574#define NFA_EE_WAIT_UPDATE_ALL 0xF0
nxpandroidc7611652015-09-23 16:42:05 +0530575
nxpandroid8f6d0532017-07-12 18:25:30 +0530576typedef uint8_t tNFA_EE_WAIT;
nxpandroidc7611652015-09-23 16:42:05 +0530577
nxpandroid8f6d0532017-07-12 18:25:30 +0530578/* set this bit when waiting for HCI to finish the initialization process in
579 * NFA_EE_EM_STATE_RESTORING */
580#define NFA_EE_FLAG_WAIT_HCI 0x01
581/* set this bit when EE needs to notify the p_enable_cback at the end of NFCEE
582 * discover process in NFA_EE_EM_STATE_RESTORING */
583#define NFA_EE_FLAG_NOTIFY_HCI 0x02
584/* set this bit when gracefully disable with outstanding NCI connections */
585#define NFA_EE_FLAG_WAIT_DISCONN 0x04
nxf24591c1cbeab2018-02-21 17:32:26 +0530586typedef uint8_t tNFA_EE_FLAGS;
587
nxpandroid6fe20e12017-07-31 15:29:16 +0530588#if(NXP_EXTNS == TRUE)
589#define NFA_EE_HCI_CONN_CLOSE 0x8
590#endif
nxpandroidc7611652015-09-23 16:42:05 +0530591
nxpandroid8f6d0532017-07-12 18:25:30 +0530592/* NFCEE DISCOVER in progress */
593#define NFA_EE_DISC_STS_ON 0x00
594/* disable NFCEE DISCOVER */
595#define NFA_EE_DISC_STS_OFF 0x01
596/* received NFCEE DISCOVER REQ NTF */
597#define NFA_EE_DISC_STS_REQ 0x02
598/* received NFA_EE_MODE_SET_COMPLETE */
599#define NFA_EE_MODE_SET_COMPLETE 0x03
600#if (NXP_EXTNS == TRUE)
601/* received NFCEE_MODE_SET NTF */
nxf24591c1cbeab2018-02-21 17:32:26 +0530602#define NFA_EE_UNRECOVERABLE_ERROR 0x05
Suraj Uday Kotharkarc6b112a2018-06-08 22:13:00 +0530603#define NFA_EE_STATUS_INIT_COMPLETED 0x07
nxf24591c1cbeab2018-02-21 17:32:26 +0530604#define NFA_EE_STATUS_NFCEE_REMOVED 0x06
nxpandroid65a02602017-01-13 19:13:19 +0530605#endif
nxpandroid8f6d0532017-07-12 18:25:30 +0530606typedef uint8_t tNFA_EE_DISC_STS;
nxpandroidc7611652015-09-23 16:42:05 +0530607
nxpandroid8f6d0532017-07-12 18:25:30 +0530608typedef void(tNFA_EE_ENABLE_DONE_CBACK)(tNFA_EE_DISC_STS status);
nxpandroidc7611652015-09-23 16:42:05 +0530609
610/* NFA EE Management control block */
nxpandroid8f6d0532017-07-12 18:25:30 +0530611typedef struct {
612 tNFA_EE_ECB ecb[NFA_EE_NUM_ECBS]; /* control block for DH and NFCEEs */
613 TIMER_LIST_ENT timer; /* timer to send info to NFCC */
614 TIMER_LIST_ENT discv_timer; /* timer to end NFCEE discovery */
615 tNFA_EE_CBACK* p_ee_cback[NFA_EE_MAX_CBACKS]; /* to report EE events */
616 tNFA_EE_CBACK* p_ee_disc_cback; /* to report EE discovery result */
617 tNFA_EE_ENABLE_DONE_CBACK*
nxf24591c1cbeab2018-02-21 17:32:26 +0530618 p_enable_cback; /* callback to notify on enable done*/
619 tNFA_EE_EM_STATE em_state; /* NFA-EE state initialized or not */
620 uint8_t wait_rsp; /* num of NCI rsp expected (update) */
621 uint8_t num_ee_expecting; /* number of ee_info still expecting*/
622 uint8_t cur_ee; /* the number of ee_info in cb */
623 uint8_t ee_cfged; /* the bit mask of configured ECBs */
624 uint8_t ee_cfg_sts; /* configuration status */
625 tNFA_EE_WAIT ee_wait_evt; /* Pending event(s) to be reported */
626 tNFA_EE_FLAGS ee_flags; /* flags */
nxpandroid19f93bc2017-07-31 15:37:27 +0530627 uint8_t route_block_control; /* controls route block feature */
hariprasad nalacheruvu4668c152018-05-24 16:46:24 +0530628#if (NXP_EXTNS == TRUE)
629 uint8_t nfcee_id;
630 uint8_t mode;
631#endif
nxpandroidc7611652015-09-23 16:42:05 +0530632} tNFA_EE_CB;
633
nxpandroid9d47b702017-07-12 21:25:17 +0530634/* Order of Routing entries in Routing Table */
nxf24591c1cbeab2018-02-21 17:32:26 +0530635#define NCI_ROUTE_ORDER_AID 0x01 /* AID routing order */
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530636#if (NXP_EXTNS == TRUE)
637#define NCI_ROUTE_ORDER_PATTERN 0x02 /* Pattern routing order*/
638#endif
Suraj Uday Kotharkar6f7757b2018-05-10 15:58:29 +0530639#define NCI_ROUTE_ORDER_SYS_CODE 0x03 /* System Code routing order*/
nxf24591c1cbeab2018-02-21 17:32:26 +0530640#define NCI_ROUTE_ORDER_PROTOCOL 0x04 /* Protocol routing order*/
641#define NCI_ROUTE_ORDER_TECHNOLOGY 0x05 /* Technology routing order*/
nxpandroid9d47b702017-07-12 21:25:17 +0530642
nxpandroidc7611652015-09-23 16:42:05 +0530643/*****************************************************************************
644** External variables
645*****************************************************************************/
646
647/* NFA EE control block */
nxpandroidc7611652015-09-23 16:42:05 +0530648extern tNFA_EE_CB nfa_ee_cb;
nxpandroidc7611652015-09-23 16:42:05 +0530649
650/*****************************************************************************
651** External functions
652*****************************************************************************/
653/* function prototypes - exported from nfa_ee_main.c */
nxpandroid8f6d0532017-07-12 18:25:30 +0530654void nfa_ee_sys_enable(void);
655void nfa_ee_sys_disable(void);
nxpandroidc7611652015-09-23 16:42:05 +0530656
657/* event handler function type */
nxpandroid8f6d0532017-07-12 18:25:30 +0530658bool nfa_ee_evt_hdlr(NFC_HDR* p_msg);
659void nfa_ee_proc_nfcc_power_mode(uint8_t nfcc_power_mode);
nxf24591c1cbeab2018-02-21 17:32:26 +0530660#if (NFC_NFCEE_INCLUDED == TRUE)
nxpandroid8f6d0532017-07-12 18:25:30 +0530661void nfa_ee_get_tech_route(uint8_t power_state, uint8_t* p_handles);
nxpandroidc7611652015-09-23 16:42:05 +0530662#endif
nxpandroid8f6d0532017-07-12 18:25:30 +0530663void nfa_ee_proc_evt(tNFC_RESPONSE_EVT event, void* p_data);
664tNFA_EE_ECB* nfa_ee_find_ecb(uint8_t nfcee_id);
665tNFA_EE_ECB* nfa_ee_find_ecb_by_conn_id(uint8_t conn_id);
nxpandroid8f6d0532017-07-12 18:25:30 +0530666uint8_t nfa_ee_ecb_to_mask(tNFA_EE_ECB* p_cb);
667void nfa_ee_restore_one_ecb(tNFA_EE_ECB* p_cb);
668bool nfa_ee_is_active(tNFA_HANDLE nfcee_id);
nxpandroidc7611652015-09-23 16:42:05 +0530669
670/* Action function prototypes - nfa_ee_act.c */
nxpandroid8f6d0532017-07-12 18:25:30 +0530671void nfa_ee_api_discover(tNFA_EE_MSG* p_data);
672void nfa_ee_api_register(tNFA_EE_MSG* p_data);
673void nfa_ee_api_deregister(tNFA_EE_MSG* p_data);
674void nfa_ee_api_mode_set(tNFA_EE_MSG* p_data);
675void nfa_ee_api_set_tech_cfg(tNFA_EE_MSG* p_data);
676void nfa_ee_api_set_proto_cfg(tNFA_EE_MSG* p_data);
677void nfa_ee_api_add_aid(tNFA_EE_MSG* p_data);
678void nfa_ee_api_remove_aid(tNFA_EE_MSG* p_data);
Suraj Uday Kotharkar6f7757b2018-05-10 15:58:29 +0530679void nfa_ee_api_add_sys_code(tNFA_EE_MSG* p_data);
680void nfa_ee_api_remove_sys_code(tNFA_EE_MSG* p_data);
nxpandroid8f6d0532017-07-12 18:25:30 +0530681void nfa_ee_api_lmrt_size(tNFA_EE_MSG* p_data);
682void nfa_ee_api_update_now(tNFA_EE_MSG* p_data);
683void nfa_ee_api_connect(tNFA_EE_MSG* p_data);
684void nfa_ee_api_send_data(tNFA_EE_MSG* p_data);
685void nfa_ee_api_disconnect(tNFA_EE_MSG* p_data);
686void nfa_ee_report_disc_done(bool notify_sys);
687void nfa_ee_nci_disc_rsp(tNFA_EE_MSG* p_data);
688void nfa_ee_nci_disc_ntf(tNFA_EE_MSG* p_data);
689void nfa_ee_nci_mode_set_rsp(tNFA_EE_MSG* p_data);
nxpandroid8f6d0532017-07-12 18:25:30 +0530690void nfa_ee_nci_wait_rsp(tNFA_EE_MSG* p_data);
691void nfa_ee_nci_conn(tNFA_EE_MSG* p_data);
692void nfa_ee_nci_action_ntf(tNFA_EE_MSG* p_data);
693void nfa_ee_nci_disc_req_ntf(tNFA_EE_MSG* p_data);
694void nfa_ee_rout_timeout(tNFA_EE_MSG* p_data);
695void nfa_ee_discv_timeout(tNFA_EE_MSG* p_data);
696void nfa_ee_lmrt_to_nfcc(tNFA_EE_MSG* p_data);
nxpandroidc7611652015-09-23 16:42:05 +0530697void nfa_ee_update_rout(void);
nxpandroid8f6d0532017-07-12 18:25:30 +0530698void nfa_ee_report_event(tNFA_EE_CBACK* p_cback, tNFA_EE_EVT event,
699 tNFA_EE_CBACK_DATA* p_data);
700tNFA_EE_ECB* nfa_ee_find_aid_offset(uint8_t aid_len, uint8_t* p_aid,
701 int* p_offset, int* p_entry);
Suraj Uday Kotharkar6f7757b2018-05-10 15:58:29 +0530702tNFA_EE_ECB* nfa_ee_find_sys_code_offset(uint16_t sys_code, int* p_offset,
703 int* p_entry);
nxpandroid8f6d0532017-07-12 18:25:30 +0530704int nfa_ee_find_total_aid_len(tNFA_EE_ECB* p_cb, int start_entry);
nxpandroidc7611652015-09-23 16:42:05 +0530705void nfa_ee_start_timer(void);
nxpandroid8f6d0532017-07-12 18:25:30 +0530706void nfa_ee_reg_cback_enable_done(tNFA_EE_ENABLE_DONE_CBACK* p_cback);
707void nfa_ee_report_update_evt(void);
nxf24591c1cbeab2018-02-21 17:32:26 +0530708
nxpandroid8f6d0532017-07-12 18:25:30 +0530709extern void nfa_ee_proc_hci_info_cback(void);
710void nfa_ee_check_disable(void);
711bool nfa_ee_restore_ntf_done(void);
nxpandroidc7611652015-09-23 16:42:05 +0530712void nfa_ee_check_restore_complete(void);
nxf24591c1cbeab2018-02-21 17:32:26 +0530713#if (NXP_EXTNS == TRUE)
714void nfa_ee_nci_set_mode_info(tNFA_EE_MSG* p_data);
715void nfa_ee_nci_pwr_link_ctrl_rsp(tNFA_EE_MSG* p_data);
716void nfa_ee_api_power_link_set(tNFA_EE_MSG* p_data);
717void nfa_ee_nci_nfcee_status_ntf(tNFA_EE_MSG* p_data);
Suraj Uday Kotharkar11ae20f2018-07-20 23:29:36 +0530718void nfa_ee_api_add_apdu(tNFA_EE_MSG* p_data);
719void nfa_ee_api_remove_apdu(tNFA_EE_MSG* p_data);
Ravishinde26233bb2018-08-06 22:16:08 +0530720uint16_t nfa_ee_find_max_aid_config_length();
721uint16_t nfa_ee_api_get_max_aid_config_length();
722uint16_t nfa_ee_lmrt_size();
nxf24591c1cbeab2018-02-21 17:32:26 +0530723#endif
nxpandroidc7611652015-09-23 16:42:05 +0530724#endif /* NFA_P2P_INT_H */