1e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/******************************************************************************
2e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
3e9629bad30a9f478b336ab46b8e6e02f7f87af46Evan Chu *  Copyright (C) 2009-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 file contains the Near Field Communication (NFC) API function
23e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  external definitions.
24e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
25e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project ******************************************************************************/
26e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
27e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifndef NFC_API_H
28e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_API_H
29e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
30e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "nfc_target.h"
31e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "nci_defs.h"
32e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "nfc_hal_api.h"
33e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "gki.h"
34e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
35e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFC application return status codes */
36e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_OK                   NCI_STATUS_OK                   /* Command succeeded    */
37e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_REJECTED             NCI_STATUS_REJECTED             /* Command is rejected. */
38e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_MSG_CORRUPTED        NCI_STATUS_MESSAGE_CORRUPTED    /* Message is corrupted */
39e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_BUFFER_FULL          NCI_STATUS_BUFFER_FULL          /* buffer full          */
40e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_FAILED               NCI_STATUS_FAILED               /* failed               */
41e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_NOT_INITIALIZED      NCI_STATUS_NOT_INITIALIZED      /* not initialized      */
42e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_SYNTAX_ERROR         NCI_STATUS_SYNTAX_ERROR         /* Syntax error         */
43e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_SEMANTIC_ERROR       NCI_STATUS_SEMANTIC_ERROR       /* Semantic error       */
44e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_UNKNOWN_GID          NCI_STATUS_UNKNOWN_GID          /* Unknown NCI Group ID */
45e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_UNKNOWN_OID          NCI_STATUS_UNKNOWN_OID          /* Unknown NCI Opcode   */
46e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_INVALID_PARAM        NCI_STATUS_INVALID_PARAM        /* Invalid Parameter    */
47e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_MSG_SIZE_TOO_BIG     NCI_STATUS_MSG_SIZE_TOO_BIG     /* Message size too big */
48e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_ALREADY_STARTED      NCI_STATUS_ALREADY_STARTED      /* Already started      */
49e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_ACTIVATION_FAILED    NCI_STATUS_ACTIVATION_FAILED    /* Activation Failed    */
50e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_TEAR_DOWN            NCI_STATUS_TEAR_DOWN            /* Tear Down Error      */
51e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_RF_TRANSMISSION_ERR  NCI_STATUS_RF_TRANSMISSION_ERR  /* RF transmission error*/
52e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_RF_PROTOCOL_ERR      NCI_STATUS_RF_PROTOCOL_ERR      /* RF protocol error    */
53e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_TIMEOUT              NCI_STATUS_TIMEOUT              /* RF Timeout           */
54e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_EE_INTF_ACTIVE_FAIL  NCI_STATUS_EE_INTF_ACTIVE_FAIL  /* EE Intf activate err */
55e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_EE_TRANSMISSION_ERR  NCI_STATUS_EE_TRANSMISSION_ERR  /* EE transmission error*/
56e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_EE_PROTOCOL_ERR      NCI_STATUS_EE_PROTOCOL_ERR      /* EE protocol error    */
57e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_EE_TIMEOUT           NCI_STATUS_EE_TIMEOUT           /* EE Timeout           */
58e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
59e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* 0xE0 ~0xFF are proprietary status codes */
60e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_CMD_STARTED          0xE3/* Command started successfully                     */
61e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_HW_TIMEOUT           0xE4/* NFCC Timeout in responding to an NCI command     */
62e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_CONTINUE             0xE5/* More (same) event to follow                      */
63e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_REFUSED              0xE6/* API is called to perform illegal function        */
64e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_BAD_RESP             0xE7/* Wrong format of R-APDU, CC file or NDEF file     */
65e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_CMD_NOT_CMPLTD       0xE8/* 7816 Status Word is not command complete(0x9000) */
66e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_NO_BUFFERS           0xE9/* Out of GKI buffers                               */
67e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_WRONG_PROTOCOL       0xEA/* Protocol mismatch between API and activated one  */
68e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_BUSY                 0xEB/* Another Tag command is already in progress       */
69e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
70e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_LINK_LOSS            0xFC                      /* Link Loss                  */
71e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_BAD_LENGTH           0xFD                      /* data len exceeds MIU       */
72e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_BAD_HANDLE           0xFE                      /* invalid handle             */
73e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_STATUS_CONGESTED            0xFF                      /* congested                  */
74e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_STATUS;
75e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
76e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
77e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
78e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/**********************************************
79e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project * NFC Config Parameter IDs defined by NCI
80e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project **********************************************/
81e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_TOTAL_DURATION     NCI_PARAM_ID_TOTAL_DURATION
82e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_CON_DEVICES_LIMIT  NCI_PARAM_ID_CON_DEVICES_LIMIT
83e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_PA_BAILOUT         NCI_PARAM_ID_PA_BAILOUT
84e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_PB_AFI             NCI_PARAM_ID_PB_AFI
85e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_PB_BAILOUT         NCI_PARAM_ID_PB_BAILOUT
86e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_PB_ATTRIB_PARAM1   NCI_PARAM_ID_PB_ATTRIB_PARAM1
87e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_PF_BIT_RATE        NCI_PARAM_ID_PF_BIT_RATE
88e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_PB_H_INFO          NCI_PARAM_ID_PB_H_INFO
89e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_BITR_NFC_DEP       NCI_PARAM_ID_BITR_NFC_DEP
90e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_ATR_REQ_GEN_BYTES  NCI_PARAM_ID_ATR_REQ_GEN_BYTES
91e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_ATR_REQ_CONFIG     NCI_PARAM_ID_ATR_REQ_CONFIG
92e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LA_HIST_BY         NCI_PARAM_ID_LA_HIST_BY
93e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LA_NFCID1          NCI_PARAM_ID_LA_NFCID1
94e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_PI_BIT_RATE        NCI_PARAM_ID_PI_BIT_RATE
95e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LA_BIT_FRAME_SDD   NCI_PARAM_ID_LA_BIT_FRAME_SDD
96e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LA_PLATFORM_CONFIG NCI_PARAM_ID_LA_PLATFORM_CONFIG
97e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LA_SEL_INFO        NCI_PARAM_ID_LA_SEL_INFO
98e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LI_BIT_RATE        NCI_PARAM_ID_LI_BIT_RATE
99e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LB_SENSB_INFO      NCI_PARAM_ID_LB_SENSB_INFO
100e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LB_PROTOCOL        NCI_PARAM_ID_LB_PROTOCOL
101e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LB_H_INFO          NCI_PARAM_ID_LB_H_INFO_RSP
102e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LB_NFCID0          NCI_PARAM_ID_LB_NFCID0
103e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LB_APPDATA         NCI_PARAM_ID_LB_APPDATA
104e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LB_SFGI            NCI_PARAM_ID_LB_SFGI
105e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LB_ADC_FO          NCI_PARAM_ID_LB_ADC_FO
106e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID1         NCI_PARAM_ID_LF_T3T_ID1
107e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID2         NCI_PARAM_ID_LF_T3T_ID2
108e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID3         NCI_PARAM_ID_LF_T3T_ID3
109e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID4         NCI_PARAM_ID_LF_T3T_ID4
110e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID5         NCI_PARAM_ID_LF_T3T_ID5
111e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID6         NCI_PARAM_ID_LF_T3T_ID6
112e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID7         NCI_PARAM_ID_LF_T3T_ID7
113e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID8         NCI_PARAM_ID_LF_T3T_ID8
114e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID9         NCI_PARAM_ID_LF_T3T_ID9
115e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID10        NCI_PARAM_ID_LF_T3T_ID10
116e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID11        NCI_PARAM_ID_LF_T3T_ID11
117e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID12        NCI_PARAM_ID_LF_T3T_ID12
118e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID13        NCI_PARAM_ID_LF_T3T_ID13
119e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID14        NCI_PARAM_ID_LF_T3T_ID14
120e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID15        NCI_PARAM_ID_LF_T3T_ID15
121e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_ID16        NCI_PARAM_ID_LF_T3T_ID16
122e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_PROTOCOL        NCI_PARAM_ID_LF_PROTOCOL
123e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_PMM         NCI_PARAM_ID_LF_T3T_PMM
124e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_MAX         NCI_PARAM_ID_LF_T3T_MAX
125e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_T3T_FLAGS2      NCI_PARAM_ID_LF_T3T_FLAGS2
126e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_FWI                NCI_PARAM_ID_FWI
127e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_LF_CON_BITR_F      NCI_PARAM_ID_LF_CON_BITR_F
128e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_WT                 NCI_PARAM_ID_WT
129e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_ATR_RES_GEN_BYTES  NCI_PARAM_ID_ATR_RES_GEN_BYTES
130e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_ATR_RSP_CONFIG     NCI_PARAM_ID_ATR_RSP_CONFIG
131e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_RF_FIELD_INFO      NCI_PARAM_ID_RF_FIELD_INFO
132e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PMID_NFC_DEP_OP         NCI_PARAM_ID_NFC_DEP_OP
133e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PARAM_ID_RF_EE_ACTION   NCI_PARAM_ID_RF_EE_ACTION
134e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PARAM_ID_ISO_DEP_OP     NCI_PARAM_ID_ISO_DEP_OP
135e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
136e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_ROUTE_TAG_TECH           NCI_ROUTE_TAG_TECH      /* Technology based routing  */
137e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_ROUTE_TAG_PROTO          NCI_ROUTE_TAG_PROTO     /* Protocol based routing  */
138e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_ROUTE_TAG_AID            NCI_ROUTE_TAG_AID       /* AID routing */
139e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_ROUTE_TLV_ENTRY_SIZE     4 /* tag, len, 2 byte value for technology/protocol based routing */
140e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
141e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* For routing */
142e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DH_ID                NCI_DH_ID   /* for DH */
143e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* To identify the loopback test */
144e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_TEST_ID              NCI_TEST_ID            /* use a proprietary range */
145e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
146e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_PMID;
147e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_TL_SIZE                     2
148e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_SAVED_CMD_SIZE              2
149e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
150e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNCI_DISCOVER_MAPS   tNFC_DISCOVER_MAPS;
151e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNCI_DISCOVER_PARAMS tNFC_DISCOVER_PARAMS;
152e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
153e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* all NFC Manager Callback functions have prototype like void (cback) (UINT8 event, void *p_data)
154e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project * tNFC_DATA_CBACK uses connection id as the first parameter; range 0x00-0x0F.
155e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project * tNFC_DISCOVER_CBACK uses tNFC_DISCOVER_EVT; range  0x4000 ~
156e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project * tNFC_RESPONSE_CBACK uses tNFC_RESPONSE_EVT; range  0x5000 ~
157e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project */
158e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
159e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_FIRST_DEVT      0x4000
160e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_FIRST_REVT      0x5000
161e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_FIRST_CEVT      0x6000
162e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_FIRST_TEVT      0x8000
163e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
164e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the events reported on tNFC_RESPONSE_CBACK */
165e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projectenum
166e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
167e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_ENABLE_REVT = NFC_FIRST_REVT,       /* 0  Enable event                  */
168e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_DISABLE_REVT,                       /* 1  Disable event                 */
169e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_SET_CONFIG_REVT,                    /* 2  Set Config Response           */
170e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_GET_CONFIG_REVT,                    /* 3  Get Config Response           */
171e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_NFCEE_DISCOVER_REVT,                /* 4  Discover NFCEE response       */
172e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_NFCEE_INFO_REVT,                    /* 5  Discover NFCEE Notification   */
173e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_NFCEE_MODE_SET_REVT,                /* 6  NFCEE Mode Set response       */
174e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_RF_FIELD_REVT,                      /* 7  RF Field information          */
175e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_EE_ACTION_REVT,                     /* 8  EE Action notification        */
176e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_EE_DISCOVER_REQ_REVT,               /* 9  EE Discover Req notification  */
177e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_SET_ROUTING_REVT,                   /* 10 Configure Routing response    */
178e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_GET_ROUTING_REVT,                   /* 11 Retrieve Routing response     */
179e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_RF_COMM_PARAMS_UPDATE_REVT,         /* 12 RF Communication Param Update */
180e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_GEN_ERROR_REVT,                     /* 13 generic error notification    */
181e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_NFCC_RESTART_REVT,                  /* 14 NFCC has been re-initialized  */
182e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_NFCC_TIMEOUT_REVT,                  /* 15 NFCC is not responding        */
183e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_NFCC_TRANSPORT_ERR_REVT,            /* 16 NCI Tranport error            */
184e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_NFCC_POWER_OFF_REVT,                /* 17 NFCC turned off               */
185e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
186e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_FIRST_VS_REVT                       /* First vendor-specific rsp event  */
187e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project};
188e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT16 tNFC_RESPONSE_EVT;
189e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
190e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projectenum
191e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
192e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_CONN_CREATE_CEVT = NFC_FIRST_CEVT,  /* 0  Conn Create Response          */
193e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_CONN_CLOSE_CEVT,                    /* 1  Conn Close Response           */
194e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_DEACTIVATE_CEVT,                    /* 2  Deactivate response/notificatn*/
195e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_DATA_CEVT,                          /* 3  Data                          */
1967c69b2723b60a59df4aaa58b13985b3483b291bfEvan Chu    NFC_ERROR_CEVT,                         /* 4  generic or interface error    */
1977c69b2723b60a59df4aaa58b13985b3483b291bfEvan Chu    NFC_DATA_START_CEVT                     /* 5  received the first fragment on RF link */
198e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project};
199e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT16 tNFC_CONN_EVT;
200e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
201e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCC_INFO_LEN       4
202e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifndef NFC_NFCC_MAX_NUM_VS_INTERFACE
203e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCC_MAX_NUM_VS_INTERFACE   4
204e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
205e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
206e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
207e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status.                */
208e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   nci_version;    /* the NCI version of NFCC          */
209e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   max_conn;       /* max number of connections by NFCC*/
210e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT32                  nci_features;   /* the NCI features of NFCC         */
211e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16                  nci_interfaces; /* the NCI interfaces of NFCC       */
212e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16                  max_ce_table;   /* the max routing table size       */
213e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16                  max_param_size; /* Max Size for Large Parameters    */
214e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   manufacture_id; /* the Manufacture ID for NFCC      */
215e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   nfcc_info[NFC_NFCC_INFO_LEN];/* the Manufacture Info for NFCC      */
216e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   vs_interface[NFC_NFCC_MAX_NUM_VS_INTERFACE];  /* the NCI VS interfaces of NFCC    */
217e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_ENABLE_REVT;
218e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
219e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_NUM_IDS     125
220e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_SET_CONFIG_REVT */
221e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
222e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
223e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status.                */
224e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   num_param_id;   /* Number of rejected NCI Param ID  */
225e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   param_ids[NFC_MAX_NUM_IDS];/* NCI Param ID          */
226e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_SET_CONFIG_REVT;
227e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
228e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_GET_CONFIG_REVT */
229e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
230e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
231e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status.    */
232e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16                  tlv_size;       /* The length of TLV    */
233e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   *p_param_tlvs;  /* TLV                  */
234e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_GET_CONFIG_REVT;
235e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
236e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_NFCEE_DISCOVER_REVT */
237e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
238e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
239e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status.    */
240e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   num_nfcee;      /* The number of NFCEE  */
241e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_NFCEE_DISCOVER_REVT;
242e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
243e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_INTERFACE_APDU         NCI_NFCEE_INTERFACE_APDU
244e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_INTERFACE_HCI_ACCESS   NCI_NFCEE_INTERFACE_HCI_ACCESS
245e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_INTERFACE_T3T          NCI_NFCEE_INTERFACE_T3T
246e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_INTERFACE_TRANSPARENT  NCI_NFCEE_INTERFACE_TRANSPARENT
247e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_INTERFACE_PROPRIETARY  NCI_NFCEE_INTERFACE_PROPRIETARY
248e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_NFCEE_INTERFACE;
249e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
250e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_TAG_HW_ID             NCI_NFCEE_TAG_HW_ID
251e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_TAG_ATR_BYTES         NCI_NFCEE_TAG_ATR_BYTES
252e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_TAG_T3T_INFO          NCI_NFCEE_TAG_T3T_INFO
253e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_TAG_HCI_HOST_ID       NCI_NFCEE_TAG_HCI_HOST_ID
254e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_NFCEE_TAG;
255e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* additional NFCEE Info */
256e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
257e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
258e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_NFCEE_TAG          tag;
259e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   len;
260e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   info[NFC_MAX_EE_INFO];
261e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_NFCEE_TLV;
262e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
263e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_STATUS_INACTIVE       NCI_NFCEE_STS_CONN_INACTIVE/* NFCEE connected and inactive */
264e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_STATUS_ACTIVE         NCI_NFCEE_STS_CONN_ACTIVE  /* NFCEE connected and active   */
265e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCEE_STATUS_REMOVED        NCI_NFCEE_STS_REMOVED      /* NFCEE removed                */
266e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_NFCEE_INFO_REVT */
267e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
268e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
269e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;                 /* The event status - place holder  */
270e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   nfcee_id;               /* NFCEE ID                         */
271e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   ee_status;              /* The NFCEE status.                */
272e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   num_interface;          /* number of NFCEE interfaces       */
273e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   ee_interface[NFC_MAX_EE_INTERFACE];/* NFCEE interface       */
274e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   num_tlvs;               /* number of TLVs                   */
275e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_NFCEE_TLV          ee_tlv[NFC_MAX_EE_TLVS];/* The TLVs associated with NFCEE   */
276e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_NFCEE_INFO_REVT;
277e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
278e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MODE_ACTIVATE          NCI_NFCEE_MD_ACTIVATE
279e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MODE_DEACTIVATE        NCI_NFCEE_MD_DEACTIVATE
280e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_NFCEE_MODE;
281e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_NFCEE_MODE_SET_REVT */
282e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
283e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
284e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;                 /* The event status.*/
285e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   nfcee_id;               /* NFCEE ID         */
286e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_NFCEE_MODE         mode;                   /* NFCEE mode       */
287e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_NFCEE_MODE_SET_REVT;
288e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
289e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_AID_LEN     NCI_MAX_AID_LEN     /* 16 */
290e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
291e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_CE_GET_ROUTING_REVT */
292e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
293e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
294e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status                 */
295e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   nfcee_id;       /* NFCEE ID                         */
296e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   num_tlvs;       /* number of TLVs                   */
297e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   tlv_size;       /* the total len of all TLVs        */
298e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   param_tlvs[NFC_MAX_EE_TLV_SIZE];/* the TLVs         */
299e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_GET_ROUTING_REVT;
300e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
301e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
302e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_CONN_CREATE_CEVT */
303e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
304e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
305e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status                 */
306e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   dest_type;      /* the destination type             */
307e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   id;             /* NFCEE ID  or RF Discovery ID     */
308e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   buff_size;      /* The max buffer size              */
309e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   num_buffs;      /* The number of buffers            */
310e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_CONN_CREATE_CEVT;
311e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
312e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_CONN_CLOSE_CEVT */
313e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
314e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
315e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status                 */
316e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_CONN_CLOSE_CEVT;
317e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
318e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_DATA_CEVT */
319e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
320e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
321e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status                 */
322e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BT_HDR                  *p_data;        /* The received Data                */
323e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_DATA_CEVT;
324e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
325e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* RF Field Status */
326e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_STS_NO_REMOTE    NCI_RF_STS_NO_REMOTE    /* No field generated by remote device  */
327e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_STS_REMOTE       NCI_RF_STS_REMOTE       /* field generated by remote device     */
328e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_RF_STS;
329e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
330e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* RF Field Technologies */
331e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_TECHNOLOGY_A     NCI_RF_TECHNOLOGY_A
332e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_TECHNOLOGY_B     NCI_RF_TECHNOLOGY_B
333e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_TECHNOLOGY_F     NCI_RF_TECHNOLOGY_F
334e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_TECHNOLOGY_15693 NCI_RF_TECHNOLOGY_15693
335e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_RF_TECH;
336e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
337e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
338e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Supported Protocols */
339e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PROTOCOL_UNKNOWN    NCI_PROTOCOL_UNKNOWN  /* Unknown */
340e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PROTOCOL_T1T        NCI_PROTOCOL_T1T      /* Type1Tag    - NFC-A            */
341e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PROTOCOL_T2T        NCI_PROTOCOL_T2T      /* Type2Tag    - NFC-A            */
342e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PROTOCOL_T3T        NCI_PROTOCOL_T3T      /* Type3Tag    - NFC-F            */
343e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PROTOCOL_ISO_DEP    NCI_PROTOCOL_ISO_DEP  /* Type 4A,4B  - NFC-A or NFC-B   */
344e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PROTOCOL_NFC_DEP    NCI_PROTOCOL_NFC_DEP  /* NFCDEP/LLCP - NFC-A or NFC-F       */
345e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PROTOCOL_B_PRIME    NCI_PROTOCOL_B_PRIME
346e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PROTOCOL_15693      NCI_PROTOCOL_15693
347e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_PROTOCOL_KOVIO      NCI_PROTOCOL_KOVIO
348e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_PROTOCOL;
349e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
350e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Discovery Types/Detected Technology and Mode */
351e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_POLL_A           NCI_DISCOVERY_TYPE_POLL_A
352e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_POLL_B           NCI_DISCOVERY_TYPE_POLL_B
353e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_POLL_F           NCI_DISCOVERY_TYPE_POLL_F
354e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_POLL_A_ACTIVE    NCI_DISCOVERY_TYPE_POLL_A_ACTIVE
355e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_POLL_F_ACTIVE    NCI_DISCOVERY_TYPE_POLL_F_ACTIVE
356e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_POLL_ISO15693    NCI_DISCOVERY_TYPE_POLL_ISO15693
357e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_POLL_B_PRIME     NCI_DISCOVERY_TYPE_POLL_B_PRIME
358e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_POLL_KOVIO       NCI_DISCOVERY_TYPE_POLL_KOVIO
359e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_LISTEN_A         NCI_DISCOVERY_TYPE_LISTEN_A
360e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_LISTEN_B         NCI_DISCOVERY_TYPE_LISTEN_B
361e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_LISTEN_F         NCI_DISCOVERY_TYPE_LISTEN_F
362e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_LISTEN_A_ACTIVE  NCI_DISCOVERY_TYPE_LISTEN_A_ACTIVE
363e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_LISTEN_F_ACTIVE  NCI_DISCOVERY_TYPE_LISTEN_F_ACTIVE
364e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_LISTEN_ISO15693  NCI_DISCOVERY_TYPE_LISTEN_ISO15693
365e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DISCOVERY_TYPE_LISTEN_B_PRIME   NCI_DISCOVERY_TYPE_LISTEN_B_PRIME
366e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_DISCOVERY_TYPE;
367e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_RF_TECH_N_MODE;
368e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
369e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Select Response codes */
370e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_SEL_RES_NFC_FORUM_T2T           0x00
371e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_SEL_RES_MF_CLASSIC              0x08
372e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
373e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Bit Rates */
374e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_BIT_RATE_106        NCI_BIT_RATE_106    /* 106 kbit/s */
375e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_BIT_RATE_212        NCI_BIT_RATE_212    /* 212 kbit/s */
376e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_BIT_RATE_424        NCI_BIT_RATE_424    /* 424 kbit/s */
377e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_BIT_RATE_848        NCI_BIT_RATE_848    /* 848 Kbit/s */
378e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_BIT_RATE_1696       NCI_BIT_RATE_1696   /* 1696 Kbit/s*/
379e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_BIT_RATE_3392       NCI_BIT_RATE_3392   /* 3392 Kbit/s*/
380e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_BIT_RATE_6784       NCI_BIT_RATE_6784   /* 6784 Kbit/s*/
381e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_BIT_RATE;
382e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
383e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/**********************************************
384e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project * Interface Types
385e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project **********************************************/
386e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_INTERFACE_EE_DIRECT_RF  NCI_INTERFACE_EE_DIRECT_RF
387e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_INTERFACE_FRAME         NCI_INTERFACE_FRAME
388e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_INTERFACE_ISO_DEP       NCI_INTERFACE_ISO_DEP
389e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_INTERFACE_NDEF          NCI_INTERFACE_NDEF
390e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_INTERFACE_NFC_DEP       NCI_INTERFACE_NFC_DEP
391e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_INTERFACE_LLCP_LOW      NCI_INTERFACE_LLCP_LOW
392e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_INTERFACE_LLCP_HIGH     NCI_INTERFACE_LLCP_HIGH
393e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_INTERFACE_VS_T2T_CE     NCI_INTERFACE_VS_T2T_CE
394e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNCI_INTF_TYPE tNFC_INTF_TYPE;
395e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
396e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/**********************************************
397e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  Deactivation Type
398e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project **********************************************/
399e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DEACTIVATE_TYPE_IDLE        NCI_DEACTIVATE_TYPE_IDLE
400e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DEACTIVATE_TYPE_SLEEP       NCI_DEACTIVATE_TYPE_SLEEP
401e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DEACTIVATE_TYPE_SLEEP_AF    NCI_DEACTIVATE_TYPE_SLEEP_AF
402e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DEACTIVATE_TYPE_DISCOVERY   NCI_DEACTIVATE_TYPE_DISCOVERY
403e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_DEACT_TYPE;
404e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
405e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/**********************************************
406e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  Deactivation Reasons
407e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project **********************************************/
408e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DEACTIVATE_REASON_DH_REQ        NCI_DEACTIVATE_REASON_DH_REQ
409e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DEACTIVATE_REASON_ENDPOINT_REQ  NCI_DEACTIVATE_REASON_ENDPOINT_REQ
410e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DEACTIVATE_REASON_RF_LINK_LOSS  NCI_DEACTIVATE_REASON_RF_LINK_LOSS
411e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_DEACTIVATE_REASON_NFCB_BAD_AFI  NCI_DEACTIVATE_REASON_NFCB_BAD_AFI
412e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_DEACT_REASON;
413e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
414e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_RF_FIELD_REVT */
415e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
416e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
417e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;     /* The event status - place holder. */
418e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_RF_STS             rf_field;   /* RF Field Status                  */
419e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_RF_FIELD_REVT;
420e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
421e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_APP_DATA_LEN    40
422e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
423e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
424e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   len_aid;                /* length of application id */
425e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   aid[NFC_MAX_AID_LEN];   /* application id           */
426e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_AID;
427e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
428e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
429e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   len_aid;                /* length of application id */
430e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   aid[NFC_MAX_AID_LEN];   /* application id           */
431e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   len_data;               /* len of application data  */
432e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   data[NFC_MAX_APP_DATA_LEN];  /* application data    */
433e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_APP_INIT;
434e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
435e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_EE_TRIG_SELECT              NCI_EE_TRIG_7816_SELECT  /* ISO 7816-4 SELECT command */
436e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_EE_TRIG_RF_PROTOCOL         NCI_EE_TRIG_RF_PROTOCOL  /* RF Protocol changed       */
437e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_EE_TRIG_RF_TECHNOLOGY       NCI_EE_TRIG_RF_TECHNOLOGY/* RF Technology changed     */
438e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_EE_TRIG_APP_INIT            NCI_EE_TRIG_APP_INIT     /* Application initiation    */
439e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_EE_TRIGGER;
440e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
441e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
442e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_EE_TRIGGER         trigger;        /* the trigger of this event        */
443e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    union
444e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    {
445e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_PROTOCOL       protocol;
446e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_RF_TECH        technology;
447e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_AID            aid;
448e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_APP_INIT       app_init;
449e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    } param; /* Discovery Type specific parameters */
450e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_ACTION_DATA;
451e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
452e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_EE_ACTION_REVT */
453e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
454e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
455e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status - place holder  */
456e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   nfcee_id;       /* NFCEE ID                         */
457e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_ACTION_DATA        act_data;       /* data associated /w the action    */
458e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_EE_ACTION_REVT;
459e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
460e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_EE_DISC_OP_ADD      0
461e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_EE_DISC_OP_REMOVE   1
462e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_EE_DISC_OP;
463e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
464e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
465e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_EE_DISC_OP         op;             /* add or remove this entry         */
466e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   nfcee_id;       /* NFCEE ID                         */
467e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_RF_TECH_N_MODE     tech_n_mode;    /* Discovery Technology and Mode    */
468e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_PROTOCOL           protocol;       /* NFC protocol                     */
469e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_EE_DISCOVER_INFO;
470e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
471e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifndef NFC_MAX_EE_DISC_ENTRIES
472e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_EE_DISC_ENTRIES     6
473e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
474e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_EE_DISCOVER_ENTRY_LEN   5 /* T, L, V(NFCEE ID, TechnMode, Protocol) */
475e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_EE_DISCOVER_INFO_LEN    3 /* NFCEE ID, TechnMode, Protocol */
476e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_EE_DISCOVER_REQ_REVT */
477e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
478e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
479e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status - place holder  */
480e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   num_info;       /* number of entries in info[]      */
481e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_EE_DISCOVER_INFO   info[NFC_MAX_EE_DISC_ENTRIES];  /* discovery request from NFCEE */
482e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_EE_DISCOVER_REQ_REVT;
483e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
484e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef union
485e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
486e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS                 status;     /* The event status. */
487e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_ENABLE_REVT            enable;
488e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_SET_CONFIG_REVT        set_config;
489e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_GET_CONFIG_REVT        get_config;
490e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_NFCEE_DISCOVER_REVT    nfcee_discover;
491e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_NFCEE_INFO_REVT        nfcee_info;
492e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_NFCEE_MODE_SET_REVT    mode_set;
493e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_RF_FIELD_REVT          rf_field;
494e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS                 cfg_routing;
495e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_GET_ROUTING_REVT       get_routing;
496e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_EE_ACTION_REVT         ee_action;
497e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_EE_DISCOVER_REQ_REVT   ee_discover_req;
498e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    void                        *p_vs_evt_data;
499e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_RESPONSE;
500e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
501e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*************************************
502e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  RESPONSE Callback Functions
503e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**************************************/
504e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFC_RESPONSE_CBACK) (tNFC_RESPONSE_EVT event, tNFC_RESPONSE *p_data);
505e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
506e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* The events reported on tNFC_VS_CBACK */
507e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* The event is (NCI_RSP_BIT|oid) for response and (NCI_NTF_BIT|oid) for notification*/
508e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
509e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFC_VS_EVT;
510e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
511e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*************************************
512e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  Proprietary (Vendor Specific) Callback Functions
513e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**************************************/
514e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFC_VS_CBACK) (tNFC_VS_EVT event, UINT16 data_len, UINT8 *p_data);
515e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
516e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the events reported on tNFC_DISCOVER_CBACK */
517e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projectenum
518e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
519e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_START_DEVT = NFC_FIRST_DEVT,    /* Status of NFC_DiscoveryStart     */
520e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_MAP_DEVT,                       /* Status of NFC_DiscoveryMap       */
521e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_RESULT_DEVT,                    /* The responses from remote device */
522e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_SELECT_DEVT,                    /* Status of NFC_DiscoverySelect    */
523e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_ACTIVATE_DEVT,                  /* RF interface is activated        */
524e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_DEACTIVATE_DEVT                 /* Status of RF deactivation        */
525e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project};
526e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT16 tNFC_DISCOVER_EVT;
527e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
528e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_START_DEVT */
529e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNFC_STATUS tNFC_START_DEVT;
530e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
531e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNCI_RF_PA_PARAMS tNFC_RF_PA_PARAMS;
532e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_SENSB_RES_LEN         NCI_MAX_SENSB_RES_LEN
533e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCID0_MAX_LEN          4
534e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
535e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
536e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       sensb_res_len;/* Length of SENSB_RES Response (Byte 2 - Byte 12 or 13) Available after Technology Detection */
537e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       sensb_res[NFC_MAX_SENSB_RES_LEN]; /* SENSB_RES Response (ATQ) */
538e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       nfcid0[NFC_NFCID0_MAX_LEN];
539e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_RF_PB_PARAMS;
540e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
541e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_SENSF_RES_LEN       NCI_MAX_SENSF_RES_LEN
542e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_NFCID2_LEN              NCI_NFCID2_LEN
543e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
544e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
545e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       bit_rate;/* NFC_BIT_RATE_212 or NFC_BIT_RATE_424 */
546e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       sensf_res_len;/* Length of SENSF_RES Response (Byte 2 - Byte 17 or 19) Available after Technology Detection */
547e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       sensf_res[NFC_MAX_SENSF_RES_LEN]; /* SENSB_RES Response */
548e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       nfcid2[NFC_NFCID2_LEN];  /* NFCID2 generated by the Local NFCC for NFC-DEP Protocol.Available for Frame Interface  */
549e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       mrti_check;
550e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       mrti_update;
551e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_RF_PF_PARAMS;
552e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
553e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNCI_RF_LF_PARAMS tNFC_RF_LF_PARAMS;
554e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
555e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_ISO15693_UID_LEN        8
556e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
557e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
558e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       flag;
559e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       dsfid;
560e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       uid[NFC_ISO15693_UID_LEN];
561e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_RF_PISO15693_PARAMS;
562e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
5635c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#ifndef NFC_KOVIO_MAX_LEN
5645c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFC_KOVIO_MAX_LEN       32
5655c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#endif
566e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
567e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
568e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       uid_len;
569e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       uid[NFC_KOVIO_MAX_LEN];
570e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_RF_PKOVIO_PARAMS;
571e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
5725c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenentypedef union
5735c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen{
5745c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    tNFC_RF_PA_PARAMS   pa;
5755c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    tNFC_RF_PB_PARAMS   pb;
5765c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    tNFC_RF_PF_PARAMS   pf;
5775c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    tNFC_RF_LF_PARAMS   lf;
5785c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    tNFC_RF_PISO15693_PARAMS pi93;
5795c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    tNFC_RF_PKOVIO_PARAMS pk;
5805c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen} tNFC_RF_TECH_PARAMU;
5815c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen
582e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
583e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
584e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_DISCOVERY_TYPE     mode;
5855c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    tNFC_RF_TECH_PARAMU     param;
586e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_RF_TECH_PARAMS;
587e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
588e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_RESULT_DEVT */
589e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
590e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
591e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status - place holder. */
592e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   rf_disc_id;     /* RF Discovery ID                  */
593e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   protocol;       /* supported protocol               */
594e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_RF_TECH_PARAMS     rf_tech_param;  /* RF technology parameters         */
595e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN                 more;           /* 0: last notification             */
596e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_RESULT_DEVT;
597e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
598e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_SELECT_DEVT */
599e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNFC_STATUS tNFC_SELECT_DEVT;
600e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
601e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_STOP_DEVT */
602e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNFC_STATUS tNFC_STOP_DEVT;
603e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
604e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_ATS_LEN             NCI_MAX_ATS_LEN
605e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_HIS_BYTES_LEN       NCI_MAX_HIS_BYTES_LEN
606e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_GEN_BYTES_LEN       NCI_MAX_GEN_BYTES_LEN
607e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
608e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
609e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
610e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
611e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       ats_res_len;                /* Length of ATS RES                */
612e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       ats_res[NFC_MAX_ATS_LEN];   /* ATS RES                          */
613e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN     nad_used;                   /* NAD is used or not               */
614e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       fwi;                        /* Frame Waiting time Integer       */
615e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       sfgi;                       /* Start-up Frame Guard time Integer*/
616e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       his_byte_len;               /* len of historical bytes          */
617e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       his_byte[NFC_MAX_HIS_BYTES_LEN];/* historical bytes             */
618e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_INTF_PA_ISO_DEP;
619e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
620e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
621e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
622e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       rats;  /* RATS */
623e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_INTF_LA_ISO_DEP;
624e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
625e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
626e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
627e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
628e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       atr_res_len;                /* Length of ATR_RES            */
629e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       atr_res[NFC_MAX_ATS_LEN];   /* ATR_RES (Byte 3 - Byte 17+n) */
630e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       max_payload_size;           /* 64, 128, 192 or 254          */
631e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       gen_bytes_len;              /* len of general bytes         */
632e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       gen_bytes[NFC_MAX_GEN_BYTES_LEN];/* general bytes           */
633e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       waiting_time;               /* WT -> Response Waiting Time RWT = (256 x 16/fC) x 2WT */
634e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_INTF_PA_NFC_DEP;
635e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
636e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Note: keep tNFC_INTF_PA_NFC_DEP data member in the same order as tNFC_INTF_LA_NFC_DEP */
637e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
638e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
639e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       atr_req_len;                /* Length of ATR_REQ            */
640e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       atr_req[NFC_MAX_ATS_LEN];   /* ATR_REQ (Byte 3 - Byte 18+n) */
641e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       max_payload_size;           /* 64, 128, 192 or 254          */
642e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       gen_bytes_len;              /* len of general bytes         */
643e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       gen_bytes[NFC_MAX_GEN_BYTES_LEN];/* general bytes           */
644e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_INTF_LA_NFC_DEP;
645e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNFC_INTF_LA_NFC_DEP tNFC_INTF_LF_NFC_DEP;
646e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNFC_INTF_PA_NFC_DEP tNFC_INTF_PF_NFC_DEP;
647e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
648e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_ATTRIB_LEN      NCI_MAX_ATTRIB_LEN
649e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
650e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
651e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
652e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       attrib_res_len;                /* Length of ATTRIB RES      */
653e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       attrib_res[NFC_MAX_ATTRIB_LEN];/* ATTRIB RES                */
654e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       hi_info_len;                   /* len of Higher layer Info  */
655e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       hi_info[NFC_MAX_GEN_BYTES_LEN];/* Higher layer Info         */
656e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       mbli;                          /* Maximum buffer length.    */
657e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_INTF_PB_ISO_DEP;
658e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
659e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
660e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
661e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       attrib_req_len;                /* Length of ATTRIB REQ      */
662e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       attrib_req[NFC_MAX_ATTRIB_LEN];/* ATTRIB REQ (Byte 2 - 10+k)*/
663e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       hi_info_len;                   /* len of Higher layer Info  */
664e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       hi_info[NFC_MAX_GEN_BYTES_LEN];/* Higher layer Info         */
665e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       nfcid0[NFC_NFCID0_MAX_LEN];    /* NFCID0                    */
666e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_INTF_LB_ISO_DEP;
667e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
668e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
669e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifndef NFC_MAX_RAW_PARAMS
670e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_RAW_PARAMS      16
671e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
672e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_RAW_PARAMS       16
673e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
674e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
675e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       param_len;
676e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       param[NFC_MAX_RAW_PARAMS];
677e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_INTF_FRAME;
678e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
679e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
680e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
681e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_INTF_TYPE      type;  /* Interface Type  1 Byte  See Table 67 */
682e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    union
683e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    {
684e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_INTF_LA_ISO_DEP    la_iso;
685e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_INTF_PA_ISO_DEP    pa_iso;
686e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_INTF_LB_ISO_DEP    lb_iso;
687e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_INTF_PB_ISO_DEP    pb_iso;
688e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_INTF_LA_NFC_DEP    la_nfc;
689e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_INTF_PA_NFC_DEP    pa_nfc;
690e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_INTF_LF_NFC_DEP    lf_nfc;
691e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_INTF_PF_NFC_DEP    pf_nfc;
692e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFC_INTF_FRAME         frame;
693e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    } intf_param;       /* Activation Parameters   0 - n Bytes */
694e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_INTF_PARAMS;
695e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
696e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_ACTIVATE_DEVT */
697e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
698e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
699e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   rf_disc_id;     /* RF Discovery ID          */
700e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_PROTOCOL           protocol;       /* supported protocol       */
701e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_RF_TECH_PARAMS     rf_tech_param;  /* RF technology parameters */
7025c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    tNFC_DISCOVERY_TYPE     data_mode;      /* for future Data Exchange */
703e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_BIT_RATE           tx_bitrate;     /* Data Exchange Tx Bitrate */
704e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_BIT_RATE           rx_bitrate;     /* Data Exchange Rx Bitrate */
705e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_INTF_PARAMS        intf_param;     /* interface type and params*/
706e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_ACTIVATE_DEVT;
707e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
708e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_DEACTIVATE_DEVT and NFC_DEACTIVATE_CEVT */
709e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
710e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
711e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status.        */
712e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_DEACT_TYPE         type;           /* De-activate type         */
713e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN                 is_ntf;         /* TRUE, if deactivate notif*/
714e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_DEACTIVATE_DEVT;
715e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
716e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef union
717e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
718e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;         /* The event status.        */
719e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_START_DEVT         start;
720e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_RESULT_DEVT        result;
721e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_SELECT_DEVT        select;
722e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STOP_DEVT          stop;
723e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_ACTIVATE_DEVT      activate;
724e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_DEACTIVATE_DEVT    deactivate;
725e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_DISCOVER;
726e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
727e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Min TR0 indicates to tag the min delay before responding after the end of command */
728e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR0_DEFAULT    0x00
729e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR0_48X        0x01    /* 48 x 16/fc */
730e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR0_16X        0x02    /* 16 x 16/fc */
731e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
732e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Min TR1 indicates to tag the min delay between subcarrier modulation and data transmission */
733e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR1_DEFAULT    0x00
734e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR1_64X        0x01    /* 64 x 16/fc */
735e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR1_16X        0x02    /* 16 x 16/fc */
736e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
737e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Min TR2 indicates to RW the min delay between EoS of tag and SoS of RW */
738e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR2_1792       0x00    /* 1792/fc (10etu + 32/fc) */
739e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR2_3328       0x01    /* 3328/fc (10etu + 128/fc) */
740e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR2_5376       0x02    /* 5376/fc (10etu + 256/fc) */
741e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_MIN_TR2_9472       0x03    /* 9472/fc (10etu + 512/fc) */
742e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
743e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_EOS_REQUIRED       0x00    /* EoS required */
744e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_EOS_NOT_REQUIRED   0x01    /* EoS not required */
745e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
746e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_SOS_REQUIRED       0x00    /* SoS required */
747e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_PARAM_SOS_NOT_REQUIRED   0x01    /* SoS not required */
748e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
749e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
750e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
751e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN                 include_rf_tech_mode;   /* TRUE if including RF Tech and Mode update    */
752e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_RF_TECH_N_MODE     rf_tech_n_mode;         /* RF tech and mode                             */
753e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN                 include_tx_bit_rate;    /* TRUE if including Tx bit rate update         */
754e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_BIT_RATE           tx_bit_rate;            /* Transmit Bit Rate                            */
755e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN                 include_rx_bit_rate;    /* TRUE if including Rx bit rate update         */
756e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_BIT_RATE           rx_bit_rate;            /* Receive Bit Rate                             */
757e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN                 include_nfc_b_config;   /* TRUE if including NFC-B data exchange config */
758e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   min_tr0;                /* Minimun TR0                                  */
759e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   min_tr1;                /* Minimun TR1                                  */
760e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   suppression_eos;        /* Suppression of EoS                           */
761e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   suppression_sos;        /* Suppression of SoS                           */
762e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8                   min_tr2;                /* Minimun TR1                                  */
763e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_RF_COMM_PARAMS;
764e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
765e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*************************************
766e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  DISCOVER Callback Functions
767e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**************************************/
768e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFC_DISCOVER_CBACK) (tNFC_DISCOVER_EVT event, tNFC_DISCOVER *p_data);
769e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
770e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the events reported on tNFC_TEST_CBACK */
771e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projectenum
772e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
773e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_LOOPBACK_TEVT = NFC_FIRST_TEVT, /* 0  Loopback test             */
774e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_RF_CONTROL_TEVT,                /* 1  RF control Test response  */
775e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    NFC_RF_FIELD_DONE_TEVT              /* 1  RF control Test notificatn*/
776e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project};
777e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT16 tNFC_TEST_EVT;
778e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
779e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_LOOPBACK_TEVT */
780e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
781e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
782e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;     /* The event status.            */
783e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BT_HDR                  *p_data;    /* The loop back data from NFCC */
784e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_LOOPBACK_TEVT;
785e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
786e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* the data type associated with NFC_RF_CONTROL_TEVT */
787e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNFC_STATUS tNFC_RF_CONTROL_TEVT;
788e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
789e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef union
790e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
791e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;     /* The event status.            */
792e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_LOOPBACK_TEVT      loop_back;
793e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_RF_CONTROL_TEVT    rf_control;
794e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_TEST;
795e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
796e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*************************************
797e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  TEST Callback Functions
798e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**************************************/
799e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFC_TEST_CBACK) (tNFC_TEST_EVT event, tNFC_TEST *p_data);
800e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
801e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
802e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNFC_DEACTIVATE_DEVT tNFC_DEACTIVATE_CEVT;
803e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef union
804e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
805e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_STATUS             status;     /* The event status. */
806e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_CONN_CREATE_CEVT   conn_create;
807e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_CONN_CLOSE_CEVT    conn_close;
808e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_DEACTIVATE_CEVT    deactivate;
809e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_DATA_CEVT          data;
810e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFC_CONN;
811e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
812e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*************************************
813e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  Data Callback Functions
814e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**************************************/
815e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFC_CONN_CBACK) (UINT8 conn_id, tNFC_CONN_EVT event, tNFC_CONN *p_data);
816e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_MAX_CONN_ID                15
817e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_ILLEGAL_CONN_ID            0xFF
818e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFC_RF_CONN_ID                 0    /* the static connection ID for RF traffic */
819e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
820e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
821e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
822e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*************************************
823e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  Status callback function
824e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**************************************/
825e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFC_STATUS_CBACK) (tNFC_STATUS status);
826e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
827e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*****************************************************************************
828e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  EXTERNAL FUNCTION DECLARATIONS
829e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*****************************************************************************/
830e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifdef __cplusplus
831e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projectextern "C" {
832e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
833e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
834e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
835e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
836e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_Enable
837e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
838e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function enables NFC. Prior to calling NFC_Enable:
839e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - the NFCC must be powered up, and ready to receive commands.
840e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - GKI must be enabled
841e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - NFC_TASK must be started
842e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - NCIT_TASK must be started (if using dedicated NCI transport)
843e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
844e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  This function opens the NCI transport (if applicable),
845e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  resets the NFC controller, and initializes the NFC subsystems.
846e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
847e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  When the NFC startup procedure is completed, an
848e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFC_ENABLE_REVT is returned to the application using the
849e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  tNFC_RESPONSE_CBACK.
850e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
851e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
852e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
853e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
854e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_Enable (tNFC_RESPONSE_CBACK *p_cback);
855e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
856e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
857e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
858e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_Disable
859e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
860e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function performs clean up routines for shutting down
861e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFC and closes the NCI transport (if using dedicated NCI
862e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  transport).
863e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
864e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  When the NFC shutdown procedure is completed, an
865e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFC_DISABLED_REVT is returned to the application using the
866e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  tNFC_RESPONSE_CBACK.
867e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
868e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          nothing
869e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
870e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
871e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern void NFC_Disable (void);
872e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
873e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
874e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
875e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_Init
876e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
877e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function initializes control blocks for NFC
878e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
879e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          nothing
880e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
881e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
882e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern void NFC_Init(tHAL_NFC_ENTRY *p_hal_entry_tbl);
883e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
884e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
885e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
886e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_GetLmrtSize
887e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
888e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Called by application wto query the Listen Mode Routing
889e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  Table size supported by NFCC
890e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
891e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          Listen Mode Routing Table size
892e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
893e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
894e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern UINT16 NFC_GetLmrtSize(void);
895e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
896e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
897e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
898e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_SetConfig
899e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
900e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to send the configuration parameter
901e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  TLV to NFCC. The response from NFCC is reported by
902e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  tNFC_RESPONSE_CBACK as NFC_SET_CONFIG_REVT.
903e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
904e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       tlv_size - the length of p_param_tlvs.
905e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_param_tlvs - the parameter ID/Len/Value list
906e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
907e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
908e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
909e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
910e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_SetConfig (UINT8     tlv_size,
911e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                          UINT8    *p_param_tlvs);
912e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
913e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
914e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
915e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_GetConfig
916e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
917e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to retrieve the parameter TLV from NFCC.
918e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported by tNFC_RESPONSE_CBACK
919e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_GET_CONFIG_REVT.
920e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
921e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       num_ids - the number of parameter IDs
922e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_param_ids - the parameter ID list.
923e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
924e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
925e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
926e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
927e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_GetConfig (UINT8     num_ids,
928e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                          UINT8    *p_param_ids);
929e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
930e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
931e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
932e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_NfceeDiscover
933e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
934e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to enable or disable NFCEE Discovery.
935e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported by tNFC_RESPONSE_CBACK
936e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_NFCEE_DISCOVER_REVT.
937e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The notification from NFCC is reported by tNFC_RESPONSE_CBACK
938e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_NFCEE_INFO_REVT.
939e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
940e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       discover - 1 to enable discover, 0 to disable.
941e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
942e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
943e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
944e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
945e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_NfceeDiscover (BOOLEAN discover);
946e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
947e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
948e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
949e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_NfceeModeSet
950e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
951e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to activate or de-activate an NFCEE
952e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  connected to the NFCC.
953e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported by tNFC_RESPONSE_CBACK
954e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_NFCEE_MODE_SET_REVT.
955e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
956e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       nfcee_id - the NFCEE to activate or de-activate.
957e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  mode - 0 to activate NFCEE, 1 to de-activate.
958e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
959e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
960e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
961e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
962e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_NfceeModeSet (UINT8              nfcee_id,
963e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                             tNFC_NFCEE_MODE    mode);
964e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
965e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
966e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_DiscoveryMap
967e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
968e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to set the discovery interface mapping.
969e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported by tNFC_DISCOVER_CBACK as.
970e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFC_MAP_DEVT.
971e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
972e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       num - the number of items in p_params.
973e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_maps - the discovery interface mappings
974e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_cback - the discovery callback function
975e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
976e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
977e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
978e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
979e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_DiscoveryMap(UINT8 num, tNFC_DISCOVER_MAPS *p_maps,
980e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                        tNFC_DISCOVER_CBACK *p_cback);
981e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
982e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
983e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
984e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_DiscoveryStart
985e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
986e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to start Polling and/or Listening.
987e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported by tNFC_DISCOVER_CBACK as.
988e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFC_START_DEVT. The notification from NFCC is reported by
989e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  tNFC_DISCOVER_CBACK as NFC_RESULT_DEVT.
990e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
991e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       num_params - the number of items in p_params.
992e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_params - the discovery parameters
993e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_cback - the discovery callback function
994e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
995e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
996e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
997e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
998e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_DiscoveryStart(UINT8                 num_params,
999e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                              tNFC_DISCOVER_PARAMS *p_params,
1000e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                              tNFC_DISCOVER_CBACK  *p_cback);
1001e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1002e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1003e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1004e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_DiscoverySelect
1005e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1006e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      If tNFC_DISCOVER_CBACK reports status=NFC_MULTIPLE_PROT,
1007e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  the application needs to use this function to select the
1008e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  the logical endpoint to continue. The response from NFCC is
1009e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  reported by tNFC_DISCOVER_CBACK as NFC_SELECT_DEVT.
1010e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1011e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       rf_disc_id - The ID identifies the remote device.
1012e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  protocol - the logical endpoint on the remote devide
1013e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  rf_interface - the RF interface to communicate with NFCC
1014e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1015e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1016e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1017e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1018e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_DiscoverySelect (UINT8    rf_disc_id,
1019e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                UINT8    protocol,
1020e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                UINT8    rf_interface);
1021e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1022e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1023e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1024e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_ConnCreate
1025e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1026e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to create a logical connection with
1027e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFCC for data exchange.
1028e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported in tNFC_CONN_CBACK
1029e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_CONN_CREATE_CEVT.
1030e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1031e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       dest_type - the destination type
1032e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  id   - the NFCEE ID or RF Discovery ID .
1033e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  protocol - the protocol
1034e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_cback - the data callback function to receive data fron NFCC
1035e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1036e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1037e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1038e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1039e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_ConnCreate(UINT8             dest_type,
1040e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                          UINT8             id,
1041e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                          UINT8             protocol,
1042e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                          tNFC_CONN_CBACK  *p_cback);
1043e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1044e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1045e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1046e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_ConnClose
1047e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1048e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to close a logical connection with
1049e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFCC.
1050e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported in tNFC_CONN_CBACK
1051e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_CONN_CLOSE_CEVT.
1052e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1053e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       conn_id - the connection id.
1054e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1055e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1056e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1057e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1058e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_ConnClose(UINT8 conn_id);
1059e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1060e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1061e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1062e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_SetStaticRfCback
1063e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1064e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to update the data callback function
1065e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  to receive the data for the given connection id.
1066e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1067e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       p_cback - the connection callback function
1068e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1069e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          Nothing
1070e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1071e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1072e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern void NFC_SetStaticRfCback(tNFC_CONN_CBACK    *p_cback);
1073e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1074e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1075e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1076a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu** Function         NFC_SetReassemblyFlag
1077a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1078a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu** Description      This function is called to set if nfc will reassemble
1079a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**                  nci packet as much as its buffer can hold or it should not
1080a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**                  reassemble but forward the fragmented nci packet to layer above.
1081a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**                  If nci data pkt is fragmented, nfc may send multiple
1082a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**                  NFC_DATA_CEVT with status NFC_STATUS_CONTINUE before sending
1083a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**                  NFC_DATA_CEVT with status NFC_STATUS_OK based on reassembly
1084a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**                  configuration and reassembly buffer size
1085a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1086a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu** Parameters       reassembly - flag to indicate if nfc may reassemble or not
1087a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1088a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu** Returns          Nothing
1089a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1090a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu*******************************************************************************/
1091a24be4f06674b2707b57904deaa0dff5a95823bdEvan ChuNFC_API extern void NFC_SetReassemblyFlag (BOOLEAN    reassembly);
1092a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu
1093a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu/*******************************************************************************
1094a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1095e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_SendData
1096e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1097e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to send the given data packet
1098e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  to the connection identified by the given connection id.
1099e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1100e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       conn_id - the connection id.
1101e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_data - the data packet
1102e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1103e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1104e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1105e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1106e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_SendData(UINT8       conn_id,
1107e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                        BT_HDR     *p_data);
1108e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1109e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1110e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1111e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_FlushData
1112e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1113e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to discard the tx data queue of
1114e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  the given connection id.
1115e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1116e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       conn_id - the connection id.
1117e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1118e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1119e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1120e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1121e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_FlushData (UINT8       conn_id);
1122e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1123e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1124e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1125e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_Deactivate
1126e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1127e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to stop the discovery process or
1128e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  put the listen device in sleep mode or terminate the NFC link.
1129e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1130e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported by tNFC_DISCOVER_CBACK
1131e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_DEACTIVATE_DEVT.
1132e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1133e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       deactivate_type - NFC_DEACTIVATE_TYPE_IDLE, to IDLE mode.
1134e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                                    NFC_DEACTIVATE_TYPE_SLEEP to SLEEP mode.
1135e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                                    NFC_DEACTIVATE_TYPE_SLEEP_AF to SLEEP_AF mode.
1136e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1137e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1138e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1139e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1140e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_Deactivate(tNFC_DEACT_TYPE deactivate_type);
1141e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1142e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1143e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1144e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_UpdateRFCommParams
1145e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1146e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to update RF Communication parameters
1147e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  once the Frame RF Interface has been activated.
1148e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1149e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported by tNFC_RESPONSE_CBACK
1150e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_RF_COMM_PARAMS_UPDATE_REVT.
1151e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1152e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1153e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1154e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1155e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_UpdateRFCommParams (tNFC_RF_COMM_PARAMS *p_params);
1156e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1157e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1158e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1159e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_SetPowerOffSleep
1160e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1161e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function closes/opens transport and turns off/on NFCC.
1162e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1163e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1164e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1165e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1166e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_SetPowerOffSleep (BOOLEAN enable);
1167e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1168e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1169e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1170e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_PowerCycleNFCC
1171e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1172e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function turns off and then on NFCC.
1173e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1174e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1175e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1176e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1177e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_PowerCycleNFCC (void);
1178e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1179e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1180e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1181e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_SetRouting
1182e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1183e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to configure the CE routing table.
1184e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The response from NFCC is reported by tNFC_RESPONSE_CBACK
1185e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_SET_ROUTING_REVT.
1186e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1187e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters
1188e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1189e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1190e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1191e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1192e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_SetRouting(BOOLEAN     more,
1193e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                            UINT8       num_tlv,
1194e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                            UINT8       tlv_size,
1195e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                            UINT8      *p_param_tlvs);
1196e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1197e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1198e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1199e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_GetRouting
1200e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1201e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to retrieve the CE routing table from
1202e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFCC. The response from NFCC is reported by tNFC_RESPONSE_CBACK
1203e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  as NFC_GET_ROUTING_REVT.
1204e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1205e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1206e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1207e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1208e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_GetRouting(void);
1209e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1210e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1211e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1212e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_RegVSCback
1213e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1214e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to register or de-register a callback
1215e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  function to receive Proprietary NCI response and notification
1216e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  events.
1217e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The maximum number of callback functions allowed is NFC_NUM_VS_CBACKS
1218e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1219e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1220e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1221e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1222e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_RegVSCback (BOOLEAN          is_register,
1223e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                           tNFC_VS_CBACK   *p_cback);
1224e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1225e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1226e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1227e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_SendVsCommand
1228e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1229e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to send the given vendor specific
1230e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  command to NFCC. The response from NFCC is reported to the
1231e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  given tNFC_VS_CBACK as (oid).
1232e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1233e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       oid - The opcode of the VS command.
1234e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_data - The parameters for the VS command
1235e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1236e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1237e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1238e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1239e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_SendVsCommand(UINT8          oid,
1240e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                             BT_HDR        *p_data,
1241e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                             tNFC_VS_CBACK *p_cback);
1242e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1243e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1244e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1245e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_TestLoopback
1246e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1247e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to send the given data packet
1248e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  to NFCC for loopback test.
1249e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  When loopback data is received from NFCC, tNFC_TEST_CBACK .
1250e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  reports a NFC_LOOPBACK_TEVT.
1251e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1252e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Parameters       p_data - the data packet
1253e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1254e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          tNFC_STATUS
1255e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1256e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1257e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFC_STATUS NFC_TestLoopback(BT_HDR *p_data);
1258e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1259e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1260e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1261e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1262e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFC_SetTraceLevel
1263e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1264e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function sets the trace level for NFC.  If called with
1265e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  a value of 0xFF, it simply returns the current trace level.
1266e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1267e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          The new or current trace level
1268e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1269e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1270e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern UINT8 NFC_SetTraceLevel (UINT8 new_level);
1271e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1272a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu#if (BT_TRACE_VERBOSE == TRUE)
1273a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu/*******************************************************************************
1274a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1275a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu** Function         NFC_GetStatusName
1276a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1277a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu** Description      This function returns the status name.
1278a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1279a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu** NOTE             conditionally compiled to save memory.
1280a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1281a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu** Returns          pointer to the name
1282a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu**
1283a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu*******************************************************************************/
1284a24be4f06674b2707b57904deaa0dff5a95823bdEvan ChuNFC_API extern char * NFC_GetStatusName (tNFC_STATUS status);
1285a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu#endif
1286a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu
1287e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifdef __cplusplus
1288e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project}
1289e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
1290e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1291e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif /* NFC_API_H */
1292