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