1e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/******************************************************************************
2e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
3e9629bad30a9f478b336ab46b8e6e02f7f87af46Evan Chu *  Copyright (C) 2003-2014 Broadcom Corporation
4e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
5e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  Licensed under the Apache License, Version 2.0 (the "License");
6e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  you may not use this file except in compliance with the License.
7e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  You may obtain a copy of the License at:
8e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
9e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  http://www.apache.org/licenses/LICENSE-2.0
10e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
11e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  Unless required by applicable law or agreed to in writing, software
12e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  distributed under the License is distributed on an "AS IS" BASIS,
13e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  See the License for the specific language governing permissions and
15e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  limitations under the License.
16e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
17e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project ******************************************************************************/
18e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
195c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen
20e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/******************************************************************************
21e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
22e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  This is the interface file for non valtile memory call-in functions.
23e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
24e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project ******************************************************************************/
25e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifndef NFA_NV_CI_H
26e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NV_CI_H
27e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
28e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "nfa_nv_co.h"
29e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
30e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*****************************************************************************
31e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  Constants and data types
32e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*****************************************************************************/
33e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
34e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Read Ready Event */
35e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
36e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
37e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BT_HDR            hdr;
38e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_NV_CO_STATUS status;
39e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    int               fd;
40e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16            num_read;
41e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_NV_CI_READ_EVT;
42e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
43e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Write Ready Event */
44e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
45e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
46e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BT_HDR            hdr;
47e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_NV_CO_STATUS status;
48e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    int               fd;
49e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_NV_CI_WRITE_EVT;
50e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
51e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*****************************************************************************
52e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  Function Declarations
53e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*****************************************************************************/
54e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifdef __cplusplus
55e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projectextern "C"
56e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
57e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
58e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
59e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
60e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
61e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         nfa_nv_ci_write
62e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
63e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function sends an event to NFAA indicating the phone
64e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  has written the number of bytes specified in the call-out
65e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  function, nfa_nv_co_write (), and is ready for more data.
66e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  This function is used to control the TX data flow.
67e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  Note: The data buffer is released by the stack aioer
68e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                        calling this function.
69e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
70e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       status - NFA_NV_CO_OK, NFA_NV_CO_NOSPACE, or NFA_NV_CO_FAIL
71e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  evt - Used Internally by NFA -> MUST be same value passed
72e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                       in call-out function.
73e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
74e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          void
75e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
76e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
77e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern void nfa_nv_ci_write (tNFA_NV_CO_STATUS status);
78e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
79e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
80e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
81e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         nfa_nv_ci_read
82e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
83e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function sends an event to NFA indicating the phone has
84e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  read in the requested amount of data specified in the
85e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  nfa_nv_co_read () call-out function.  It should only be called
86e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  when the requested number of bytes has been read.
87e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
88e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       num_bytes_read - number of bytes read into the buffer
89e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      specified in the read callout-function.
90e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  status - NFA_NV_CO_OK if full buffer of data,
91e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                           NFA_NV_CO_EOF if the end of file has been reached,
92e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                           NFA_NV_CO_FAIL if an error has occurred.
93e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  evt - Used Internally by NFA -> MUST be same value passed
94e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                       in call-out function.
95e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
96e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          void
97e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
98e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
99e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern void nfa_nv_ci_read (UINT16            num_bytes_read,
100e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                    tNFA_NV_CO_STATUS status,
101e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                    UINT8             block);
102e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
103e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
104e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifdef __cplusplus
105e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project}
106e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
107e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
108e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif /* BTA_FS_CI_H */
109e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
110