1 /****************************************************************************** 2 * 3 * Copyright (C) 2003-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 * 22 * This is the interface file for non valtile memory call-in functions. 23 * 24 ******************************************************************************/ 25 #ifndef NFA_NV_CI_H 26 #define NFA_NV_CI_H 27 28 #include "nfa_nv_co.h" 29 30 /***************************************************************************** 31 ** Constants and data types 32 *****************************************************************************/ 33 34 /* Read Ready Event */ 35 typedef struct 36 { 37 BT_HDR hdr; 38 tNFA_NV_CO_STATUS status; 39 int fd; 40 UINT16 num_read; 41 } tNFA_NV_CI_READ_EVT; 42 43 /* Write Ready Event */ 44 typedef struct 45 { 46 BT_HDR hdr; 47 tNFA_NV_CO_STATUS status; 48 int fd; 49 } tNFA_NV_CI_WRITE_EVT; 50 51 /***************************************************************************** 52 ** Function Declarations 53 *****************************************************************************/ 54 #ifdef __cplusplus 55 extern "C" 56 { 57 #endif 58 59 /******************************************************************************* 60 ** 61 ** Function nfa_nv_ci_write 62 ** 63 ** Description This function sends an event to NFAA indicating the phone 64 ** has written the number of bytes specified in the call-out 65 ** function, nfa_nv_co_write (), and is ready for more data. 66 ** This function is used to control the TX data flow. 67 ** Note: The data buffer is released by the stack aioer 68 ** calling this function. 69 ** 70 ** Parameters status - NFA_NV_CO_OK, NFA_NV_CO_NOSPACE, or NFA_NV_CO_FAIL 71 ** evt - Used Internally by NFA -> MUST be same value passed 72 ** in call-out function. 73 ** 74 ** Returns void 75 ** 76 *******************************************************************************/ 77 NFC_API extern void nfa_nv_ci_write (tNFA_NV_CO_STATUS status); 78 79 /******************************************************************************* 80 ** 81 ** Function nfa_nv_ci_read 82 ** 83 ** Description This function sends an event to NFA indicating the phone has 84 ** read in the requested amount of data specified in the 85 ** nfa_nv_co_read () call-out function. It should only be called 86 ** when the requested number of bytes has been read. 87 ** 88 ** Parameters num_bytes_read - number of bytes read into the buffer 89 ** specified in the read callout-function. 90 ** status - NFA_NV_CO_OK if full buffer of data, 91 ** NFA_NV_CO_EOF if the end of file has been reached, 92 ** NFA_NV_CO_FAIL if an error has occurred. 93 ** evt - Used Internally by NFA -> MUST be same value passed 94 ** in call-out function. 95 ** 96 ** Returns void 97 ** 98 *******************************************************************************/ 99 NFC_API extern void nfa_nv_ci_read (UINT16 num_bytes_read, 100 tNFA_NV_CO_STATUS status, 101 UINT8 block); 102 103 104 #ifdef __cplusplus 105 } 106 #endif 107 108 #endif /* BTA_FS_CI_H */ 109 110