nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 1 | /****************************************************************************** |
| 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 | * |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 20 | * The original Work has been changed by NXP. |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 21 | * |
| 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 | * |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 34 | * Copyright 2018 NXP |
| 35 | * |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 36 | ******************************************************************************/ |
| 37 | /****************************************************************************** |
| 38 | * |
| 39 | * NFA interface to NFCEE |
| 40 | * |
| 41 | ******************************************************************************/ |
| 42 | #ifndef NFA_EE_API_H |
| 43 | #define NFA_EE_API_H |
| 44 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 45 | #include "nfa_api.h" |
| 46 | #include "nfc_api.h" |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 47 | #include "nfc_target.h" |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 48 | |
| 49 | /***************************************************************************** |
| 50 | ** Constants and data types |
| 51 | *****************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 52 | /* 16 per ISO 7816 specification */ |
| 53 | #define NFA_MAX_AID_LEN NFC_MAX_AID_LEN |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 54 | #if (NXP_EXTNS == TRUE) |
Suraj Uday Kotharkar | 11ae20f | 2018-07-20 23:29:36 +0530 | [diff] [blame] | 55 | #define NFA_MAX_APDU_DATA_LEN NFC_MAX_APDU_DATA_LEN |
| 56 | #define NFA_MAX_APDU_MASK_LEN NFC_MAX_APDU_MASK_LEN |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 57 | #define NFA_EE_HANDLE_DH (NFA_HANDLE_GROUP_EE | NFC_DH_ID) |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 58 | extern uint8_t NFA_REMOVE_ALL_AID[]; |
| 59 | #define NFA_REMOVE_ALL_AID_LEN (0x08) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 60 | #endif |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 61 | /* NFA EE callback events */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 62 | enum { |
| 63 | NFA_EE_DISCOVER_EVT, /* The status for NFA_EeDiscover () */ |
| 64 | NFA_EE_REGISTER_EVT, /* The status for NFA_EeRegister () */ |
| 65 | NFA_EE_DEREGISTER_EVT, /* The status for NFA_EeDeregister () */ |
| 66 | NFA_EE_MODE_SET_EVT, /* The status for activating or deactivating an NFCEE */ |
| 67 | NFA_EE_ADD_AID_EVT, /* The status for adding an AID to a routing table entry |
Suraj Uday Kotharkar | 6f7757b | 2018-05-10 15:58:29 +0530 | [diff] [blame] | 68 | */ |
| 69 | NFA_EE_REMOVE_AID_EVT, /* The status for removing an AID from a routing table |
| 70 | */ |
| 71 | NFA_EE_ADD_SYSCODE_EVT, /* The status for adding an System Code to a routing |
| 72 | table entry */ |
| 73 | NFA_EE_REMOVE_SYSCODE_EVT, /* The status for removing an System Code from |
| 74 | routing table */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 75 | NFA_EE_REMAINING_SIZE_EVT, /* The remaining size of the Listen Mode Routing |
| 76 | Table */ |
| 77 | NFA_EE_SET_TECH_CFG_EVT, /* The status for setting the routing based on RF |
| 78 | tech. */ |
| 79 | NFA_EE_SET_PROTO_CFG_EVT, /* The status for setting the routing based on |
| 80 | protocols */ |
| 81 | NFA_EE_UPDATED_EVT, /* The status for NFA_EeUpdateNow */ |
| 82 | NFA_EE_CONNECT_EVT, /* Result of NFA_EeConnect */ |
| 83 | NFA_EE_DATA_EVT, /* Received data from NFCEE. */ |
| 84 | NFA_EE_DISCONNECT_EVT, /* NFCEE connection closed. */ |
| 85 | NFA_EE_NEW_EE_EVT, /* A new NFCEE is discovered */ |
| 86 | NFA_EE_ACTION_EVT, /* An action happened in NFCEE */ |
| 87 | NFA_EE_DISCOVER_REQ_EVT, /* NFCEE Discover Request Notification */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 88 | NFA_EE_NO_MEM_ERR_EVT, /* Error - out of GKI buffers */ |
| 89 | NFA_EE_NO_CB_ERR_EVT, /* Error - Can not find control block or wrong state */ |
nxpandroid | 65a0260 | 2017-01-13 19:13:19 +0530 | [diff] [blame] | 90 | #if (NXP_EXTNS == TRUE) |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 91 | NFA_EE_SET_MODE_INFO_EVT, |
nxpandroid | 9d47b70 | 2017-07-12 21:25:17 +0530 | [diff] [blame] | 92 | NFA_EE_PWR_LINK_CTRL_EVT, /* NFCEE Pwr and link cotnrol command Evt */ |
Suraj Uday Kotharkar | 11ae20f | 2018-07-20 23:29:36 +0530 | [diff] [blame] | 93 | NFA_EE_ADD_APDU_EVT, /* The status for adding an APDU pattern to a routing table entry*/ |
| 94 | NFA_EE_REMOVE_APDU_EVT /* The status for removing an APDU pattern from a routing table */ |
nxpandroid | 3e4012e | 2016-08-01 19:09:55 +0530 | [diff] [blame] | 95 | #endif |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 96 | }; |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 97 | typedef uint8_t tNFA_EE_EVT; |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 98 | |
| 99 | /* tNFA_NFCEE_INTERFACE values */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 100 | /* HCI Access Interface*/ |
| 101 | #define NFA_EE_INTERFACE_HCI_ACCESS NFC_NFCEE_INTERFACE_HCI_ACCESS |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 102 | typedef uint8_t tNFA_EE_INTERFACE; |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 103 | |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 104 | typedef uint8_t tNFA_EE_TAG; |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 105 | |
| 106 | /* for NFA_EeModeSet () */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 107 | #define NFA_EE_MD_ACTIVATE NFC_MODE_ACTIVATE |
| 108 | #define NFA_EE_MD_DEACTIVATE NFC_MODE_DEACTIVATE |
| 109 | typedef uint8_t tNFA_EE_MD; |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 110 | |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 111 | /* The device is on */ |
| 112 | #define NFA_EE_PWR_STATE_ON 0x01 |
| 113 | /* The device is switched off */ |
| 114 | #define NFA_EE_PWR_STATE_SWITCH_OFF 0x02 |
| 115 | /* The device's battery is removed */ |
| 116 | #define NFA_EE_PWR_STATE_BATT_OFF 0x04 |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 117 | typedef uint8_t tNFA_EE_PWR_STATE; |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 118 | |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 119 | /* NFCEE connected and inactive */ |
| 120 | #define NFA_EE_STATUS_INACTIVE NFC_NFCEE_STATUS_INACTIVE |
| 121 | /* NFCEE connected and active */ |
| 122 | #define NFA_EE_STATUS_ACTIVE NFC_NFCEE_STATUS_ACTIVE |
| 123 | /* NFCEE removed */ |
| 124 | #define NFA_EE_STATUS_REMOVED NFC_NFCEE_STATUS_REMOVED |
| 125 | /* waiting for response from NFCC */ |
| 126 | #define NFA_EE_STATUS_PENDING 0x10 |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 127 | typedef uint8_t tNFA_EE_STATUS; |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 128 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 129 | /* additional NFCEE Info */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 130 | typedef struct { |
| 131 | tNFA_EE_TAG tag; |
| 132 | uint8_t len; |
| 133 | uint8_t info[NFC_MAX_EE_INFO]; |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 134 | } tNFA_EE_TLV; |
| 135 | |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 136 | typedef struct { |
| 137 | tNFA_HANDLE ee_handle; /* handle for NFCEE oe DH */ |
| 138 | tNFA_EE_STATUS ee_status; /* The NFCEE status */ |
| 139 | uint8_t num_interface; /* number of NFCEE interface*/ |
| 140 | tNFA_EE_INTERFACE |
| 141 | ee_interface[NFC_MAX_EE_INTERFACE]; /* NFCEE supported interface */ |
| 142 | uint8_t num_tlvs; /* number of TLVs */ |
| 143 | tNFA_EE_TLV ee_tlv[NFC_MAX_EE_TLVS]; /* the TLV */ |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 144 | uint8_t ee_power_supply_status; /* The NFCEE Power supply */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 145 | #if (NXP_EXTNS == TRUE) |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 146 | uint8_t hci_enable_state; |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 147 | tNFA_NFC_PROTOCOL la_protocol; /* Listen A protocol */ |
| 148 | tNFA_NFC_PROTOCOL lb_protocol; /* Listen B protocol */ |
| 149 | tNFA_NFC_PROTOCOL lf_protocol; /* Listen F protocol */ |
| 150 | tNFA_NFC_PROTOCOL lbp_protocol; /* Listen B' protocol */ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 151 | #endif |
| 152 | } tNFA_EE_INFO; |
| 153 | |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 154 | typedef struct { |
| 155 | tNFA_STATUS status; /* NFA_STATUS_OK is successful */ |
| 156 | uint8_t num_ee; /* number of NFCEEs found */ |
| 157 | tNFA_EE_INFO ee_info[NFA_EE_MAX_EE_SUPPORTED]; /*NFCEE information */ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 158 | } tNFA_EE_DISCOVER; |
| 159 | |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 160 | typedef struct { |
| 161 | tNFA_HANDLE ee_handle; /* Handle of NFCEE */ |
| 162 | tNFA_STATUS status; /* NFA_STATUS_OK is successful */ |
| 163 | tNFA_EE_INTERFACE |
| 164 | ee_interface; /* NFCEE interface associated with this connection */ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 165 | } tNFA_EE_CONNECT; |
| 166 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 167 | typedef tNFC_EE_TRIGGER tNFA_EE_TRIGGER; |
| 168 | |
| 169 | /* Union of NFCEE action parameter depending on the associated trigger */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 170 | typedef union { |
| 171 | tNFA_NFC_PROTOCOL protocol; /* NFA_EE_TRGR_RF_PROTOCOL: the protocol that |
| 172 | triggers this event */ |
| 173 | tNFC_RF_TECH technology; /* NFA_EE_TRGR_RF_TECHNOLOGY:the technology that |
| 174 | triggers this event */ |
| 175 | tNFC_AID aid; /* NFA_EE_TRGR_SELECT : the AID in the received SELECT AID |
| 176 | command */ |
| 177 | tNFC_APP_INIT app_init; /* NFA_EE_TRGR_APP_INIT: The information for the |
| 178 | application initiated trigger */ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 179 | } tNFA_EE_ACTION_PARAM; |
| 180 | |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 181 | typedef struct { |
| 182 | tNFA_HANDLE ee_handle; /* Handle of NFCEE */ |
| 183 | tNFA_EE_TRIGGER trigger; /* the trigger of this event */ |
| 184 | tNFA_EE_ACTION_PARAM param; |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 185 | } tNFA_EE_ACTION; |
| 186 | |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 187 | typedef struct { |
| 188 | tNFA_HANDLE ee_handle; /* Handle of NFCEE */ |
| 189 | tNFA_STATUS status; /* NFA_STATUS_OK is successful */ |
| 190 | tNFA_EE_STATUS ee_status; /* The NFCEE status */ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 191 | } tNFA_EE_MODE_SET; |
| 192 | |
nxpandroid | 65a0260 | 2017-01-13 19:13:19 +0530 | [diff] [blame] | 193 | #if (NXP_EXTNS == TRUE) |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 194 | typedef struct { |
| 195 | tNFA_STATUS status; |
| 196 | uint8_t nfcee_id; |
| 197 | } tNFA_EE_SET_MODE_INFO; |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 198 | typedef struct { |
| 199 | tNFA_STATUS status; /* NFA_STATUS_OK is successful */ |
| 200 | tNFA_EE_STATUS ee_status; /* The NFCEE status */ |
nxpandroid | 3e4012e | 2016-08-01 19:09:55 +0530 | [diff] [blame] | 201 | } tNFA_EE_PWR_LNK_CTRL; |
| 202 | #endif |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 203 | typedef struct { |
| 204 | tNFA_HANDLE ee_handle; /* Handle of MFCEE */ |
| 205 | tNFA_NFC_PROTOCOL la_protocol; /* Listen A protocol */ |
| 206 | tNFA_NFC_PROTOCOL lb_protocol; /* Listen B protocol */ |
| 207 | tNFA_NFC_PROTOCOL lf_protocol; /* Listen F protocol */ |
| 208 | tNFA_NFC_PROTOCOL lbp_protocol; /* Listen B' protocol */ |
nxf24591 | 48793b6 | 2018-06-06 14:40:49 +0530 | [diff] [blame] | 209 | #if (NXP_EXTNS == TRUE) |
| 210 | tNFA_NFC_PROTOCOL pa_protocol; /* Passive poll A SWP Reader */ |
| 211 | tNFA_NFC_PROTOCOL pb_protocol; /* Passive poll B SWP Reader */ |
| 212 | uint8_t ee_req_op; /* add or remove req ntf*/ |
| 213 | #endif |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 214 | } tNFA_EE_DISCOVER_INFO; |
| 215 | |
| 216 | /* Data for NFA_EE_DISCOVER_REQ_EVT */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 217 | typedef struct { |
| 218 | uint8_t status; /* NFA_STATUS_OK if successful */ |
| 219 | uint8_t num_ee; /* number of MFCEE information */ |
| 220 | tNFA_EE_DISCOVER_INFO ee_disc_info[NFA_EE_MAX_EE_SUPPORTED - |
| 221 | 1]; /* NFCEE DISCOVER Request info */ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 222 | } tNFA_EE_DISCOVER_REQ; |
| 223 | |
| 224 | /* Data for NFA_EE_DATA_EVT */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 225 | typedef struct { |
| 226 | tNFA_HANDLE handle; /* Connection handle */ |
| 227 | uint16_t len; /* Length of data */ |
| 228 | uint8_t* p_buf; /* Data buffer */ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 229 | } tNFA_EE_DATA; |
| 230 | |
| 231 | /* Union of all EE callback structures */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 232 | typedef union { |
| 233 | tNFA_STATUS |
| 234 | status; /* NFA_STATUS_OK is successful; otherwise NFA_STATUS_FAILED */ |
| 235 | tNFA_EE_DATA data; |
| 236 | tNFA_HANDLE handle; |
| 237 | tNFA_EE_DISCOVER ee_discover; |
| 238 | tNFA_STATUS ee_register; |
| 239 | tNFA_STATUS deregister; |
| 240 | tNFA_STATUS add_aid; |
| 241 | tNFA_STATUS remove_aid; |
Suraj Uday Kotharkar | 6f7757b | 2018-05-10 15:58:29 +0530 | [diff] [blame] | 242 | tNFA_STATUS add_sc; |
| 243 | tNFA_STATUS remove_sc; |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 244 | tNFA_STATUS set_tech; |
| 245 | tNFA_STATUS set_proto; |
| 246 | uint16_t size; |
| 247 | tNFA_EE_CONNECT connect; |
| 248 | tNFA_EE_ACTION action; |
| 249 | tNFA_EE_MODE_SET mode_set; |
nxpandroid | 65a0260 | 2017-01-13 19:13:19 +0530 | [diff] [blame] | 250 | #if (NXP_EXTNS == TRUE) |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 251 | tNFA_EE_SET_MODE_INFO ee_set_mode_info; |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 252 | tNFA_EE_PWR_LNK_CTRL pwr_lnk_ctrl; |
nxpandroid | 3e4012e | 2016-08-01 19:09:55 +0530 | [diff] [blame] | 253 | #endif |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 254 | tNFA_EE_INFO new_ee; |
| 255 | tNFA_EE_DISCOVER_REQ discover_req; |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 256 | } tNFA_EE_CBACK_DATA; |
| 257 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 258 | /* EE callback */ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 259 | typedef void(tNFA_EE_CBACK)(tNFA_EE_EVT event, tNFA_EE_CBACK_DATA* p_data); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 260 | |
| 261 | /***************************************************************************** |
| 262 | ** External Function Declarations |
| 263 | *****************************************************************************/ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 264 | |
| 265 | /******************************************************************************* |
| 266 | ** |
| 267 | ** Function NFA_EeDiscover |
| 268 | ** |
| 269 | ** Description This function retrieves the NFCEE information from NFCC. |
| 270 | ** The NFCEE information is reported in NFA_EE_DISCOVER_EVT. |
| 271 | ** |
| 272 | ** This function may be called when a system supports removable |
| 273 | ** NFCEEs, |
| 274 | ** |
| 275 | ** Returns NFA_STATUS_OK if information is retrieved successfully |
| 276 | ** NFA_STATUS_FAILED If wrong state (retry later) |
| 277 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 278 | ** |
| 279 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 280 | extern tNFA_STATUS NFA_EeDiscover(tNFA_EE_CBACK* p_cback); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 281 | |
| 282 | /******************************************************************************* |
| 283 | ** |
| 284 | ** Function NFA_EeGetInfo |
| 285 | ** |
| 286 | ** Description This function retrieves the NFCEE information from NFA. |
| 287 | ** The actual number of NFCEE is returned in p_num_nfcee |
| 288 | ** and NFCEE information is returned in p_info |
| 289 | ** |
| 290 | ** Returns NFA_STATUS_OK if information is retrieved successfully |
| 291 | ** NFA_STATUS_FAILED If wrong state (retry later) |
| 292 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 293 | ** |
| 294 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 295 | extern tNFA_STATUS NFA_EeGetInfo(uint8_t* p_num_nfcee, tNFA_EE_INFO* p_info); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 296 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 297 | /******************************************************************************* |
| 298 | ** |
| 299 | ** Function NFA_EeRegister |
| 300 | ** |
| 301 | ** Description This function registers a callback function to receive the |
| 302 | ** events from NFA-EE module. |
| 303 | ** |
| 304 | ** Returns NFA_STATUS_OK if successfully initiated |
| 305 | ** NFA_STATUS_FAILED otherwise |
| 306 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 307 | ** |
| 308 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 309 | extern tNFA_STATUS NFA_EeRegister(tNFA_EE_CBACK* p_cback); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 310 | |
| 311 | /******************************************************************************* |
| 312 | ** |
| 313 | ** Function NFA_EeDeregister |
| 314 | ** |
| 315 | ** Description This function de-registers the callback function |
| 316 | ** |
| 317 | ** Returns NFA_STATUS_OK if successfully initiated |
| 318 | ** NFA_STATUS_FAILED otherwise |
| 319 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 320 | ** |
| 321 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 322 | extern tNFA_STATUS NFA_EeDeregister(tNFA_EE_CBACK* p_cback); |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 323 | |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 324 | /******************************************************************************* |
| 325 | ** |
| 326 | ** Function NFA_EeModeSet |
| 327 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 328 | ** Description This function is called to activate |
| 329 | ** (mode = NFA_EE_MD_ACTIVATE) or deactivate |
| 330 | ** (mode = NFA_EE_MD_DEACTIVATE) the NFCEE identified by the |
| 331 | ** given ee_handle. The result of this operation is reported |
| 332 | ** with the NFA_EE_MODE_SET_EVT. |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 333 | ** |
| 334 | ** Returns NFA_STATUS_OK if successfully initiated |
| 335 | ** NFA_STATUS_FAILED otherwise |
| 336 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 337 | ** |
| 338 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 339 | extern tNFA_STATUS NFA_EeModeSet(tNFA_HANDLE ee_handle, tNFA_EE_MD mode); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 340 | |
| 341 | /******************************************************************************* |
| 342 | ** |
| 343 | ** Function NFA_EeSetDefaultTechRouting |
| 344 | ** |
| 345 | ** Description This function is called to add, change or remove the |
| 346 | ** default routing based on RF technology in the listen mode |
| 347 | ** routing table for the given ee_handle. The status of this |
| 348 | ** operation is reported as the NFA_EE_SET_TECH_CFG_EVT. |
| 349 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 350 | ** Note: If RF discovery is started, |
| 351 | ** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should |
| 352 | ** happen before calling this function |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 353 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 354 | ** Note: NFA_EeUpdateNow() should be called after last NFA-EE |
| 355 | ** function to change the listen mode routing is called. |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 356 | ** |
| 357 | ** Returns NFA_STATUS_OK if successfully initiated |
| 358 | ** NFA_STATUS_FAILED otherwise |
| 359 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 360 | ** |
| 361 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 362 | extern tNFA_STATUS NFA_EeSetDefaultTechRouting( |
| 363 | tNFA_HANDLE ee_handle, tNFA_TECHNOLOGY_MASK technologies_switch_on, |
| 364 | tNFA_TECHNOLOGY_MASK technologies_switch_off, |
Suraj Uday Kotharkar | 1e7b99a | 2018-05-10 16:14:37 +0530 | [diff] [blame] | 365 | tNFA_TECHNOLOGY_MASK technologies_battery_off, |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 366 | tNFA_TECHNOLOGY_MASK technologies_screen_lock, |
| 367 | tNFA_TECHNOLOGY_MASK technologies_screen_off, |
Suraj Uday Kotharkar | 1e7b99a | 2018-05-10 16:14:37 +0530 | [diff] [blame] | 368 | tNFA_TECHNOLOGY_MASK technologies_screen_off_lock); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 369 | |
| 370 | /******************************************************************************* |
| 371 | ** |
| 372 | ** Function NFA_EeSetDefaultProtoRouting |
| 373 | ** |
| 374 | ** Description This function is called to add, change or remove the |
| 375 | ** default routing based on Protocol in the listen mode routing |
| 376 | ** table for the given ee_handle. The status of this |
| 377 | ** operation is reported as the NFA_EE_SET_PROTO_CFG_EVT. |
| 378 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 379 | ** Note: If RF discovery is started, |
| 380 | ** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should |
| 381 | ** happen before calling this function |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 382 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 383 | ** Note: NFA_EeUpdateNow() should be called after last NFA-EE |
| 384 | ** function to change the listen mode routing is called. |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 385 | ** |
| 386 | ** Returns NFA_STATUS_OK if successfully initiated |
| 387 | ** NFA_STATUS_FAILED otherwise |
| 388 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 389 | ** |
| 390 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 391 | extern tNFA_STATUS NFA_EeSetDefaultProtoRouting( |
| 392 | tNFA_HANDLE ee_handle, tNFA_PROTOCOL_MASK protocols_switch_on, |
| 393 | tNFA_PROTOCOL_MASK protocols_switch_off, |
Suraj Uday Kotharkar | 1e7b99a | 2018-05-10 16:14:37 +0530 | [diff] [blame] | 394 | tNFA_PROTOCOL_MASK protocols_battery_off, |
Suraj Uday Kotharkar | d70a4c0 | 2018-05-15 17:55:49 +0530 | [diff] [blame] | 395 | tNFA_PROTOCOL_MASK protocols_screen_lock, |
| 396 | tNFA_PROTOCOL_MASK protocols_screen_off, |
| 397 | tNFA_PROTOCOL_MASK protocols_screen_off_lock); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 398 | |
| 399 | /******************************************************************************* |
| 400 | ** |
| 401 | ** Function NFA_EeAddAidRouting |
| 402 | ** |
| 403 | ** Description This function is called to add an AID entry in the |
| 404 | ** listen mode routing table in NFCC. The status of this |
| 405 | ** operation is reported as the NFA_EE_ADD_AID_EVT. |
| 406 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 407 | ** Note: If RF discovery is started, |
| 408 | ** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should |
| 409 | ** happen before calling this function |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 410 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 411 | ** Note: NFA_EeUpdateNow() should be called after last NFA-EE |
| 412 | ** function to change the listen mode routing is called. |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 413 | ** |
| 414 | ** Returns NFA_STATUS_OK if successfully initiated |
| 415 | ** NFA_STATUS_FAILED otherwise |
| 416 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 417 | ** |
| 418 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 419 | extern tNFA_STATUS NFA_EeAddAidRouting(tNFA_HANDLE ee_handle, uint8_t aid_len, |
| 420 | uint8_t* p_aid, |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 421 | tNFA_EE_PWR_STATE power_state, |
| 422 | uint8_t aidInfo); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 423 | |
| 424 | /******************************************************************************* |
| 425 | ** |
| 426 | ** Function NFA_EeRemoveAidRouting |
| 427 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 428 | ** Description This function is called to remove the given AID entry from |
| 429 | ** the listen mode routing table. If the entry configures VS, |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 430 | ** it is also removed. The status of this operation is reported |
| 431 | ** as the NFA_EE_REMOVE_AID_EVT. |
| 432 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 433 | ** Note: If RF discovery is started, |
| 434 | ** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should |
| 435 | ** happen before calling this function |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 436 | ** |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 437 | ** Note: NFA_EeUpdateNow() should be called after last NFA-EE |
| 438 | ** function to change the listen mode routing is called. |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 439 | ** |
| 440 | ** Returns NFA_STATUS_OK if successfully initiated |
| 441 | ** NFA_STATUS_FAILED otherwise |
| 442 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 443 | ** |
| 444 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 445 | extern tNFA_STATUS NFA_EeRemoveAidRouting(uint8_t aid_len, uint8_t* p_aid); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 446 | |
| 447 | /******************************************************************************* |
Suraj Uday Kotharkar | 6f7757b | 2018-05-10 15:58:29 +0530 | [diff] [blame] | 448 | ** |
| 449 | ** Function NFA_EeAddSystemCodeRouting |
| 450 | ** |
| 451 | ** Description This function is called to add an system code entry in the |
| 452 | ** listen mode routing table in NFCC. The status of this |
| 453 | ** operation is reported as the NFA_EE_ADD_SYSCODE_EVT. |
| 454 | ** |
| 455 | ** Note: If RF discovery is started, |
| 456 | ** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should |
| 457 | ** happen before calling this function |
| 458 | ** |
| 459 | ** Note: NFA_EeUpdateNow() should be called after last NFA-EE |
| 460 | ** function to change the listen mode routing is called. |
| 461 | ** |
| 462 | ** Returns NFA_STATUS_OK if successfully initiated |
| 463 | ** NFA_STATUS_FAILED otherwise |
| 464 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 465 | ** |
| 466 | *******************************************************************************/ |
| 467 | extern tNFA_STATUS NFA_EeAddSystemCodeRouting(uint16_t systemcode, |
| 468 | tNFA_HANDLE ee_handle, |
| 469 | tNFA_EE_PWR_STATE power_state); |
| 470 | |
| 471 | /******************************************************************************* |
| 472 | ** |
| 473 | ** Function NFA_EeRemoveSystemCodeRouting |
| 474 | ** |
| 475 | ** Description This function is called to remove the given System Code |
| 476 | *based entry from |
| 477 | ** the listen mode routing table. The status of this operation |
| 478 | *is reported |
| 479 | ** as the NFA_EE_REMOVE_SYSCODE_EVT. |
| 480 | ** |
| 481 | ** Note: If RF discovery is started, |
| 482 | ** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should |
| 483 | ** happen before calling this function |
| 484 | ** |
| 485 | ** Note: NFA_EeUpdateNow() should be called after last NFA-EE |
| 486 | ** function to change the listen mode routing is called. |
| 487 | ** |
| 488 | ** Returns NFA_STATUS_OK if successfully initiated |
| 489 | ** NFA_STATUS_FAILED otherwise |
| 490 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 491 | ** |
| 492 | *******************************************************************************/ |
| 493 | extern tNFA_STATUS NFA_EeRemoveSystemCodeRouting(uint16_t systemcode); |
Suraj Uday Kotharkar | 11ae20f | 2018-07-20 23:29:36 +0530 | [diff] [blame] | 494 | #if (NXP_EXTNS == TRUE) |
| 495 | /******************************************************************************* |
| 496 | ** |
| 497 | ** Function NFA_EeAddApduPatternRouting |
| 498 | ** |
| 499 | ** Description This function is called to add an APDU pattern entry in the |
| 500 | ** listen mode routing table in NFCC. The status of this |
| 501 | ** operation is reported as the NFA_EE_ADD_APDU_EVT. |
| 502 | ** |
| 503 | ** Note: If RF discovery is started, |
| 504 | ** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should |
| 505 | ** happen before calling this function |
| 506 | ** |
| 507 | ** Note: NFA_EeUpdateNow() should be called after last NFA-EE |
| 508 | ** function to change the listen mode routing is called. |
| 509 | ** |
| 510 | ** Returns NFA_STATUS_OK if successfully initiated |
| 511 | ** NFA_STATUS_FAILED otherwise |
| 512 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 513 | ** |
| 514 | *******************************************************************************/ |
| 515 | extern tNFA_STATUS NFA_EeAddApduPatternRouting(uint8_t apdu_data_len,uint8_t* apdu_data, uint8_t apdu_mask_len, |
| 516 | uint8_t* apdu_mask, tNFA_HANDLE ee_handle, uint8_t power_state); |
Suraj Uday Kotharkar | 6f7757b | 2018-05-10 15:58:29 +0530 | [diff] [blame] | 517 | |
| 518 | /******************************************************************************* |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 519 | ** |
Suraj Uday Kotharkar | 11ae20f | 2018-07-20 23:29:36 +0530 | [diff] [blame] | 520 | ** Function NFA_EeRemoveApduPatternRouting |
| 521 | ** |
| 522 | ** Description This function is called to remove the given APDU pattern entry from |
| 523 | ** the listen mode routing table. If the entry configures VS, |
| 524 | ** it is also removed. The status of this operation is reported |
| 525 | ** as the NFA_EE_REMOVE_APDU_EVT. |
| 526 | ** |
| 527 | ** Note: If RF discovery is started, |
| 528 | ** NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT should |
| 529 | ** happen before calling this function |
| 530 | ** |
| 531 | ** Note: NFA_EeUpdateNow() should be called after last NFA-EE |
| 532 | ** function to change the listen mode routing is called. |
| 533 | ** |
| 534 | ** Returns NFA_STATUS_OK if successfully initiated |
| 535 | ** NFA_STATUS_FAILED otherwise |
| 536 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 537 | ** |
| 538 | *******************************************************************************/ |
| 539 | extern tNFA_STATUS NFA_EeRemoveApduPatternRouting(uint8_t apdu_len, uint8_t* p_apdu); |
| 540 | #endif |
| 541 | /******************************************************************************* |
| 542 | ** |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 543 | ** Function NFA_EeGetLmrtRemainingSize |
| 544 | ** |
| 545 | ** Description This function is called to get remaining size of the |
| 546 | ** Listen Mode Routing Table. |
| 547 | ** The remaining size is reported in NFA_EE_REMAINING_SIZE_EVT |
| 548 | ** |
| 549 | ** Returns NFA_STATUS_OK if successfully initiated |
| 550 | ** NFA_STATUS_FAILED otherwise |
| 551 | ** |
| 552 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 553 | extern tNFA_STATUS NFA_EeGetLmrtRemainingSize(void); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 554 | |
| 555 | /******************************************************************************* |
| 556 | ** |
| 557 | ** Function NFA_EeUpdateNow |
| 558 | ** |
| 559 | ** Description This function is called to send the current listen mode |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 560 | ** routing table and VS configuration to the NFCC (without |
| 561 | ** waiting for NFA_EE_ROUT_TIMEOUT_VAL). |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 562 | ** |
| 563 | ** The status of this operation is |
| 564 | ** reported with the NFA_EE_UPDATED_EVT. |
| 565 | ** |
| 566 | ** Returns NFA_STATUS_OK if successfully initiated |
| 567 | ** NFA_STATUS_SEMANTIC_ERROR is update is currently in progress |
| 568 | ** NFA_STATUS_FAILED otherwise |
| 569 | ** |
| 570 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 571 | extern tNFA_STATUS NFA_EeUpdateNow(void); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 572 | |
| 573 | /******************************************************************************* |
| 574 | ** |
| 575 | ** Function NFA_EeConnect |
| 576 | ** |
| 577 | ** Description Open connection to an NFCEE attached to the NFCC |
| 578 | ** |
| 579 | ** The status of this operation is |
| 580 | ** reported with the NFA_EE_CONNECT_EVT. |
| 581 | ** |
| 582 | ** Returns NFA_STATUS_OK if successfully initiated |
| 583 | ** NFA_STATUS_FAILED otherwise |
| 584 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 585 | ** |
| 586 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 587 | extern tNFA_STATUS NFA_EeConnect(tNFA_HANDLE ee_handle, uint8_t ee_interface, |
| 588 | tNFA_EE_CBACK* p_cback); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 589 | |
| 590 | /******************************************************************************* |
| 591 | ** |
| 592 | ** Function NFA_EeSendData |
| 593 | ** |
| 594 | ** Description Send data to the given NFCEE. |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 595 | ** This function shall be called after NFA_EE_CONNECT_EVT is |
| 596 | ** reported and before NFA_EeDisconnect is called on the given |
| 597 | ** ee_handle. |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 598 | ** |
| 599 | ** Returns NFA_STATUS_OK if successfully initiated |
| 600 | ** NFA_STATUS_FAILED otherwise |
| 601 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 602 | ** |
| 603 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 604 | extern tNFA_STATUS NFA_EeSendData(tNFA_HANDLE ee_handle, uint16_t data_len, |
| 605 | uint8_t* p_data); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 606 | |
| 607 | /******************************************************************************* |
| 608 | ** |
| 609 | ** Function NFA_EeDisconnect |
| 610 | ** |
| 611 | ** Description Disconnect (if a connection is currently open) from an |
| 612 | ** NFCEE interface. The result of this operation is reported |
| 613 | ** with the NFA_EE_DISCONNECT_EVT. |
| 614 | ** |
| 615 | ** Returns NFA_STATUS_OK if successfully initiated |
| 616 | ** NFA_STATUS_FAILED otherwise |
| 617 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 618 | ** |
| 619 | *******************************************************************************/ |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 620 | extern tNFA_STATUS NFA_EeDisconnect(tNFA_HANDLE ee_handle); |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 621 | |
nxpandroid | 8f6d053 | 2017-07-12 18:25:30 +0530 | [diff] [blame] | 622 | #if (NXP_EXTNS == TRUE) |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 623 | /******************************************************************************* |
| 624 | ** |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 625 | ** Function NFA_AllEeGetInfo |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 626 | ** |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 627 | ** Description This function retrieves the All NFCEE's independent of |
| 628 | ** their status information from NFA. |
| 629 | ** The actual number of NFCEE is returned in p_num_nfcee |
| 630 | ** and NFCEE information is returned in p_info |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 631 | ** |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 632 | ** Returns NFA_STATUS_OK if information is retrieved successfully |
| 633 | ** NFA_STATUS_FAILED If wrong state (retry later) |
| 634 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 635 | ** |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 636 | *******************************************************************************/ |
| 637 | extern tNFA_STATUS NFA_AllEeGetInfo(uint8_t* p_num_nfcee, tNFA_EE_INFO* p_info); |
| 638 | /******************************************************************************* |
| 639 | ** |
| 640 | ** Function NFA_SendPowerLinkCommand |
| 641 | ** |
| 642 | ** Description This function sends the power link control command |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 643 | ** |
| 644 | ** Returns NFA_STATUS_OK if successfully initiated |
| 645 | ** NFA_STATUS_FAILED otherwise |
| 646 | ** NFA_STATUS_INVALID_PARAM If bad parameter |
| 647 | ** |
| 648 | *******************************************************************************/ |
nxf24591 | c1cbeab | 2018-02-21 17:32:26 +0530 | [diff] [blame] | 649 | extern tNFA_STATUS NFA_SendPowerLinkCommand(uint8_t nfcee_id, uint8_t cfg_value); |
Ravishinde | 26233bb | 2018-08-06 22:16:08 +0530 | [diff] [blame] | 650 | /******************************************************************************* |
| 651 | ** |
| 652 | ** Function NFA_GetAidTableSize |
| 653 | ** |
| 654 | ** Description This function is called to get the AID routing table size. |
| 655 | ** |
| 656 | ** Returns Maximum AID routing table size. |
| 657 | ** |
| 658 | *******************************************************************************/ |
| 659 | extern uint16_t NFA_GetAidTableSize(); |
| 660 | |
| 661 | /******************************************************************************* |
| 662 | ** |
| 663 | ** Function NFA_GetRemainingAidTableSize |
| 664 | ** |
| 665 | ** Description This function is called to get the remaining AID routing |
| 666 | ** table size. |
| 667 | ** |
| 668 | ** Returns Remaining AID routing table size. |
| 669 | ** |
| 670 | *******************************************************************************/ |
| 671 | extern uint16_t NFA_GetRemainingAidTableSize(); |
| 672 | #endif /* #if (NXP_EXTNS == TRUE) */ |
nxpandroid | c761165 | 2015-09-23 16:42:05 +0530 | [diff] [blame] | 673 | #endif /* NFA_EE_API_H */ |