1e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/******************************************************************************
2e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
3e9629bad30a9f478b336ab46b8e6e02f7f87af46Evan Chu *  Copyright (C) 2010-2014 Broadcom Corporation
4e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
5e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  Licensed under the Apache License, Version 2.0 (the "License");
6e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  you may not use this file except in compliance with the License.
7e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  You may obtain a copy of the License at:
8e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
9e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  http://www.apache.org/licenses/LICENSE-2.0
10e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
11e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  Unless required by applicable law or agreed to in writing, software
12e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  distributed under the License is distributed on an "AS IS" BASIS,
13e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  See the License for the specific language governing permissions and
15e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  limitations under the License.
16e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
17e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project ******************************************************************************/
18e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
195c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen
20e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/******************************************************************************
21e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
22e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  This is the public interface file for NFA, Broadcom's NFC application
23e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *  layer for mobile phones.
24e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project *
25e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project ******************************************************************************/
26e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifndef NFA_API_H
27e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_API_H
28e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
29e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "nfc_target.h"
30e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "nci_defs.h"
31e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "tags_defs.h"
32e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "nfc_api.h"
335c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#include "rw_api.h"
34e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "nfc_hal_api.h"
35e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#include "gki.h"
36e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
37e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
38e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*****************************************************************************
39e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  Constants and data types
40e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*****************************************************************************/
41e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
42e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Max length of Appliction ID in 7816-4 */
43e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_MAX_AID_LEN     NFC_MAX_AID_LEN
44e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_MIN_AID_LEN     5 /* per NCI specification */
45e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
46e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFA API return status codes */
47e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_OK                   NCI_STATUS_OK                   /* Command succeeded    */
48e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_REJECTED             NCI_STATUS_REJECTED             /* Command is rejected. */
49e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_MSG_CORRUPTED        NCI_STATUS_MESSAGE_CORRUPTED    /* Message is corrupted */
50e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_BUFFER_FULL          NCI_STATUS_BUFFER_FULL          /* buffer full          */
51e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_FAILED               NCI_STATUS_FAILED               /* failed               */
52e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_NOT_INITIALIZED      NCI_STATUS_NOT_INITIALIZED      /* not initialized      */
53e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_SYNTAX_ERROR         NCI_STATUS_SYNTAX_ERROR         /* Syntax error         */
54e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_SEMANTIC_ERROR       NCI_STATUS_SEMANTIC_ERROR       /* Semantic error       */
55e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_UNKNOWN_GID          NCI_STATUS_UNKNOWN_GID          /* Unknown NCI Group ID */
56e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_UNKNOWN_OID          NCI_STATUS_UNKNOWN_OID          /* Unknown NCI Opcode   */
57e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_INVALID_PARAM        NCI_STATUS_INVALID_PARAM        /* Invalid Parameter    */
58e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_MSG_SIZE_TOO_BIG     NCI_STATUS_MSG_SIZE_TOO_BIG     /* Message size too big */
59e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_ALREADY_STARTED      NCI_STATUS_ALREADY_STARTED      /* Already started      */
60e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_ACTIVATION_FAILED    NCI_STATUS_ACTIVATION_FAILED    /* Activation Failed    */
61e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_TEAR_DOWN            NCI_STATUS_TEAR_DOWN            /* Tear Down Error      */
62e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_RF_TRANSMISSION_ERR  NCI_STATUS_RF_TRANSMISSION_ERR  /* RF transmission error*/
63e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_RF_PROTOCOL_ERR      NCI_STATUS_RF_PROTOCOL_ERR      /* RF protocol error    */
64e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_TIMEOUT              NCI_STATUS_TIMEOUT              /* RF Timeout           */
65e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_EE_INTF_ACTIVE_FAIL  NCI_STATUS_EE_INTF_ACTIVE_FAIL  /* EE Intf activate err */
66e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_EE_TRANSMISSION_ERR  NCI_STATUS_EE_TRANSMISSION_ERR  /* EE transmission error*/
67e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_EE_PROTOCOL_ERR      NCI_STATUS_EE_PROTOCOL_ERR      /* EE protocol error    */
68e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_EE_TIMEOUT           NCI_STATUS_EE_TIMEOUT           /* EE Timeout           */
69e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
70e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_CMD_STARTED          NFC_STATUS_CMD_STARTED    /* Command started successfully                     */
71e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_HW_TIMEOUT           NFC_STATUS_HW_TIMEOUT     /* NFCC Timeout in responding to an NCI command     */
72e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_CONTINUE             NFC_STATUS_CONTINUE       /* More NFA_CE_GET_ROUTING_REVT to follow           */
73e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_REFUSED              NFC_STATUS_REFUSED        /* API is called to perform illegal function        */
74e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_BAD_RESP             NFC_STATUS_BAD_RESP       /* Wrong format of R-APDU, CC file or NDEF file     */
75e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_CMD_NOT_CMPLTD       NFC_STATUS_CMD_NOT_CMPLTD /* 7816 Status Word is not command complete(0x9000) */
76e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_NO_BUFFERS           NFC_STATUS_NO_BUFFERS     /* Out of GKI buffers                               */
77e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_WRONG_PROTOCOL       NFC_STATUS_WRONG_PROTOCOL /* Protocol mismatch between API and activated one  */
78e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_BUSY                 NFC_STATUS_BUSY           /* Another Tag command is already in progress       */
79e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
80e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_BAD_LENGTH           NFC_STATUS_BAD_LENGTH     /* data len exceeds MIU                             */
81e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_BAD_HANDLE           NFC_STATUS_BAD_HANDLE     /* invalid handle                                   */
82e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_STATUS_CONGESTED            NFC_STATUS_CONGESTED      /* congested                                        */
83e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFA_STATUS;
84e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
85e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Handle for NFA registrations and connections */
86e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT16 tNFA_HANDLE;
87e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_INVALID              (0xFFFF)
88e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFA Handle definitions */
89e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
90e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* The upper byte of NFA_HANDLE signifies the handle group */
91e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_CONNECTION     0x0100      /* Connection handles           */
92e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_NDEF_HANDLER   0x0200      /* NDEF Type Handler handles    */
93e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_CE             0x0300      /* DH Card Emulation handles    */
94e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_EE             0x0400      /* Handles to identify NFCEE    */
95e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_P2P            0x0500      /* P2P handles                  */
96e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_CHO            0x0600      /* Connection Handvoer handles  */
97e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_SNEP           0x0700      /* SNEP handles                 */
98e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_HCI            0x0800      /* HCI handles                  */
99e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_LOCAL_NDEF     0x0900      /* Local NDEF message handle    */
100e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_GROUP_MASK           0xFF00
101e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_HANDLE_MASK                 0x00FF
102e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
103e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NCI Parameter IDs */
104e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFA_PMID;
105e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
106e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Definitions for tNFA_TECHNOLOGY_MASK */
107e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TECHNOLOGY_MASK_A	        0x01    /* NFC Technology A             */
108e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TECHNOLOGY_MASK_B	        0x02    /* NFC Technology B             */
109e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TECHNOLOGY_MASK_F	        0x04    /* NFC Technology F             */
110e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TECHNOLOGY_MASK_ISO15693	0x08    /* Proprietary Technology       */
111e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TECHNOLOGY_MASK_B_PRIME	    0x10    /* Proprietary Technology       */
112e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TECHNOLOGY_MASK_KOVIO	    0x20    /* Proprietary Technology       */
113e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TECHNOLOGY_MASK_A_ACTIVE    0x40    /* NFC Technology A active mode */
114e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TECHNOLOGY_MASK_F_ACTIVE    0x80    /* NFC Technology F active mode */
115e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TECHNOLOGY_MASK_ALL         0xFF    /* All supported technologies   */
116e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFA_TECHNOLOGY_MASK;
117e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
118e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Definitions for NFC protocol for RW, CE and P2P APIs */
119e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_T1T        NFC_PROTOCOL_T1T        /* Type1Tag         - NFC-A             */
120e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_T2T        NFC_PROTOCOL_T2T        /* MIFARE/Type2Tag  - NFC-A             */
121e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_T3T        NFC_PROTOCOL_T3T        /* Felica/Type3Tag  - NFC-F             */
122e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_ISO_DEP    NFC_PROTOCOL_ISO_DEP    /* Type 4A,4B       - NFC-A or NFC-B    */
123e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_NFC_DEP    NFC_PROTOCOL_NFC_DEP    /* NFCDEP/LLCP      - NFC-A or NFC-F    */
124e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_ISO15693   NFC_PROTOCOL_15693
125e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_B_PRIME    NFC_PROTOCOL_B_PRIME
126e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_KOVIO      NFC_PROTOCOL_KOVIO
127e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_INVALID    0xFF
128e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_MAX_NUM_PROTOCOLS   8
129e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFA_NFC_PROTOCOL;
130e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
131e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Definitions for tNFA_PROTOCOL_MASK */
132e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_MASK_T1T       0x01    /* Type 1 tag          */
133e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_MASK_T2T       0x02    /* MIFARE / Type 2 tag */
134e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_MASK_T3T       0x04    /* FeliCa / Type 3 tag */
135e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_MASK_ISO_DEP   0x08    /* ISODEP/4A,4B        */
136e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PROTOCOL_MASK_NFC_DEP   0x10    /* NFCDEP/LLCP         */
137e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFA_PROTOCOL_MASK;
138e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
139e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
140e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFA_DM callback events */
141e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_ENABLE_EVT               0   /* Result of NFA_Enable             */
142e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_DISABLE_EVT              1   /* Result of NFA_Disable            */
143e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_SET_CONFIG_EVT           2   /* Result of NFA_SetConfig          */
144e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_GET_CONFIG_EVT           3   /* Result of NFA_GetConfig          */
145e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_PWR_MODE_CHANGE_EVT      4   /* Result of NFA_PowerOffSleepMode  */
146e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_RF_FIELD_EVT	            5   /* Status of RF Field               */
147e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_NFCC_TIMEOUT_EVT         6   /* NFCC is not responding           */
148e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_NFCC_TRANSPORT_ERR_EVT   7   /* NCI Tranport error               */
149e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
150e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_T1T_HR_LEN              T1T_HR_LEN      /* T1T HR length            */
151e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_MAX_UID_LEN             TAG_MAX_UID_LEN /* Max UID length of T1/T2  */
152e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_T1T_UID_LEN             T1T_UID_LEN     /* T1T UID length           */
153e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_T1T_CMD_UID_LEN         T1T_CMD_UID_LEN /* UID len for T1T cmds     */
154e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_T2T_UID_LEN             T2T_UID_LEN     /* T2T UID length           */
155e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1565c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFA_RW_NDEF_FL_READ_ONLY        RW_NDEF_FL_READ_ONLY     /* Tag is read only              */
1575c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFA_RW_NDEF_FL_FORMATED         RW_NDEF_FL_FORMATED      /* Tag formated for NDEF         */
1585c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFA_RW_NDEF_FL_SUPPORTED        RW_NDEF_FL_SUPPORTED     /* NDEF supported by the tag     */
1595c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFA_RW_NDEF_FL_UNKNOWN          RW_NDEF_FL_UNKNOWN       /* Unable to find if tag is ndef capable/formated/read only */
1605c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFA_RW_NDEF_FL_FORMATABLE       RW_NDEF_FL_FORMATABLE    /* Tag supports format operation */
1615c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFA_RW_NDEF_FL_SOFT_LOCKABLE    RW_NDEF_FL_SOFT_LOCKABLE /* Tag can be soft locked */
1625c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFA_RW_NDEF_FL_HARD_LOCKABLE    RW_NDEF_FL_HARD_LOCKABLE /* Tag can be hard locked */
1635c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFA_RW_NDEF_FL_OTP              RW_NDEF_FL_OTP           /* Tag is one time programmable */
1645c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen
1655c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenentypedef UINT8 tNFA_RW_NDEF_FLAG;
1665c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen
167e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_DM_SET_CONFIG_EVT */
168e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
169e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
170e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS     status;                     /* NFA_STATUS_OK if successful  */
171e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           num_param_id;               /* Number of rejected Param ID  */
172e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_PMID       param_ids[NFC_MAX_NUM_IDS]; /* Rejected Param ID            */
173e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_SET_CONFIG;
174e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
175e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_DM_GET_CONFIG_EVT */
176e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
177e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
178e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS status;     /* NFA_STATUS_OK if successful              */
179e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16 tlv_size;        /* The length of TLV                        */
180e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8 param_tlvs[1];    /* TLV (Parameter ID-Len-Value byte stream) */
181e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_GET_CONFIG;
182e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
183e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_PWR_MODE_FULL        0x04
184e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_PWR_MODE_OFF_SLEEP   0x00
185e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
186e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFA_DM_PWR_MODE;
187e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
188e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_DM_PWR_MODE_CHANGE_EVT */
189e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
190e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
191e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS         status;        /* NFA_STATUS_OK if successful                       */
192e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_DM_PWR_MODE    power_mode;    /* NFA_DM_PWR_MODE_FULL or NFA_DM_PWR_MODE_OFF_SLEEP */
193e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_DM_PWR_MODE_CHANGE;
194e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
195e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_DM_RF_FIELD_EVT */
196e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_RF_FIELD_OFF     0x00
197e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_RF_FIELD_ON      0x01
198e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
199e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
200e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
201e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS     status;         /* NFA_STATUS_OK if successful  */
202e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           rf_field_status;/* NFA_DM_RF_FIELD_ON if operating field generated by remote */
203e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_DM_RF_FIELD;
204e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
205e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Union of all DM callback structures */
206e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef union
207e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
208e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS             status;         /* NFA_DM_ENABLE_EVT        */
209e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_SET_CONFIG         set_config;     /* NFA_DM_SET_CONFIG_EVT    */
210e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_GET_CONFIG         get_config;     /* NFA_DM_GET_CONFIG_EVT    */
211e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_DM_PWR_MODE_CHANGE power_mode;     /* NFA_DM_PWR_MODE_CHANGE_EVT   */
212e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_DM_RF_FIELD        rf_field;       /* NFA_DM_RF_FIELD_EVT      */
213e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    void                    *p_vs_evt_data; /* Vendor-specific evt data */
214e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_DM_CBACK_DATA;
215e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
216e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFA_DM callback */
217e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFA_DM_CBACK) (UINT8 event, tNFA_DM_CBACK_DATA *p_data);
218e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
219e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
220e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFA Connection Callback Events */
221e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_POLL_ENABLED_EVT                    0   /* Polling enabled event                        */
222e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_POLL_DISABLED_EVT                   1   /* Polling disabled event                       */
223e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DISC_RESULT_EVT                     2   /* NFC link/protocol discovery notificaiton     */
224e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_SELECT_RESULT_EVT                   3   /* NFC link/protocol discovery select response  */
225e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DEACTIVATE_FAIL_EVT                 4   /* NFA_Deactivate failure                       */
226e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_ACTIVATED_EVT                       5   /* NFC link/protocol activated                  */
227e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DEACTIVATED_EVT                     6   /* NFC link/protocol deactivated                */
228e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TLV_DETECT_EVT                      7   /* TLV Detection complete                       */
229e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NDEF_DETECT_EVT                     8   /* NDEF Detection complete                      */
230e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DATA_EVT                            9   /* Data message received                        */
231e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_SELECT_CPLT_EVT                     10  /* Select completed                             */
232e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_READ_CPLT_EVT                       11  /* Read completed                               */
233e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_WRITE_CPLT_EVT                      12  /* Write completed                              */
234e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_LLCP_ACTIVATED_EVT                  13  /* LLCP link is activated                       */
235e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_LLCP_DEACTIVATED_EVT                14  /* LLCP link is deactivated                     */
236e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_PRESENCE_CHECK_EVT                  15  /* Response to NFA_RwPresenceCheck              */
237e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_FORMAT_CPLT_EVT                     16  /* Tag Formating completed                      */
238e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_I93_CMD_CPLT_EVT                    17  /* ISO 15693 command completed                  */
239e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_SET_TAG_RO_EVT                      18  /* Tag set as Read only                         */
240e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_EXCLUSIVE_RF_CONTROL_STARTED_EVT    19  /* Result for NFA_RequestExclusiveRfControl     */
241e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_EXCLUSIVE_RF_CONTROL_STOPPED_EVT    20  /* Result for NFA_ReleaseExclusiveRfControl     */
242e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_CE_REGISTERED_EVT                   21  /* DH Card emulation: AID or System code reg'd  */
243e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_CE_DEREGISTERED_EVT                 22  /* DH Card emulation: AID or System code dereg'd*/
244e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_CE_DATA_EVT                         23  /* DH Card emulation: data received event       */
245e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_CE_ACTIVATED_EVT                    24  /* DH Card emulation: activation event          */
246e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_CE_DEACTIVATED_EVT                  25  /* DH Card emulation: deactivation event        */
247e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_CE_LOCAL_TAG_CONFIGURED_EVT         26  /* DH Card emulation: local NDEF configured     */
248e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_CE_NDEF_WRITE_START_EVT             27  /* DH Card emulation: NDEF write started        */
249e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_CE_NDEF_WRITE_CPLT_EVT              28  /* DH Card emulation: NDEF write completed      */
250e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_CE_UICC_LISTEN_CONFIGURED_EVT       29  /* UICC Listen configured                       */
251e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_RF_DISCOVERY_STARTED_EVT            30  /* RF Discovery started event                   */
252e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_RF_DISCOVERY_STOPPED_EVT            31  /* RF Discovery stopped event                   */
253e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_UPDATE_RF_PARAM_RESULT_EVT          32  /* status of updating RF communication paramters*/
254e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_SET_P2P_LISTEN_TECH_EVT             33  /* status of setting P2P listen technologies    */
255e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_RW_INTF_ERROR_EVT                   34  /* RF Interface error event                     */
256dd682fab2cc1e32cc054b86b77606365b3f8f1eeMartijn Coenen#define NFA_LLCP_FIRST_PACKET_RECEIVED_EVT      35  /* First packet received over LLCP link         */
25767aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu#define NFA_LISTEN_ENABLED_EVT                  36  /* Listening enabled event                      */
25867aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu#define NFA_LISTEN_DISABLED_EVT                 37  /* Listening disabled event                     */
25967aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu#define NFA_P2P_PAUSED_EVT                      38  /* P2P services paused event                    */
26067aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu#define NFA_P2P_RESUMED_EVT                     39  /* P2P services resumed event                   */
261e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
262e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFC deactivation type */
263e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DEACTIVATE_TYPE_IDLE        NFC_DEACTIVATE_TYPE_IDLE
264e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DEACTIVATE_TYPE_SLEEP       NFC_DEACTIVATE_TYPE_SLEEP
265e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DEACTIVATE_TYPE_DISCOVERY   NFC_DEACTIVATE_TYPE_DISCOVERY
266e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
267e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8   tNFA_DEACTIVATE_TYPE;
268e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
269e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_DISC_RESULT_EVT */
270e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
271e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
272e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS	        status;         /* NFA_STATUS_OK if successful       */
273e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_RESULT_DEVT    discovery_ntf;  /* RF discovery notification details */
274e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_DISC_RESULT;
275e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
276e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_ACTIVATED_EVT */
277e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
278e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
279e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               hr[NFA_T1T_HR_LEN];       /* HR of Type 1 tag         */
280e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               uid[NFA_T1T_CMD_UID_LEN]; /* UID used in T1T Commands */
281e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_T1T_PARAMS;
282e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
283e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
284e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
285e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               uid[NFA_MAX_UID_LEN];     /* UID of T2T tag           */
286e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_T2T_PARAMS;
287e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
288e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
289e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
290e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               num_system_codes;       /* Number of system codes supporte by tag   */
291e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16              *p_system_codes;        /* Pointer to list of system codes          */
292e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_T3T_PARAMS;
293e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
294e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
295e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
296e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               uid[I93_UID_BYTE_LEN];  /* UID[0]:MSB, ... UID[7]:LSB                   */
297e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               info_flags;             /* information flags                            */
298e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               dsfid;                  /* DSFID if I93_INFO_FLAG_DSFID                 */
299e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               afi;                    /* AFI if I93_INFO_FLAG_AFI                     */
300e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16              num_block;              /* number of blocks if I93_INFO_FLAG_MEM_SIZE   */
301e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               block_size;             /* block size in byte if I93_INFO_FLAG_MEM_SIZE */
302e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               IC_reference;           /* IC Reference if I93_INFO_FLAG_IC_REF         */
303e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_I93_PARAMS;
304e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
305e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef union
306e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
307e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_T1T_PARAMS     t1t;            /* HR and UID of T1T                */
308e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_T2T_PARAMS     t2t;            /* UID of T2T                       */
309e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_T3T_PARAMS     t3t;            /* System codes                     */
310e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_I93_PARAMS     i93;            /* System Information of ISO 15693  */
311e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_TAG_PARAMS;
312e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
313e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
314e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
315e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_ACTIVATE_DEVT  activate_ntf;   /* RF discovery activation details */
316e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_TAG_PARAMS     params;         /* additional informaiton of tag   */
317e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_ACTIVATED;
318e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
319e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_DEACTIVATED_EVT */
320e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
321e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
322e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_DEACTIVATE_TYPE type;          /* NFA_DEACTIVATE_TYPE_IDLE or NFA_DEACTIVATE_TYPE_SLEEP */
323e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_DEACTIVATED;
324e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
325e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Structure for NFA_NDEF_DETECT_EVT event data */
326e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
327e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
328e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS         status;             /* Status of the ndef detecton                              */
329e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_NFC_PROTOCOL   protocol;           /* protocol used to detect NDEF                             */
330e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT32              max_size;           /* max number of bytes available for NDEF data              */
331e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT32              cur_size;           /* current size of stored NDEF data (in bytes)              */
3325c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    tNFA_RW_NDEF_FLAG   flags;              /* Flags to indicate NDEF capability, is formated, soft/hard lockable, formatable, otp and read only */
333e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_NDEF_DETECT;
334e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
335e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
336e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Structure for NFA_TLV_DETECT_EVT event data */
337e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
338e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
339e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS         status;     /* Status of the tlv detecton        */
340e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_NFC_PROTOCOL   protocol;   /* protocol used to detect TLV       */
341e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               num_tlvs;   /* number of tlvs present in the tag */
342e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               num_bytes;  /* number of lock/reserved bytes     */
343e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_TLV_DETECT;
344e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
345e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Structure for NFA_DATA_EVT data */
346e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
347e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
348a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu    tNFA_STATUS         status;         /* Status of Data received          */
349e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               *p_data;        /* Data buffer                      */
350e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16              len;            /* Length of data                   */
351e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_RX_DATA;
352e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
353e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Structure for NFA_CE_NDEF_WRITE_CPLT_EVT data */
354e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
355e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
356e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS         status;         /* Status of the ndef write op      */
357e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT32              len;            /* Update length of NDEF data       */
358e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               *p_data;        /* data buffer                      */
359e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_CE_NDEF_WRITE_CPLT;
360e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
361e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_LLCP_ACTIVATED_EVT */
362e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
363e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
364e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN             is_initiator;   /* TRUE if initiator                */
365e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16              remote_wks;     /* Well-Known service mask of peer  */
366e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               remote_lsc;     /* Link Service Class of peer       */
367e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16              remote_link_miu;/* Link MIU of peer                 */
368e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16              local_link_miu; /* Link MIU of local                */
369e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_LLCP_ACTIVATED;
370e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
371e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_LLCP_DEACTIVATED_EVT */
372e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
373e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
374e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               reason;         /* reason of deactivation           */
375e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_LLCP_DEACTIVATED;
376e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
377e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_I93_CMD_CPLT_EVT */
378e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
379e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
380e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           dsfid;                  /* DSFID                       */
381e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           uid[I93_UID_BYTE_LEN];  /* UID[0]:MSB, ... UID[7]:LSB  */
382e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_I93_INVENTORY;
383e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
384e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct                              /* RW_I93_SYS_INFO_EVT                          */
385e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
386e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           info_flags;             /* information flags                            */
387e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           uid[I93_UID_BYTE_LEN];  /* UID                                          */
388e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           dsfid;                  /* DSFID if I93_INFO_FLAG_DSFID                 */
389e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           afi;                    /* AFI if I93_INFO_FLAG_AFI                     */
390e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16          num_block;              /* number of blocks if I93_INFO_FLAG_MEM_SIZE   */
391e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           block_size;             /* block size in byte if I93_INFO_FLAG_MEM_SIZE */
392e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8           IC_reference;           /* IC Reference if I93_INFO_FLAG_IC_REF         */
393e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_I93_SYS_INFO;
394e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
395e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
396e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
397e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS         status;         /* Status of sending command       */
398e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               sent_command;   /* sent command to tag             */
399e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    union
400e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    {
401e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        UINT8               error_code; /* error code defined in ISO 15693 */
402e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFA_I93_INVENTORY  inventory;  /* inventory response              */
403e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project        tNFA_I93_SYS_INFO   sys_info;   /* system information              */
404e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    } params;
405e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_I93_CMD_CPLT;
406e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
407e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_CE_REGISTERED_EVT */
408e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
409e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
410e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS         status;         /* NFA_STATUS_OK if successful                      */
411e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_HANDLE         handle;         /* handle for NFA_CeRegisterFelicaSystemCodeOnDH () */
412e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                        /*            NFA_CeRegisterT4tAidOnDH ()           */
413e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_CE_REGISTERED;
414e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
415e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_CE_DEREGISTERED_EVT */
416e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
417e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
418e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_HANDLE         handle;         /* handle from NFA_CE_REGISTERED_EVT   */
419e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_CE_DEREGISTERED;
420e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
421e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_CE_ACTIVATED_EVT */
422e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
423e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
424e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS         status;         /* NFA_STATUS_OK if successful              */
425e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_HANDLE         handle;         /* handle from NFA_CE_REGISTERED_EVT        */
426e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFC_ACTIVATE_DEVT  activate_ntf;   /* RF discovery activation details          */
427e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_CE_ACTIVATED;
428e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
429e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_CE_DEACTIVATED_EVT */
430e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
431e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
432e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_HANDLE         handle;         /* handle from NFA_CE_REGISTERED_EVT   */
433e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_DEACTIVATE_TYPE type;          /* NFA_DEACTIVATE_TYPE_IDLE or NFA_DEACTIVATE_TYPE_SLEEP */
434e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_CE_DEACTIVATED;
435e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
436e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Structure for NFA_CE_DATA_EVT data */
437e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
438e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
439a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu    tNFA_STATUS         status;         /* NFA_STATUS_OK if complete packet     */
440e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_HANDLE         handle;         /* handle from NFA_CE_REGISTERED_EVT    */
441e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8               *p_data;        /* Data buffer                          */
442e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16              len;            /* Length of data                       */
443e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_CE_DATA;
444e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
445e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
446e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Union of all connection callback structures */
447e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef union
448e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
449e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS             status;             /* NFA_POLL_ENABLED_EVT                 */
450e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_POLL_DISABLED_EVT                */
451e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_CE_UICC_LISTEN_CONFIGURED_EVT    */
452e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_EXCLUSIVE_RF_CONTROL_STARTED_EVT */
453e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_EXCLUSIVE_RF_CONTROL_STOPPED_EVT */
454e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_SELECT_RESULT_EVT                */
455e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_DEACTIVATE_FAIL_EVT              */
456e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_CE_NDEF_WRITE_START_EVT          */
457e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_SELECT_CPLT_EVT                  */
458e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_READ_CPLT_EVT                    */
459e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_WRITE_CPLT_EVT                   */
460e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_PRESENCE_CHECK_EVT               */
461e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_FORMAT_CPLT_EVT                  */
462e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_SET_TAG_RO_EVT                   */
463e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_UPDATE_RF_PARAM_RESULT_EVT       */
464e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* NFA_RW_INTF_ERROR_EVT                */
465e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_DISC_RESULT         disc_result;       /* NFA_DISC_RESULT_EVT                  */
466e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_ACTIVATED           activated;         /* NFA_ACTIVATED_EVT                    */
467e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_DEACTIVATED         deactivated;       /* NFA_DEACTIVATED_EVT                  */
468e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_NDEF_DETECT         ndef_detect;       /* NFA_NDEF_DETECT_EVT                  */
469e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_TLV_DETECT          tlv_detect;        /* NFA_TLV_DETECT_EVT                   */
470e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_RX_DATA             data;              /* NFA_DATA_EVT                         */
471e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_CE_NDEF_WRITE_CPLT  ndef_write_cplt;   /* NFA_CE_NDEF_WRITE_CPLT_EVT           */
472e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_LLCP_ACTIVATED      llcp_activated;    /* NFA_LLCP_ACTIVATED_EVT               */
473e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_LLCP_DEACTIVATED    llcp_deactivated;  /* NFA_LLCP_DEACTIVATED_EVT             */
474e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_I93_CMD_CPLT        i93_cmd_cplt;      /* NFA_I93_CMD_CPLT_EVT                 */
475e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_CE_REGISTERED       ce_registered;     /* NFA_CE_REGISTERED_EVT                */
476e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_CE_DEREGISTERED     ce_deregistered;   /* NFA_CE_DEREGISTERED_EVT              */
477e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_CE_ACTIVATED        ce_activated;      /* NFA_CE_ACTIVATED_EVT                 */
478e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_CE_DEACTIVATED      ce_deactivated;    /* NFA_CE_DEACTIVATED_EVT               */
479e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_CE_DATA             ce_data;           /* NFA_CE_DATA_EVT                      */
480e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
481e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_CONN_EVT_DATA;
482e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
483e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFA Connection Callback */
484e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFA_CONN_CBACK) (UINT8 event, tNFA_CONN_EVT_DATA *p_data);
485e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
486e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifndef NFA_DM_NUM_INTERFACE_MAP
487e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_DM_NUM_INTERFACE_MAP    3
488e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
489e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
49091ada91fa991b4df5372a19a2cf81f074b298712Evan Chu/* compile-time configuration structure for the RF Discovery Frequency for each technology */
49191ada91fa991b4df5372a19a2cf81f074b298712Evan Chutypedef struct
49291ada91fa991b4df5372a19a2cf81f074b298712Evan Chu{
49391ada91fa991b4df5372a19a2cf81f074b298712Evan Chu    UINT8   pa;     /* Frequency for NFC Technology A               */
49491ada91fa991b4df5372a19a2cf81f074b298712Evan Chu    UINT8   pb;     /* Frequency for NFC Technology B               */
49591ada91fa991b4df5372a19a2cf81f074b298712Evan Chu    UINT8   pf;     /* Frequency for NFC Technology F               */
49691ada91fa991b4df5372a19a2cf81f074b298712Evan Chu    UINT8   pi93;   /* Frequency for Proprietary Technology/15693   */
49791ada91fa991b4df5372a19a2cf81f074b298712Evan Chu    UINT8   pbp;    /* Frequency for Proprietary Technology/B-Prime */
49891ada91fa991b4df5372a19a2cf81f074b298712Evan Chu    UINT8   pk;     /* Frequency for Proprietary Technology/Kovio   */
49991ada91fa991b4df5372a19a2cf81f074b298712Evan Chu    UINT8   paa;    /* Frequency for NFC Technology A active mode   */
50091ada91fa991b4df5372a19a2cf81f074b298712Evan Chu    UINT8   pfa;    /* Frequency for NFC Technology F active mode   */
50191ada91fa991b4df5372a19a2cf81f074b298712Evan Chu} tNFA_DM_DISC_FREQ_CFG;
50291ada91fa991b4df5372a19a2cf81f074b298712Evan Chu
503a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu/* definitions for tNFA_DM_CFG.presence_check_option */
504a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu#define NFA_DM_PCO_ISO_SLEEP_WAKE       0x01 /* if NDEF is not supported by the tag, use sleep/wake(last interface) */
505a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu#define NFA_DM_PCO_EMPTY_I_BLOCK        0x02 /* NFA_SendRawFrame() has been used, use empty I block for presence check
506a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu                                              * if this bit is not set, use read-binary on channel 3 for presence check */
507a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu
508e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* compile-time configuration structure */
509e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
510e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
511e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN auto_detect_ndef;           /* Automatic NDEF detection (when not in exclusive RF mode) */
512e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN auto_read_ndef;             /* Automatic NDEF read (when not in exclusive RF mode)      */
513a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu    BOOLEAN auto_presence_check;        /* Automatic presence check                                 */
514a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu    UINT8   presence_check_option;      /* Use sleep/wake(last interface) for ISODEP presence check */
515a24be4f06674b2707b57904deaa0dff5a95823bdEvan Chu    UINT16  presence_check_timeout;     /* Maximum time to wait for presence check response         */
516e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_DM_CFG;
517e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
5185c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen/* compile-time configuration structure for HCI */
5195c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenentypedef struct
5205c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen{
5215c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    UINT16 hci_netwk_enable_timeout; /* Maximum idle(no HCP Pkt) time to wait for EE DISC REQ Ntf(s) */
5225c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen    UINT16 hcp_response_timeout;     /* Maximum time to wait for EE DISC REQ NTF(s) after HOT PLUG EVT(s) */
523855ae32a422fe508c56a9d33f4f65cf6bf77cd9ePrasad Karuppasamy    UINT8  num_whitelist_host;          /* Number of host in the whitelist of Terminal host */
524855ae32a422fe508c56a9d33f4f65cf6bf77cd9ePrasad Karuppasamy    UINT8  *p_whitelist;                /* Whitelist of Terminal Host */
5255c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen} tNFA_HCI_CFG;
5265c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen
527e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*
528e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Exclusive RF mode listen configuration
529e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*/
530e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
531e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_LB_MAX_NFCID0_LEN           4
532e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_LF_MAX_SC_NFCID2            1
533e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_LA_MAX_HIST_BYTES           15
534e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_LB_MAX_H_INFO_LEN           15
535e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
536e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
537e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
538e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    /*
539e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    ** Discovery Configuration Parameters for Listen A
540e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    */
541e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN la_enable;                          /* TRUE if listening A                      */
542e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   la_bit_frame_sdd;                   /* Bit Frame SDD in Byte 1 of SENS_RES      */
543e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   la_platform_config;                 /* Platform Config in Byte 2 of SENS_RES    */
544e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   la_sel_info;                        /* Byte of SEL_RES                          */
545e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   la_nfcid1_len;                      /* NFCID1 (0, 4, 7 or 10 bytes)             */
546e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   la_nfcid1[NCI_NFCID1_MAX_LEN];      /*        if empty, NFCC will decide        */
547e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
548e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    /*
549e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    ** Discovery Configuration Parameters for Listen B
550e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    */
551e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN lb_enable;                          /* TRUE if listening B                      */
552e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lb_sensb_info;                      /* Byte 2 of Protocol Info within SENSB_RES */
553e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lb_nfcid0_len;                      /* NFCID0 (0, 1 or 4 bytes)                 */
554e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lb_nfcid0[NFA_LB_MAX_NFCID0_LEN];   /*         if empty, NFCC will decide       */
555e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lb_app_data[NCI_PARAM_LEN_LB_APPDATA];/* Bytes 6 - 9 in SENSB_RES               */
556e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lb_sfgi;                            /* Start-Up Frame Guard Time                */
557e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lb_adc_fo;                          /* Byte 12 in SENSB_RES                     */
558e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
559e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    /*
560e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    ** Discovery Configuration Parameters for Listen F
561e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    */
562e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN lf_enable;                          /* TRUE if listening F          */
563e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lf_con_bitr_f;                      /* bit rate to listen           */
564e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lf_protocol_type;                   /* Supported Protocols          */
565e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT16  lf_t3t_flags;                       /* bit field indicating which lf_t3t_identifier are enabled */
566e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lf_t3t_identifier[NFA_LF_MAX_SC_NFCID2][NCI_SYSTEMCODE_LEN + NCI_NFCID2_LEN];
567e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                /* System Code and NFCID2       */
568e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lf_t3t_pmm[NCI_T3T_PMM_LEN];        /* Bytes 10 - 17 in SENSF_RES   */
569e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
570e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    /*
571e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    ** Discovery Configuration Parameters for Listen ISO-DEP
572e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    */
573e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN li_enable;                          /* TRUE if listening ISO-DEP            */
574e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   li_fwi;                             /* Frame Waiting Time Integer           */
575e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   la_hist_bytes_len;                  /* historical bytes for Listen-A        */
576e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   la_hist_bytes[NFA_LA_MAX_HIST_BYTES];
577e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lb_h_info_resp_len;                 /* higher layer response for Listen-B   */
578e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   lb_h_info_resp[NFA_LB_MAX_H_INFO_LEN];
579e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
580e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    /*
581e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    ** Discovery Configuration Parameters for Listen NFC-DEP
582e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    */
583e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    BOOLEAN ln_enable;                          /* TRUE if listening NFC-DEP            */
584e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   ln_wt;                              /* Waiting Time Integer                 */
585e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   ln_atr_res_gen_bytes_len;           /* General bytes in ATR_RES             */
586e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   ln_atr_res_gen_bytes[NCI_MAX_GEN_BYTES_LEN];
587e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8   ln_atr_res_config;                  /* Optional parameters (PPt) in ATR_RES */
588e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_LISTEN_CFG;
589e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
590e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Data for NFA_UpdateRFCommParams () */
591e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNFC_RF_COMM_PARAMS tNFA_RF_COMM_PARAMS;
592e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
593e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* RF Interface type */
594e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_INTERFACE_FRAME         NFC_INTERFACE_FRAME
595e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_INTERFACE_ISO_DEP       NFC_INTERFACE_ISO_DEP
596e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_INTERFACE_NFC_DEP       NFC_INTERFACE_NFC_DEP
597e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef tNFC_INTF_TYPE tNFA_INTF_TYPE;
598e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
599e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
600e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** NDEF Definitions
601e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
602e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
603e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Definitions for tNFA_TNF (NDEF type name format ID) */
604e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TNF_EMPTY           NDEF_TNF_EMPTY      /* Empty or no type specified                       */
605e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TNF_WKT             NDEF_TNF_WKT        /* NFC Forum well-known type [NFC RTD]              */
606e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TNF_RFC2046_MEDIA   NDEF_TNF_MEDIA      /* Media-type as defined in RFC 2046 [RFC 2046]     */
607e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TNF_RFC3986_URI     NDEF_TNF_URI        /* Absolute URI as defined in RFC 3986 [RFC 3986]   */
608e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TNF_EXTERNAL        NDEF_TNF_EXT        /* NFC Forum external type [NFC RTD]                */
609e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TNF_UNKNOWN	        NDEF_TNF_UNKNOWN    /* Unknown                                          */
610e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TNF_UNCHANGED       NDEF_TNF_UNCHANGED  /* Unchanged                                        */
611e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TNF_RESERVED        NDEF_TNF_RESERVED   /* Reserved                                         */
612e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_TNF_DEFAULT	        0xFF                /* Used to register default NDEF type handler       */
613e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFA_TNF;
614e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
615e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Definitions for tNFA_NDEF_URI_ID (Frequently used prefixes. For additional values, see [NFC RTD URI] */
616e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NDEF_URI_ID_ABSOLUTE    0x00            /* Unabridged URI.  */
617e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NDEF_URI_ID_HTTP        0x03            /* http://          */
618e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NDEF_URI_ID_HTTPS       0x04            /* https://         */
619e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NDEF_URI_ID_TEL         0x05            /* tel:             */
620e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NDEF_URI_ID_MAILTO      0x06            /* mailto:          */
621e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NDEF_URI_ID_FTP         0x0D            /* ftp://           */
622e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NDEF_URI_ID_FILE        0x1D            /* file://          */
623e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
624e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFA_NDEF_URI_ID;
625e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
626e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Events for tNFA_NDEF_CBACK */
627e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#define NFA_NDEF_REGISTER_EVT   0   /* NDEF record type registered. (In response to NFA_RegisterNDefTypeHandler)    */
6285c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen#define NFA_NDEF_DATA_EVT	    1   /* Received an NDEF message with the registered type. See [tNFA_NDEF_DATA]       */
629e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef UINT8 tNFA_NDEF_EVT;
630e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
631e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Structure for NFA_NDEF_REGISTER_EVT event data */
632e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
633e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
634e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_STATUS status;             /* Status of the registration               */
635e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_HANDLE ndef_type_handle;   /* Handle for this NDEF type registration.  */
636e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_NDEF_REGISTER;
637e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
638e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Structure for NFA_NDEF_DATA_EVT event data */
639e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef struct
640e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
641e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_HANDLE ndef_type_handle;   /* Handle for NDEF type registration.   */
642e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT8       *p_data;            /* Data buffer                          */
643e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    UINT32      len;                /* Length of data                       */
644e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_NDEF_DATA;
645e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
646e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* Union of all NDEF callback structures */
647e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef union
648e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
649e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_NDEF_REGISTER  ndef_reg;       /* Structure for NFA_NDEF_REGISTER_EVT event data   */
650e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project    tNFA_NDEF_DATA      ndef_data;      /* Structure for NFA_NDEF_DATA_EVT event data       */
651e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project} tNFA_NDEF_EVT_DATA;
652e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
653e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFA_NDEF callback */
654e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFA_NDEF_CBACK) (tNFA_NDEF_EVT event, tNFA_NDEF_EVT_DATA *p_data);
655e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
656e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/* NFA VSC Callback */
657e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projecttypedef void (tNFA_VSC_CBACK)(UINT8 event, UINT16 param_len, UINT8 *p_param);
658e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
659e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
660e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*****************************************************************************
661e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**  External Function Declarations
662e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*****************************************************************************/
663e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifdef __cplusplus
664e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Projectextern "C"
665e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project{
666e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
667e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
668e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
669e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
670e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_Init
671e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
672e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function initializes control blocks for NFA
673e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
674e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_hal_entry_tbl points to a table of HAL entry points
675e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
676e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NOTE: the buffer that p_hal_entry_tbl points must be
677e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  persistent until NFA is disabled.
678e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
679e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
680e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          none
681e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
682e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
683e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern void NFA_Init (tHAL_NFC_ENTRY *p_hal_entry_tbl);
684e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
685e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
686e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
687e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_Enable
688e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
689e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function enables NFC. Prior to calling NFA_Enable,
690e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  the NFCC must be powered up, and ready to receive commands.
691e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  This function enables the tasks needed by NFC, opens the NCI
692e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  transport, resets the NFC controller, downloads patches to
693e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  the NFCC (if necessary), and initializes the NFC subsystems.
694e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
695e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  This function should only be called once - typically when NFC
696e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  is enabled during boot-up, or when NFC is enabled from a
697e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  settings UI. Subsequent calls to NFA_Enable while NFA is
698e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  enabling or enabled will be ignored. When the NFC startup
699e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  procedure is completed, an NFA_DM_ENABLE_EVT is returned to the
700e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  application using the tNFA_DM_CBACK.
701e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
702e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The tNFA_CONN_CBACK parameter is used to register a callback
703e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  for polling, p2p and card emulation events.
704e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
705e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
706e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
707e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
708e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
709e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
710e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_Enable (tNFA_DM_CBACK       *p_dm_cback,
711e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                       tNFA_CONN_CBACK     *p_conn_cback);
712e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
713e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
714e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
715e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_Disable
716e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
717e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to shutdown NFC. The tasks for NFC
718e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  are terminated, and clean up routines are performed. This
719e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  function is typically called during platform shut-down, or
720e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  when NFC is disabled from a settings UI. When the NFC
721e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  shutdown procedure is completed, an NFA_DM_DISABLE_EVT is
722e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  returned to the application using the tNFA_DM_CBACK.
723e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
724e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The platform should wait until the NFC_DISABLE_REVT is
725e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  received before powering down the NFC chip and NCI transport.
726e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  This is required to so that NFA can gracefully shut down any
727e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  open connections.
728e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
729e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
730e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
731e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
732e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
733e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_Disable (BOOLEAN graceful);
734e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
735e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
736e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
737e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_SetConfig
738e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
739e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Set the configuration parameters to NFCC. The result is
740e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  reported with an NFA_DM_SET_CONFIG_EVT in the tNFA_DM_CBACK
741e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  callback.
742e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
743e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Note:            If RF discovery is started, NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT
744e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  should happen before calling this function. Most Configuration
745e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  parameters are related to RF discovery.
746e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
747e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
748e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_BUSY if previous setting is on-going
749e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
750e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
751e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
752e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_SetConfig (tNFA_PMID    param_id,
753e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                          UINT8        length,
754e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                          UINT8       *p_data);
755e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
756e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
757e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
758e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_GetConfig
759e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
760e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Get the configuration parameters from NFCC. The result is
761e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  reported with an NFA_DM_GET_CONFIG_EVT in the tNFA_DM_CBACK
762e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  callback.
763e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
764e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
765e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
766e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
767e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
768e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_GetConfig (UINT8 num_ids, tNFA_PMID *p_param_ids);
769e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
770e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
771e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
772e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_RequestExclusiveRfControl
773e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
774e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Request exclusive control of NFC.
775e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - Previous behavior (polling/tag reading, DH card emulation)
776e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                    will be suspended .
777e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - Polling and listening will be done based on the specified
778e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                    params
779e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
780e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The NFA_EXCLUSIVE_RF_CONTROL_STARTED_EVT event of
781e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  tNFA_CONN_CBACK indicates the status of the operation.
782e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
783e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_ACTIVATED_EVT and NFA_DEACTIVATED_EVT indicates link
784e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  activation/deactivation.
785e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
786e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_SendRawFrame is used to send data to the peer. NFA_DATA_EVT
787e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  indicates data from the peer.
788e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
789e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  If a tag is activated, then the NFA_RW APIs may be used to
790e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  send commands to the tag. Incoming NDEF messages are sent to
791e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  the NDEF callback.
792e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
793e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  Once exclusive RF control has started, NFA will not activate
794e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  LLCP internally. The application has exclusive control of
795e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  the link.
796e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
797e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Note:            If RF discovery is started, NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT
798e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  should happen before calling this function
799e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
800e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
801e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
802e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
803e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
804e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_RequestExclusiveRfControl (tNFA_TECHNOLOGY_MASK poll_mask,
805e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                          tNFA_LISTEN_CFG *p_listen_cfg,
806e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                          tNFA_CONN_CBACK *p_conn_cback,
807e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                          tNFA_NDEF_CBACK *p_ndef_cback);
808e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
809e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
810e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
811e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_ReleaseExclusiveRfControl
812e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
813e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Release exclusive control of NFC. Once released, behavior
814e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  prior to obtaining exclusive RF control will resume.
815e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
816e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNote??
817e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
818e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
819e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
820e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
821e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_ReleaseExclusiveRfControl (void);
822e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
823e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
824e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
825e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_EnablePolling
826e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
827e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Enable polling for technologies specified by poll_mask.
828e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
829e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The following events (notified using the connection
830e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  callback registered with NFA_Enable) are generated during
831e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  polling:
832e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
833e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - NFA_POLL_ENABLED_EVT indicates whether or not polling
834e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                    successfully enabled.
835e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - NFA_DISC_RESULT_EVT indicates there are more than one devices,
836e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                    so application must select one of tags by calling NFA_Select().
837e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - NFA_SELECT_RESULT_EVT indicates whether previous selection was
838e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                    successful or not. If it was failed then application must select
839e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                    again or deactivate by calling NFA_Deactivate().
840e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - NFA_ACTIVATED_EVT is generated when an NFC link is activated.
841e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - NFA_NDEF_DETECT_EVT is generated if tag is activated
842e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - NFA_LLCP_ACTIVATED_EVT/NFA_LLCP_DEACTIVATED_EVT is generated
843e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                    if NFC-DEP is activated
844e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  - NFA_DEACTIVATED_EVT will be returned after deactivating NFC link.
845e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
846e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Note:            If RF discovery is started, NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT
847e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  should happen before calling this function
848e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
849e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
850e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
851e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
852e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
853e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_EnablePolling (tNFA_TECHNOLOGY_MASK poll_mask);
854e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
855e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
856e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
857e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_DisablePolling
858e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
859e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Disable polling
860e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_POLL_DISABLED_EVT will be returned after stopping polling.
861e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
862e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Note:            If RF discovery is started, NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT
863e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  should happen before calling this function
864e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
865e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
866e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
867e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
868e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
869e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_DisablePolling (void);
870e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
87167aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu/*******************************************************************************
87267aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
87367aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Function         NFA_EnableListening
87467aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
87567aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Description      Enable listening.
87667aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_LISTEN_ENABLED_EVT will be returned after listening is allowed.
87767aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
87867aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  The actual listening technologies are specified by other NFA
87967aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  API functions. Such functions include (but not limited to)
88067aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_CeConfigureUiccListenTech.
88167aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  If NFA_DisableListening () is called to ignore the listening technologies,
88267aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_EnableListening () is called to restore the listening technologies
88367aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  set by these functions.
88467aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
88567aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Note:            If RF discovery is started, NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT
88667aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  should happen before calling this function
88767aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
88867aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Returns          NFA_STATUS_OK if successfully initiated
88967aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_STATUS_FAILED otherwise
89067aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
89167aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu*******************************************************************************/
89267aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan ChuNFC_API extern tNFA_STATUS NFA_EnableListening (void);
89367aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu
89467aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu/*******************************************************************************
89567aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
89667aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Function         NFA_DisableListening
89767aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
89867aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Description      Disable listening
89967aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_LISTEN_DISABLED_EVT will be returned after stopping listening.
90067aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  This function is called to exclude listen at RF discovery.
90167aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
90267aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Note:            If RF discovery is started, NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT
90367aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  should happen before calling this function
90467aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
90567aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Returns          NFA_STATUS_OK if successfully initiated
90667aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_STATUS_FAILED otherwise
90767aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
90867aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu*******************************************************************************/
90967aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan ChuNFC_API extern tNFA_STATUS NFA_DisableListening (void);
91067aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu
91167aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu/*******************************************************************************
91267aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
91367aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Function         NFA_PauseP2p
91467aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
91567aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Description      Pause P2P services.
91667aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_P2P_PAUSED_EVT will be returned after P2P services are
91767aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  disabled.
91867aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
91967aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  The P2P services enabled by NFA_P2p* API functions are not
92067aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  available. NFA_ResumeP2p() is called to resume the P2P
92167aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  services.
92267aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
92367aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Note:            If RF discovery is started, NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT
92467aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  should happen before calling this function
92567aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
92667aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Returns          NFA_STATUS_OK if successfully initiated
92767aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_STATUS_FAILED otherwise
92867aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
92967aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu*******************************************************************************/
93067aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan ChuNFC_API extern tNFA_STATUS NFA_PauseP2p (void);
93167aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu
93267aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu/*******************************************************************************
93367aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
93467aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Function         NFA_ResumeP2p
93567aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
93667aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Description      Resume P2P services.
93767aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_P2P_RESUMED_EVT will be returned after P2P services are.
93867aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  enables again.
93967aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
94067aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Note:            If RF discovery is started, NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT
94167aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  should happen before calling this function
94267aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
94367aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu** Returns          NFA_STATUS_OK if successfully initiated
94467aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**                  NFA_STATUS_FAILED otherwise
94567aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu**
94667aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan Chu*******************************************************************************/
94767aef6c6c6f6bc7b8364b97949e874b9dc7175bcEvan ChuNFC_API extern tNFA_STATUS NFA_ResumeP2p (void);
94809de1b298ad4237ba50018d28086c0430da8c23eMartijn Coenen
949e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
950e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
951e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_SetP2pListenTech
952e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
953e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to set listen technology for NFC-DEP.
954e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  This funtion may be called before or after starting any server
955e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  on NFA P2P/CHO/SNEP.
956e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  If there is no technology for NFC-DEP, P2P listening will be
957e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  stopped.
958e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
959e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_SET_P2P_LISTEN_TECH_EVT without data will be returned.
960e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
961e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Note:            If RF discovery is started, NFA_StopRfDiscovery()/NFA_RF_DISCOVERY_STOPPED_EVT
962e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  should happen before calling this function
963e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
964e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
965e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
966e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
967e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
968e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_SetP2pListenTech (tNFA_TECHNOLOGY_MASK tech_mask);
969e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
970e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
971e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
972e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_StartRfDiscovery
973e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
974e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Start RF discovery
975e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  RF discovery parameters shall be set by other APIs.
976e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
977e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  An NFA_RF_DISCOVERY_STARTED_EVT indicates whether starting was successful or not.
978e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
979e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
980e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
981e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
982e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
983e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_StartRfDiscovery (void);
984e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
985e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
986e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
987e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_StopRfDiscovery
988e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
989e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Stop RF discovery
990e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
991e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  An NFA_RF_DISCOVERY_STOPPED_EVT indicates whether stopping was successful or not.
992e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
993e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
994e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
995e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
996e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
997e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_StopRfDiscovery (void);
998e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
999e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1000e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1001e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_SetRfDiscoveryDuration
1002e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1003e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Set the duration of the single discovery period in [ms].
1004e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  Allowable range: 0 ms to 0xFFFF ms.
1005e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1006e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Note:            If discovery is already started, the application should
1007e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  call NFA_StopRfDiscovery prior to calling
1008e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_SetRfDiscoveryDuration, and then call
1009e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_StartRfDiscovery afterwards to restart discovery using
1010e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  the new duration.
1011e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1012e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns:
1013e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_OK, if command accepted
1014e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED: otherwise
1015e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1016e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1017e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_SetRfDiscoveryDuration (UINT16 discovery_period_ms);
1018e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1019e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1020e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1021e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_Select
1022e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1023e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Select one from detected devices by NFA_DISC_RESULT_EVT after the
1024e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  last discovery result is received.
1025e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  An NFA_SELECT_RESULT_EVT indicates whether selection was successful or not.
1026e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  If failed then application must select again or deactivate by NFA_Deactivate ().
1027e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1028e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
1029e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_INVALID_PARAM if RF interface is not matched protocol
1030e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
1031e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1032e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1033e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_Select (UINT8             rf_disc_id,
1034e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                       tNFA_NFC_PROTOCOL protocol,
1035e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                       tNFA_INTF_TYPE    rf_interface);
1036e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1037e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1038e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1039e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_UpdateRFCommParams
1040e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1041e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to update RF Communication parameters
1042e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  once the Frame RF Interface has been activated.
1043e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1044e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  An NFA_UPDATE_RF_PARAM_RESULT_EVT indicates whether updating
1045e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  was successful or not.
1046e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1047e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
1048e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
1049e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1050e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1051e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_UpdateRFCommParams (tNFA_RF_COMM_PARAMS *p_params);
1052e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1053e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1054e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1055e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_Deactivate
1056e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1057e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description
1058e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  If sleep_mode=TRUE:
1059e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      Deselect the activated device by deactivating into sleep mode.
1060e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1061e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      An NFA_DEACTIVATE_FAIL_EVT indicates that selection was not successful.
1062e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      Application can select another discovered device or deactivate by NFA_Deactivate ()
1063e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      after receiving NFA_DEACTIVATED_EVT.
1064e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1065e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      Deactivating to sleep mode is not allowed when NFCC is in wait-for-host-select
1066e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      mode, or in listen-sleep states; NFA will deactivate to idle or discovery state
1067e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      for these cases respectively.
1068e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1069e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1070e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  If sleep_mode=FALSE:
1071e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      Deactivate the connection (e.g. as a result of presence check failure)
1072e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      NFA_DEACTIVATED_EVT will indicate that link is deactivated.
1073e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                      Polling/listening will resume (unless the nfcc is in wait_for-all-discoveries state)
1074e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1075e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1076e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
1077e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
1078e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1079e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1080e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_Deactivate (BOOLEAN sleep_mode);
1081e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1082e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1083e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1084e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_SendRawFrame
1085e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1086e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Send a raw frame over the activated interface with the NFCC.
1087e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  This function can only be called after NFC link is activated.
1088e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
10895c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen**                  If the activated interface is a tag and auto-presence check is
10905c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen**                  enabled then presence_check_start_delay can be used to indicate
10915c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen**                  the delay in msec after which the next auto presence check
10925c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen**                  command can be sent. NFA_DM_DEFAULT_PRESENCE_CHECK_START_DELAY
10935c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen**                  can be used as the default value for the delay.
10945c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen**
1095e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
1096e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
1097e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1098e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1099e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_SendRawFrame (UINT8  *p_raw_data,
11005c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen                                             UINT16  data_len,
11015c65c3a0f42e174e47fecd4e569606003217ff4eMartijn Coenen                                             UINT16  presence_check_start_delay);
1102e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1103e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1104e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** NDEF APIs
1105e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1106e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1107e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1108e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1109e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_RegisterNDefTypeHandler
1110e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1111e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function allows the applications to register for
1112e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  specific types of NDEF records. When NDEF records are
1113e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  received, NFA will parse the record-type field, and pass
1114e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  the record to the registered tNFA_NDEF_CBACK.
1115e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1116e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  For records types which were not registered, the record will
1117e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  be sent to the default handler. A default type-handler may
1118e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  be registered by calling this NFA_RegisterNDefTypeHandler
1119e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  with tnf=NFA_TNF_DEFAULT. In this case, all un-registered
1120e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  record types will be sent to the callback. Only one default
1121e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  handler may be registered at a time.
1122e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1123e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  An NFA_NDEF_REGISTER_EVT will be sent to the tNFA_NDEF_CBACK
1124e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  to indicate that registration was successful, and provide a
1125e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  handle for this record type.
1126e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1127e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1128e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
1129e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
1130e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1131e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1132e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_RegisterNDefTypeHandler (BOOLEAN          handle_whole_message,
1133e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                        tNFA_TNF         tnf,
1134e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                        UINT8           *p_type_name,
1135e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                        UINT8            type_name_len,
1136e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                        tNFA_NDEF_CBACK *p_ndef_cback);
1137e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1138e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1139e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1140e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_RegisterNDefUriHandler
1141e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1142e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This API is a special-case of NFA_RegisterNDefTypeHandler
1143e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  with TNF=NFA_TNF_WKT, and type_name='U' (URI record); and allows
1144e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  registering for specific URI types (e.g. 'tel:' or 'mailto:').
1145e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1146e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  An NFA_NDEF_REGISTER_EVT will be sent to the tNFA_NDEF_CBACK
1147e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  to indicate that registration was successful, and provide a
1148e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  handle for this registration.
1149e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1150e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  If uri_id=NFA_NDEF_URI_ID_ABSOLUTE, then p_abs_uri contains the
1151e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  unabridged URI. For all other uri_id values, the p_abs_uri
1152e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  parameter is ignored (i.e the URI prefix is implied by uri_id).
1153e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  See [NFC RTD URI] for more information.
1154e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1155e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
1156e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
1157e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1158e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1159e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_RegisterNDefUriHandler (BOOLEAN          handle_whole_message,
1160e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                       tNFA_NDEF_URI_ID uri_id,
1161e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                       UINT8            *p_abs_uri,
1162e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                       UINT8            uri_id_len,
1163e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                                       tNFA_NDEF_CBACK  *p_ndef_cback);
1164e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1165e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1166e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1167e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1168e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_DeregisterNDefTypeHandler
1169e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1170e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      Deregister NDEF record type handler.
1171e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1172e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
1173e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
1174e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1175e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1176e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_DeregisterNDefTypeHandler (tNFA_HANDLE ndef_type_handle);
1177e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1178e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1179e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1180e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1181e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_PowerOffSleepMode
1182e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1183e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to enter or leave NFCC Power Off Sleep mode
1184e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_DM_PWR_MODE_CHANGE_EVT will be sent to indicate status.
1185e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1186e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  start_stop : TRUE if entering Power Off Sleep mode
1187e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                               FALSE if leaving Power Off Sleep mode
1188e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1189e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNote??
1190e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
1191e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
1192e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1193e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1194e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_PowerOffSleepMode (BOOLEAN start_stop);
1195e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1196e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1197e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1198e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_RegVSCback
1199e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1200e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to register or de-register a callback
1201e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  function to receive Proprietary NCI response and notification
1202e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  events.
1203e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  The maximum number of callback functions allowed is NFC_NUM_VS_CBACKS
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 NFA_RegVSCback (BOOLEAN          is_register,
1209e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                           tNFA_VSC_CBACK   *p_cback);
1210e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1211e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1212e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1213e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_SendVsCommand
1214e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1215e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function is called to send an NCI Vendor Specific
1216e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  command to NFCC.
1217e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1218e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  oid             - The opcode of the VS command.
1219e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  cmd_params_len  - The command parameter len
1220e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_cmd_params    - The command parameter
1221e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  p_cback         - The callback function to receive the command
1222e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                                    status
1223e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1224e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          NFA_STATUS_OK if successfully initiated
1225e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  NFA_STATUS_FAILED otherwise
1226e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1227e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1228e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern tNFA_STATUS NFA_SendVsCommand (UINT8            oid,
1229e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                              UINT8            cmd_params_len,
1230e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                              UINT8            *p_cmd_params,
1231e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project                                              tNFA_VSC_CBACK   *p_cback);
1232e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1233e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project/*******************************************************************************
1234e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1235e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Function         NFA_SetTraceLevel
1236e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1237e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Description      This function sets the trace level for NFA.  If called with
1238e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**                  a value of 0xFF, it simply returns the current trace level.
1239e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1240e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project** Returns          The new or current trace level
1241e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project**
1242e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project*******************************************************************************/
1243e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source ProjectNFC_API extern UINT8 NFA_SetTraceLevel (UINT8 new_level);
1244e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1245e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1246e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#ifdef __cplusplus
1247e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project}
1248e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif
1249e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1250e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project#endif /* NFA_API_H */
1251e9df6ba5a8fcccf306a80b1670b423be8fe7746The Android Open Source Project
1252