blob: cce572fca1f949074f6ef19f5c359a36727ea34b [file] [log] [blame]
nxpandroidc7611652015-09-23 16:42:05 +05301/******************************************************************************
2 *
3 * Copyright (C) 2011-2014 Broadcom Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 ******************************************************************************/
18
nxpandroidc7611652015-09-23 16:42:05 +053019/******************************************************************************
20 *
21 * This file contains compile-time configurable constants for NFA modules
22 *
23 ******************************************************************************/
24#include "nfa_api.h"
25
26/* the SetConfig for CE T3T/T4T */
nxpandroid8f6d0532017-07-12 18:25:30 +053027const uint8_t nfa_dm_ce_cfg[] = {
28 13, /* total length */
29 NFC_PMID_LF_T3T_PMM, /* Type-3 tag default PMM */
nxpandroidc7611652015-09-23 16:42:05 +053030 NCI_PARAM_LEN_LF_T3T_PMM,
nxpandroid8f6d0532017-07-12 18:25:30 +053031 0x01, /* This PAD0 is used to identify HCE-F on Android */
32 0xFE, /* This PAD0 is used to identify HCE-F on Android */
nxf24591c1cbeab2018-02-21 17:32:26 +053033 0xFF,
34 0xFF,
35 0xFF,
36 0xFF,
37 0xFF,
38 0xFF,
39 NFC_PMID_FWI, /* FWI for ISO-DEP */
40 1,
41 CE_T4T_ISO_DEP_FWI};
nxpandroidc7611652015-09-23 16:42:05 +053042
nxpandroid8f6d0532017-07-12 18:25:30 +053043uint8_t* p_nfa_dm_ce_cfg = (uint8_t*)nfa_dm_ce_cfg;
nxpandroidc7611652015-09-23 16:42:05 +053044
nxpandroid8f6d0532017-07-12 18:25:30 +053045uint8_t* p_nfa_dm_gen_cfg = NULL;
nxpandroidc7611652015-09-23 16:42:05 +053046
47/* the RF Discovery Frequency for each technology */
nxpandroid8f6d0532017-07-12 18:25:30 +053048const tNFA_DM_DISC_FREQ_CFG nfa_dm_rf_disc_freq_cfg = {
49 1, /* Frequency for NFC Technology A */
50 1, /* Frequency for NFC Technology B */
51 1, /* Frequency for NFC Technology F */
52 1, /* Frequency for Proprietary Technology/15693 */
53 1, /* Frequency for Proprietary Technology/B-Prime */
54 1, /* Frequency for Proprietary Technology/Kovio */
55 1, /* Frequency for NFC Technology A active mode */
nxf24591c1cbeab2018-02-21 17:32:26 +053056 1, /* Frequency for NFC Technology F active mode */
57 1 /* Frequency for NFC Technology active mode */
nxpandroidc7611652015-09-23 16:42:05 +053058};
59
nxpandroid8f6d0532017-07-12 18:25:30 +053060tNFA_DM_DISC_FREQ_CFG* p_nfa_dm_rf_disc_freq_cfg =
61 (tNFA_DM_DISC_FREQ_CFG*)&nfa_dm_rf_disc_freq_cfg;
nxpandroidc7611652015-09-23 16:42:05 +053062
surajf99f00a2017-09-20 17:53:29 +053063uint8_t nfa_ee_max_ee_cfg = NFA_EE_MAX_EE_SUPPORTED;
nxf24591c1cbeab2018-02-21 17:32:26 +053064
nxpandroidc7611652015-09-23 16:42:05 +053065/* set to NULL to use the default mapping set by stack */
nxpandroid8f6d0532017-07-12 18:25:30 +053066tNCI_DISCOVER_MAPS* p_nfa_dm_interface_mapping = NULL;
67uint8_t nfa_dm_num_dm_interface_mapping = 0;
nxpandroidc7611652015-09-23 16:42:05 +053068
nxf24591c1cbeab2018-02-21 17:32:26 +053069tNFA_DM_CFG nfa_dm_cfg = {
nxpandroid8f6d0532017-07-12 18:25:30 +053070 /* Automatic NDEF detection (when not in exclusive RF mode) */
71 NFA_DM_AUTO_DETECT_NDEF,
72 /* Automatic NDEF read (when not in exclusive RF mode) */
73 NFA_DM_AUTO_READ_NDEF,
74 /* Automatic presence check */
75 NFA_DM_AUTO_PRESENCE_CHECK,
76 /* Use sleep/wake(last interface) for ISODEP presence check */
77 NFA_DM_PRESENCE_CHECK_OPTION,
78 /* Maximum time to wait for presence check response */
79 NFA_DM_MAX_PRESENCE_CHECK_TIMEOUT};
nxpandroidc7611652015-09-23 16:42:05 +053080
nxpandroid8f6d0532017-07-12 18:25:30 +053081tNFA_DM_CFG* p_nfa_dm_cfg = (tNFA_DM_CFG*)&nfa_dm_cfg;
nxpandroidc7611652015-09-23 16:42:05 +053082
nxpandroid8f6d0532017-07-12 18:25:30 +053083const uint8_t nfa_hci_whitelist[] = {0x02, 0x03, 0x04};
nxpandroidc7611652015-09-23 16:42:05 +053084
nxf24591c1cbeab2018-02-21 17:32:26 +053085tNFA_HCI_CFG nfa_hci_cfg = {
nxpandroid8f6d0532017-07-12 18:25:30 +053086 /* Max HCI Network IDLE time to wait for EE DISC REQ Ntf(s) */
87 NFA_HCI_NETWK_INIT_IDLE_TIMEOUT,
88 /* Maximum HCP Response time to any HCP Command */
89 NFA_HCI_RESPONSE_TIMEOUT,
nxf24591193ee782018-06-06 14:26:10 +053090#if (NXP_EXTNS == TRUE)
91 /* infinite wait for HCI reponse as lon as wtx is received */
92 0x00,
93#endif
nxpandroid8f6d0532017-07-12 18:25:30 +053094 /* Number of host in the whitelist of Terminal host */
nxpandroidc7611652015-09-23 16:42:05 +053095 0x03,
nxpandroid8f6d0532017-07-12 18:25:30 +053096 /* Pointer to the Whitelist of Terminal Host */
97 (uint8_t*)nfa_hci_whitelist};
nxpandroidc7611652015-09-23 16:42:05 +053098
nxpandroid8f6d0532017-07-12 18:25:30 +053099tNFA_HCI_CFG* p_nfa_hci_cfg = (tNFA_HCI_CFG*)&nfa_hci_cfg;
nxpandroidc7611652015-09-23 16:42:05 +0530100
nxpandroid8f6d0532017-07-12 18:25:30 +0530101bool nfa_poll_bail_out_mode = false;
nxf24591c1cbeab2018-02-21 17:32:26 +0530102tNFA_PROPRIETARY_CFG nfa_proprietary_cfg = {
103 0x80, /* NCI_PROTOCOL_18092_ACTIVE */
nxpandroidcdd30442016-05-27 17:26:18 +0530104 0x81, /* NCI_PROTOCOL_B_PRIME */
105 0x82, /* NCI_PROTOCOL_DUAL */
nxpandroidcdd30442016-05-27 17:26:18 +0530106 0x83, /* NCI_PROTOCOL_15693 */
nxpandroidcdd30442016-05-27 17:26:18 +0530107 0x8A, /* NCI_PROTOCOL_KOVIO */
nxpandroidcdd30442016-05-27 17:26:18 +0530108 0xFF, /* NCI_PROTOCOL_MIFARE */
nxpandroidcdd30442016-05-27 17:26:18 +0530109 0x77, /* NCI_DISCOVERY_TYPE_POLL_KOVIO */
nxpandroidcdd30442016-05-27 17:26:18 +0530110 0x74, /* NCI_DISCOVERY_TYPE_POLL_B_PRIME */
111 0xF4, /* NCI_DISCOVERY_TYPE_LISTEN_B_PRIME */
112};
113
nxpandroid8f6d0532017-07-12 18:25:30 +0530114tNFA_PROPRIETARY_CFG* p_nfa_proprietary_cfg =
nxpandroid5e589782017-08-14 11:54:50 +0530115 (tNFA_PROPRIETARY_CFG*)&nfa_proprietary_cfg;