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