Home | History | Annotate | Download | only in dm
      1 /******************************************************************************
      2  *
      3  *  Copyright (C) 2011-2013 Broadcom Corporation
      4  *
      5  *  Licensed under the Apache License, Version 2.0 (the "License");
      6  *  you may not use this file except in compliance with the License.
      7  *  You may obtain a copy of the License at:
      8  *
      9  *  http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *  See the License for the specific language governing permissions and
     15  *  limitations under the License.
     16  *
     17  ******************************************************************************/
     18 
     19 
     20 /******************************************************************************
     21  *
     22  *  This file contains compile-time configurable constants for NFA modules
     23  *
     24  ******************************************************************************/
     25 #include "nfa_api.h"
     26 
     27 /* the SetConfig for CE T3T/T4T */
     28 const UINT8 nfa_dm_ce_cfg[] =
     29 {
     30     13,                         /* total length */
     31     NFC_PMID_LF_T3T_PMM,        /* Type-3 tag default PMM */
     32     NCI_PARAM_LEN_LF_T3T_PMM,
     33     0x20,
     34     0x79,
     35     0xFF,
     36     0xFF,
     37     0xFF,
     38     0xFF,
     39     0xFF,
     40     0xFF,
     41     NFC_PMID_FWI,               /* FWI for ISO-DEP */
     42     1,
     43     CE_T4T_ISO_DEP_FWI
     44 };
     45 
     46 UINT8 *p_nfa_dm_ce_cfg = (UINT8 *) nfa_dm_ce_cfg;
     47 
     48 /* the SetConfig for optional general NFC stack functions */
     49 const UINT8 nfa_dm_gen_cfg[] =
     50 {
     51     3,                         /* total length */
     52     NFC_PMID_RF_FIELD_INFO,     /* Instruct NFCC to report RF field generated by remote device (or not) */
     53     1,
     54     0x01
     55 };
     56 
     57 UINT8 *p_nfa_dm_gen_cfg = NULL;
     58 
     59 UINT8 nfa_ee_max_ee_cfg = NFA_EE_MAX_EE_SUPPORTED;
     60 
     61 
     62 const tNCI_DISCOVER_MAPS nfa_dm_interface_mapping[NFA_DM_NUM_INTERFACE_MAP] =
     63 {
     64     /* Protocols that use Frame Interface do not need to be included in the interface mapping */
     65     {
     66         NCI_PROTOCOL_ISO_DEP,
     67         NCI_INTERFACE_MODE_POLL_N_LISTEN,
     68         NCI_INTERFACE_ISO_DEP
     69     },
     70     {
     71         NCI_PROTOCOL_NFC_DEP,
     72         NCI_INTERFACE_MODE_POLL_N_LISTEN,
     73         NCI_INTERFACE_NFC_DEP
     74     }
     75 };
     76 /* set to NULL to use the default mapping set by stack */
     77 tNCI_DISCOVER_MAPS *p_nfa_dm_interface_mapping = NULL;
     78 UINT8 nfa_dm_num_dm_interface_mapping = 0;
     79 
     80 
     81 const tNFA_DM_CFG nfa_dm_cfg =
     82 {
     83     NFA_DM_AUTO_DETECT_NDEF,                /* Automatic NDEF detection (when not in exclusive RF mode) */
     84     NFA_DM_AUTO_READ_NDEF                   /* Automatic NDEF read (when not in exclusive RF mode)      */
     85 
     86 };
     87 
     88 tNFA_DM_CFG *p_nfa_dm_cfg = (tNFA_DM_CFG *) &nfa_dm_cfg;
     89 
     90 
     91 const tNFA_HCI_CFG nfa_hci_cfg =
     92 {
     93     NFA_HCI_NETWK_INIT_IDLE_TIMEOUT, /* Max HCI Network IDLE time to wait for EE DISC REQ Ntf(s) */
     94     NFA_HCI_RESPONSE_TIMEOUT         /* Maximum HCP Response time to any HCP Command */
     95 };
     96 
     97 tNFA_HCI_CFG *p_nfa_hci_cfg = (tNFA_HCI_CFG *) &nfa_hci_cfg;
     98