blob: 7df0df42079585339520affd3908371fa7e5b4df [file] [log] [blame]
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -08001/******************************************************************************
2 *
Evan Chue9629ba2014-01-31 11:18:47 -05003 * Copyright (C) 2010-2014 Broadcom Corporation
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -08004 *
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/******************************************************************************
20 *
21 * NFA interface to NFCEE
22 *
23 ******************************************************************************/
24#ifndef NFA_EE_API_H
25#define NFA_EE_API_H
26
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080027#include "nfa_api.h"
28#include "nfc_api.h"
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -080029#include "nfc_target.h"
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080030
31/*****************************************************************************
32** Constants and data types
33*****************************************************************************/
Ruchi Kandoi46e6e282017-01-30 14:26:10 -080034/* 16 per ISO 7816 specification */
35#define NFA_MAX_AID_LEN NFC_MAX_AID_LEN
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080036
37/* NFA EE callback events */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -080038enum {
39 NFA_EE_DISCOVER_EVT, /* The status for NFA_EeDiscover () */
40 NFA_EE_REGISTER_EVT, /* The status for NFA_EeRegister () */
41 NFA_EE_DEREGISTER_EVT, /* The status for NFA_EeDeregister () */
42 NFA_EE_MODE_SET_EVT, /* The status for activating or deactivating an NFCEE */
43 NFA_EE_ADD_AID_EVT, /* The status for adding an AID to a routing table entry
Love Khanna1d062772018-04-10 21:10:02 +053044 */
45 NFA_EE_REMOVE_AID_EVT, /* The status for removing an AID from a routing table
46 */
47 NFA_EE_ADD_SYSCODE_EVT, /* The status for adding an System Code to a routing
48 table entry */
49 NFA_EE_REMOVE_SYSCODE_EVT, /* The status for removing an System Code from
50 routing table */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -080051 NFA_EE_REMAINING_SIZE_EVT, /* The remaining size of the Listen Mode Routing
52 Table */
53 NFA_EE_SET_TECH_CFG_EVT, /* The status for setting the routing based on RF
54 tech. */
55 NFA_EE_SET_PROTO_CFG_EVT, /* The status for setting the routing based on
56 protocols */
57 NFA_EE_UPDATED_EVT, /* The status for NFA_EeUpdateNow */
58 NFA_EE_CONNECT_EVT, /* Result of NFA_EeConnect */
59 NFA_EE_DATA_EVT, /* Received data from NFCEE. */
60 NFA_EE_DISCONNECT_EVT, /* NFCEE connection closed. */
61 NFA_EE_NEW_EE_EVT, /* A new NFCEE is discovered */
62 NFA_EE_ACTION_EVT, /* An action happened in NFCEE */
63 NFA_EE_DISCOVER_REQ_EVT, /* NFCEE Discover Request Notification */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -080064 NFA_EE_NO_MEM_ERR_EVT, /* Error - out of GKI buffers */
65 NFA_EE_NO_CB_ERR_EVT /* Error - Can not find control block or wrong state */
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080066};
Ruchi Kandoi512ee632017-01-03 13:59:10 -080067typedef uint8_t tNFA_EE_EVT;
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080068
69/* tNFA_NFCEE_INTERFACE values */
Ruchi Kandoi46e6e282017-01-30 14:26:10 -080070/* HCI Access Interface*/
71#define NFA_EE_INTERFACE_HCI_ACCESS NFC_NFCEE_INTERFACE_HCI_ACCESS
Ruchi Kandoi512ee632017-01-03 13:59:10 -080072typedef uint8_t tNFA_EE_INTERFACE;
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080073
Ruchi Kandoi512ee632017-01-03 13:59:10 -080074typedef uint8_t tNFA_EE_TAG;
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080075
76/* for NFA_EeModeSet () */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -080077#define NFA_EE_MD_ACTIVATE NFC_MODE_ACTIVATE
78#define NFA_EE_MD_DEACTIVATE NFC_MODE_DEACTIVATE
Ruchi Kandoi512ee632017-01-03 13:59:10 -080079typedef uint8_t tNFA_EE_MD;
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080080
Ruchi Kandoi46e6e282017-01-30 14:26:10 -080081/* The device is on */
82#define NFA_EE_PWR_STATE_ON 0x01
83/* The device is switched off */
84#define NFA_EE_PWR_STATE_SWITCH_OFF 0x02
85/* The device's battery is removed */
86#define NFA_EE_PWR_STATE_BATT_OFF 0x04
Ruchi Kandoi512ee632017-01-03 13:59:10 -080087typedef uint8_t tNFA_EE_PWR_STATE;
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080088
Ruchi Kandoi46e6e282017-01-30 14:26:10 -080089/* NFCEE connected and inactive */
90#define NFA_EE_STATUS_INACTIVE NFC_NFCEE_STATUS_INACTIVE
91/* NFCEE connected and active */
92#define NFA_EE_STATUS_ACTIVE NFC_NFCEE_STATUS_ACTIVE
93/* NFCEE removed */
94#define NFA_EE_STATUS_REMOVED NFC_NFCEE_STATUS_REMOVED
95/* waiting for response from NFCC */
96#define NFA_EE_STATUS_PENDING 0x10
Ruchi Kandoi512ee632017-01-03 13:59:10 -080097typedef uint8_t tNFA_EE_STATUS;
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080098
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -080099/* additional NFCEE Info */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800100typedef struct {
101 tNFA_EE_TAG tag;
102 uint8_t len;
103 uint8_t info[NFC_MAX_EE_INFO];
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800104} tNFA_EE_TLV;
105
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800106typedef struct {
107 tNFA_HANDLE ee_handle; /* handle for NFCEE oe DH */
108 tNFA_EE_STATUS ee_status; /* The NFCEE status */
109 uint8_t num_interface; /* number of NFCEE interface*/
110 tNFA_EE_INTERFACE
111 ee_interface[NFC_MAX_EE_INTERFACE]; /* NFCEE supported interface */
112 uint8_t num_tlvs; /* number of TLVs */
113 tNFA_EE_TLV ee_tlv[NFC_MAX_EE_TLVS]; /* the TLV */
Love Khanna81e4f812017-06-02 17:50:19 +0530114 uint8_t ee_power_supply_status; /* The NFCEE Power supply */
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800115} tNFA_EE_INFO;
116
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800117typedef struct {
118 tNFA_STATUS status; /* NFA_STATUS_OK is successful */
119 uint8_t num_ee; /* number of NFCEEs found */
120 tNFA_EE_INFO ee_info[NFA_EE_MAX_EE_SUPPORTED]; /*NFCEE information */
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800121} tNFA_EE_DISCOVER;
122
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800123typedef struct {
124 tNFA_HANDLE ee_handle; /* Handle of NFCEE */
125 tNFA_STATUS status; /* NFA_STATUS_OK is successful */
126 tNFA_EE_INTERFACE
127 ee_interface; /* NFCEE interface associated with this connection */
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800128} tNFA_EE_CONNECT;
129
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800130typedef tNFC_EE_TRIGGER tNFA_EE_TRIGGER;
131
132/* Union of NFCEE action parameter depending on the associated trigger */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800133typedef union {
134 tNFA_NFC_PROTOCOL protocol; /* NFA_EE_TRGR_RF_PROTOCOL: the protocol that
135 triggers this event */
136 tNFC_RF_TECH technology; /* NFA_EE_TRGR_RF_TECHNOLOGY:the technology that
137 triggers this event */
138 tNFC_AID aid; /* NFA_EE_TRGR_SELECT : the AID in the received SELECT AID
139 command */
140 tNFC_APP_INIT app_init; /* NFA_EE_TRGR_APP_INIT: The information for the
141 application initiated trigger */
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800142} tNFA_EE_ACTION_PARAM;
143
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800144typedef struct {
145 tNFA_HANDLE ee_handle; /* Handle of NFCEE */
146 tNFA_EE_TRIGGER trigger; /* the trigger of this event */
147 tNFA_EE_ACTION_PARAM param;
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800148} tNFA_EE_ACTION;
149
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800150typedef struct {
151 tNFA_HANDLE ee_handle; /* Handle of NFCEE */
152 tNFA_STATUS status; /* NFA_STATUS_OK is successful */
153 tNFA_EE_STATUS ee_status; /* The NFCEE status */
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800154} tNFA_EE_MODE_SET;
155
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800156typedef struct {
157 tNFA_HANDLE ee_handle; /* Handle of MFCEE */
158 tNFA_NFC_PROTOCOL la_protocol; /* Listen A protocol */
159 tNFA_NFC_PROTOCOL lb_protocol; /* Listen B protocol */
160 tNFA_NFC_PROTOCOL lf_protocol; /* Listen F protocol */
161 tNFA_NFC_PROTOCOL lbp_protocol; /* Listen B' protocol */
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800162} tNFA_EE_DISCOVER_INFO;
163
164/* Data for NFA_EE_DISCOVER_REQ_EVT */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800165typedef struct {
166 uint8_t status; /* NFA_STATUS_OK if successful */
167 uint8_t num_ee; /* number of MFCEE information */
168 tNFA_EE_DISCOVER_INFO ee_disc_info[NFA_EE_MAX_EE_SUPPORTED -
169 1]; /* NFCEE DISCOVER Request info */
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800170} tNFA_EE_DISCOVER_REQ;
171
Martijn Coenen5c65c3a2013-03-27 13:23:36 -0700172/* Data for NFA_EE_DATA_EVT */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800173typedef struct {
174 tNFA_HANDLE handle; /* Connection handle */
175 uint16_t len; /* Length of data */
176 uint8_t* p_buf; /* Data buffer */
Martijn Coenen5c65c3a2013-03-27 13:23:36 -0700177} tNFA_EE_DATA;
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800178
179/* Union of all EE callback structures */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800180typedef union {
181 tNFA_STATUS
182 status; /* NFA_STATUS_OK is successful; otherwise NFA_STATUS_FAILED */
183 tNFA_EE_DATA data;
184 tNFA_HANDLE handle;
185 tNFA_EE_DISCOVER ee_discover;
186 tNFA_STATUS ee_register;
187 tNFA_STATUS deregister;
188 tNFA_STATUS add_aid;
189 tNFA_STATUS remove_aid;
Love Khanna1d062772018-04-10 21:10:02 +0530190 tNFA_STATUS add_sc;
191 tNFA_STATUS remove_sc;
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800192 tNFA_STATUS set_tech;
193 tNFA_STATUS set_proto;
194 uint16_t size;
195 tNFA_EE_CONNECT connect;
196 tNFA_EE_ACTION action;
197 tNFA_EE_MODE_SET mode_set;
198 tNFA_EE_INFO new_ee;
199 tNFA_EE_DISCOVER_REQ discover_req;
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800200} tNFA_EE_CBACK_DATA;
201
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800202/* EE callback */
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800203typedef void(tNFA_EE_CBACK)(tNFA_EE_EVT event, tNFA_EE_CBACK_DATA* p_data);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800204
205/*****************************************************************************
206** External Function Declarations
207*****************************************************************************/
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800208
209/*******************************************************************************
210**
211** Function NFA_EeDiscover
212**
213** Description This function retrieves the NFCEE information from NFCC.
214** The NFCEE information is reported in NFA_EE_DISCOVER_EVT.
215**
216** This function may be called when a system supports removable
217** NFCEEs,
218**
219** Returns NFA_STATUS_OK if information is retrieved successfully
220** NFA_STATUS_FAILED If wrong state (retry later)
221** NFA_STATUS_INVALID_PARAM If bad parameter
222**
223*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800224extern tNFA_STATUS NFA_EeDiscover(tNFA_EE_CBACK* p_cback);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800225
226/*******************************************************************************
227**
228** Function NFA_EeGetInfo
229**
230** Description This function retrieves the NFCEE information from NFA.
231** The actual number of NFCEE is returned in p_num_nfcee
232** and NFCEE information is returned in p_info
233**
234** Returns NFA_STATUS_OK if information is retrieved successfully
235** NFA_STATUS_FAILED If wrong state (retry later)
236** NFA_STATUS_INVALID_PARAM If bad parameter
237**
238*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800239extern tNFA_STATUS NFA_EeGetInfo(uint8_t* p_num_nfcee, tNFA_EE_INFO* p_info);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800240
241/*******************************************************************************
242**
243** Function NFA_EeRegister
244**
245** Description This function registers a callback function to receive the
246** events from NFA-EE module.
247**
248** Returns NFA_STATUS_OK if successfully initiated
249** NFA_STATUS_FAILED otherwise
250** NFA_STATUS_INVALID_PARAM If bad parameter
251**
252*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800253extern tNFA_STATUS NFA_EeRegister(tNFA_EE_CBACK* p_cback);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800254
255/*******************************************************************************
256**
257** Function NFA_EeDeregister
258**
259** Description This function de-registers the callback function
260**
261** Returns NFA_STATUS_OK if successfully initiated
262** NFA_STATUS_FAILED otherwise
263** NFA_STATUS_INVALID_PARAM If bad parameter
264**
265*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800266extern tNFA_STATUS NFA_EeDeregister(tNFA_EE_CBACK* p_cback);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800267
268/*******************************************************************************
269**
270** Function NFA_EeModeSet
271**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800272** Description This function is called to activate
273** (mode = NFA_EE_MD_ACTIVATE) or deactivate
274** (mode = NFA_EE_MD_DEACTIVATE) the NFCEE identified by the
275** given ee_handle. The result of this operation is reported
276** with the NFA_EE_MODE_SET_EVT.
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800277**
278** Returns NFA_STATUS_OK if successfully initiated
279** NFA_STATUS_FAILED otherwise
280** NFA_STATUS_INVALID_PARAM If bad parameter
281**
282*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800283extern tNFA_STATUS NFA_EeModeSet(tNFA_HANDLE ee_handle, tNFA_EE_MD mode);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800284
285/*******************************************************************************
286**
287** Function NFA_EeSetDefaultTechRouting
288**
289** Description This function is called to add, change or remove the
290** default routing based on RF technology in the listen mode
291** routing table for the given ee_handle. The status of this
292** operation is reported as the NFA_EE_SET_TECH_CFG_EVT.
293**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800294** Note: If RF discovery is started,
295** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should
296** happen before calling this function
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800297**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800298** Note: NFA_EeUpdateNow() should be called after last NFA-EE
299** function to change the listen mode routing is called.
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800300**
301** Returns NFA_STATUS_OK if successfully initiated
302** NFA_STATUS_FAILED otherwise
303** NFA_STATUS_INVALID_PARAM If bad parameter
304**
305*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800306extern tNFA_STATUS NFA_EeSetDefaultTechRouting(
307 tNFA_HANDLE ee_handle, tNFA_TECHNOLOGY_MASK technologies_switch_on,
308 tNFA_TECHNOLOGY_MASK technologies_switch_off,
309 tNFA_TECHNOLOGY_MASK technologies_battery_off);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800310
311/*******************************************************************************
312**
313** Function NFA_EeSetDefaultProtoRouting
314**
315** Description This function is called to add, change or remove the
316** default routing based on Protocol in the listen mode routing
317** table for the given ee_handle. The status of this
318** operation is reported as the NFA_EE_SET_PROTO_CFG_EVT.
319**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800320** Note: If RF discovery is started,
321** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should
322** happen before calling this function
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800323**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800324** Note: NFA_EeUpdateNow() should be called after last NFA-EE
325** function to change the listen mode routing is called.
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800326**
327** Returns NFA_STATUS_OK if successfully initiated
328** NFA_STATUS_FAILED otherwise
329** NFA_STATUS_INVALID_PARAM If bad parameter
330**
331*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800332extern tNFA_STATUS NFA_EeSetDefaultProtoRouting(
333 tNFA_HANDLE ee_handle, tNFA_PROTOCOL_MASK protocols_switch_on,
334 tNFA_PROTOCOL_MASK protocols_switch_off,
335 tNFA_PROTOCOL_MASK protocols_battery_off);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800336
337/*******************************************************************************
338**
339** Function NFA_EeAddAidRouting
340**
341** Description This function is called to add an AID entry in the
342** listen mode routing table in NFCC. The status of this
343** operation is reported as the NFA_EE_ADD_AID_EVT.
344**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800345** Note: If RF discovery is started,
346** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should
347** happen before calling this function
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800348**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800349** Note: NFA_EeUpdateNow() should be called after last NFA-EE
350** function to change the listen mode routing is called.
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800351**
352** Returns NFA_STATUS_OK if successfully initiated
353** NFA_STATUS_FAILED otherwise
354** NFA_STATUS_INVALID_PARAM If bad parameter
355**
356*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800357extern tNFA_STATUS NFA_EeAddAidRouting(tNFA_HANDLE ee_handle, uint8_t aid_len,
358 uint8_t* p_aid,
Love Khannaf3c018a2017-05-11 18:34:32 +0530359 tNFA_EE_PWR_STATE power_state,
360 uint8_t aidInfo);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800361
362/*******************************************************************************
363**
364** Function NFA_EeRemoveAidRouting
365**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800366** Description This function is called to remove the given AID entry from
367** the listen mode routing table. If the entry configures VS,
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800368** it is also removed. The status of this operation is reported
369** as the NFA_EE_REMOVE_AID_EVT.
370**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800371** Note: If RF discovery is started,
372** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should
373** happen before calling this function
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800374**
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800375** Note: NFA_EeUpdateNow() should be called after last NFA-EE
376** function to change the listen mode routing is called.
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800377**
378** Returns NFA_STATUS_OK if successfully initiated
379** NFA_STATUS_FAILED otherwise
380** NFA_STATUS_INVALID_PARAM If bad parameter
381**
382*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800383extern tNFA_STATUS NFA_EeRemoveAidRouting(uint8_t aid_len, uint8_t* p_aid);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800384
385/*******************************************************************************
Love Khanna1d062772018-04-10 21:10:02 +0530386 **
387 ** Function NFA_EeAddSystemCodeRouting
388 **
389 ** Description This function is called to add an system code entry in the
390 ** listen mode routing table in NFCC. The status of this
391 ** operation is reported as the NFA_EE_ADD_SYSCODE_EVT.
392 **
393 ** Note: If RF discovery is started,
394 ** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should
395 ** happen before calling this function
396 **
397 ** Note: NFA_EeUpdateNow() should be called after last NFA-EE
398 ** function to change the listen mode routing is called.
399 **
400 ** Returns NFA_STATUS_OK if successfully initiated
401 ** NFA_STATUS_FAILED otherwise
402 ** NFA_STATUS_INVALID_PARAM If bad parameter
403 **
404 *******************************************************************************/
405extern tNFA_STATUS NFA_EeAddSystemCodeRouting(uint16_t systemcode,
406 tNFA_HANDLE ee_handle,
407 tNFA_EE_PWR_STATE power_state);
408
409/*******************************************************************************
410**
411** Function NFA_EeRemoveSystemCodeRouting
412**
413** Description This function is called to remove the given System Code
414*based entry from
415** the listen mode routing table. The status of this operation
416*is reported
417** as the NFA_EE_REMOVE_SYSCODE_EVT.
418**
419** Note: If RF discovery is started,
420** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should
421** happen before calling this function
422**
423** Note: NFA_EeUpdateNow() should be called after last NFA-EE
424** function to change the listen mode routing is called.
425**
426** Returns NFA_STATUS_OK if successfully initiated
427** NFA_STATUS_FAILED otherwise
428** NFA_STATUS_INVALID_PARAM If bad parameter
429**
430*******************************************************************************/
431extern tNFA_STATUS NFA_EeRemoveSystemCodeRouting(uint16_t systemcode);
432
433/*******************************************************************************
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800434**
Sherry Smithca0bff42014-01-22 15:15:54 -0800435** Function NFA_EeGetLmrtRemainingSize
436**
437** Description This function is called to get remaining size of the
438** Listen Mode Routing Table.
439** The remaining size is reported in NFA_EE_REMAINING_SIZE_EVT
440**
441** Returns NFA_STATUS_OK if successfully initiated
442** NFA_STATUS_FAILED otherwise
443**
444*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800445extern tNFA_STATUS NFA_EeGetLmrtRemainingSize(void);
Sherry Smithca0bff42014-01-22 15:15:54 -0800446
447/*******************************************************************************
448**
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800449** Function NFA_EeUpdateNow
450**
451** Description This function is called to send the current listen mode
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800452** routing table and VS configuration to the NFCC (without
453** waiting for NFA_EE_ROUT_TIMEOUT_VAL).
Sherry Smith40e67c92014-01-16 10:10:29 -0800454**
455** The status of this operation is
456** reported with the NFA_EE_UPDATED_EVT.
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800457**
458** Returns NFA_STATUS_OK if successfully initiated
Sherry Smith40e67c92014-01-16 10:10:29 -0800459** NFA_STATUS_SEMANTIC_ERROR is update is currently in progress
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800460** NFA_STATUS_FAILED otherwise
461**
462*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800463extern tNFA_STATUS NFA_EeUpdateNow(void);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800464
465/*******************************************************************************
466**
467** Function NFA_EeConnect
468**
469** Description Open connection to an NFCEE attached to the NFCC
470**
471** The status of this operation is
472** reported with the NFA_EE_CONNECT_EVT.
473**
474** Returns NFA_STATUS_OK if successfully initiated
475** NFA_STATUS_FAILED otherwise
476** NFA_STATUS_INVALID_PARAM If bad parameter
477**
478*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800479extern tNFA_STATUS NFA_EeConnect(tNFA_HANDLE ee_handle, uint8_t ee_interface,
480 tNFA_EE_CBACK* p_cback);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800481
482/*******************************************************************************
483**
484** Function NFA_EeSendData
485**
486** Description Send data to the given NFCEE.
Ruchi Kandoi552f2b72017-01-28 16:22:55 -0800487** This function shall be called after NFA_EE_CONNECT_EVT is
488** reported and before NFA_EeDisconnect is called on the given
489** ee_handle.
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800490**
491** Returns NFA_STATUS_OK if successfully initiated
492** NFA_STATUS_FAILED otherwise
493** NFA_STATUS_INVALID_PARAM If bad parameter
494**
495*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800496extern tNFA_STATUS NFA_EeSendData(tNFA_HANDLE ee_handle, uint16_t data_len,
497 uint8_t* p_data);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800498
499/*******************************************************************************
500**
501** Function NFA_EeDisconnect
502**
503** Description Disconnect (if a connection is currently open) from an
504** NFCEE interface. The result of this operation is reported
505** with the NFA_EE_DISCONNECT_EVT.
506**
507** Returns NFA_STATUS_OK if successfully initiated
508** NFA_STATUS_FAILED otherwise
509** NFA_STATUS_INVALID_PARAM If bad parameter
510**
511*******************************************************************************/
Ruchi Kandoi6fca02d2017-01-30 14:28:16 -0800512extern tNFA_STATUS NFA_EeDisconnect(tNFA_HANDLE ee_handle);
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800513
The Android Open Source Projecte9df6ba2012-12-13 14:55:37 -0800514#endif /* NFA_EE_API_H */