1 /****************************************************************************** 2 * 3 * Copyright (C) 2024 The Android Open Source Project. 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 #pragma once 19 /******************************************************************************* 20 ** 21 ** Function NFA_T4tNfcEeOpenConnection 22 ** 23 ** Description Creates logical connection with T4T Nfcee 24 ** 25 ** Returns: 26 ** NFA_STATUS_OK if successfully initiated 27 ** NFA_STATUS_FAILED otherwise 28 ** 29 *******************************************************************************/ 30 tNFA_STATUS NFA_T4tNfcEeOpenConnection(); 31 32 /******************************************************************************* 33 ** 34 ** Function NFA_T4tNfcEeClear 35 ** 36 ** Description Clear Ndef data to T4T NFC EE. 37 ** For file ID NDEF, perform the NDEF detection procedure 38 ** and set the NDEF tag data to zero. 39 ** Returns: 40 ** NFA_STATUS_OK if successfully initiated 41 ** NFA_STATUS_FAILED otherwise 42 ** 43 *******************************************************************************/ 44 tNFA_STATUS NFA_T4tNfcEeClear(uint8_t* p_fileId); 45 46 /******************************************************************************* 47 ** 48 ** Function NFA_T4tNfcEeWrite 49 ** 50 ** Description Write data to the T4T NFC EE of given file id. 51 ** If file ID is of NDEF, perform the NDEF detection procedure 52 ** and write the NDEF tag data using the appropriate method for 53 ** NDEF EE. 54 ** If File ID is Not NDEF then reads proprietary way 55 ** Returns: 56 ** NFA_STATUS_OK if successfully initiated 57 ** NFA_STATUS_FAILED otherwise 58 ** 59 *******************************************************************************/ 60 tNFA_STATUS NFA_T4tNfcEeWrite(uint8_t* p_fileId, uint8_t* p_data, uint32_t len); 61 62 /******************************************************************************* 63 ** 64 ** Function NFA_T4tNfcEeRead 65 ** 66 ** Description Read T4T message from NFCC area.of given file id. 67 ** If file ID is of NDEF, perform the NDEF detection 68 ** procedure and read the NDEF tag data using the appropriate 69 ** method for NDEF EE. If File ID is Not NDEF then reads 70 ** proprietary way 71 ** 72 ** Returns: 73 ** NFA_STATUS_OK if successfully initiated 74 ** NFA_STATUS_FAILED otherwise 75 ** 76 *******************************************************************************/ 77 tNFA_STATUS NFA_T4tNfcEeRead(uint8_t* p_fileId); 78 79 /******************************************************************************* 80 ** 81 ** Function NFA_T4tNfcEeCloseConnection 82 ** 83 ** Description Closes logical connection with T4T Nfcee 84 ** 85 ** Returns: 86 ** NFA_STATUS_OK if successfully initiated 87 ** NFA_STATUS_FAILED otherwise 88 ** 89 *******************************************************************************/ 90 tNFA_STATUS NFA_T4tNfcEeCloseConnection(); 91