1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /******************************************************************************
18  *
19  *  This file contains compile-time configurable constants for vendor specific
20  *proprietary protocols
21  *
22  ******************************************************************************/
23 #ifndef __NFC_VENDOR_CFG_H__
24 #define __NFC_VENDOR_CFG_H__
25 
26 /* compile-time configuration structure for proprietary protocol and discovery
27  * value */
28 typedef struct {
29   uint8_t pro_protocol_18092_active;
30   uint8_t pro_protocol_b_prime;
31   uint8_t pro_protocol_dual;
32   uint8_t pro_protocol_15693;
33   uint8_t pro_protocol_kovio;
34   uint8_t pro_protocol_mfc;
35 
36   uint8_t pro_discovery_kovio_poll;
37   uint8_t pro_discovery_b_prime_poll;
38   uint8_t pro_discovery_b_prime_listen;
39 } tNFA_PROPRIETARY_CFG;
40 
41 extern tNFA_PROPRIETARY_CFG* p_nfa_proprietary_cfg;
42 
43 /**********************************************
44 * Proprietary Protocols
45 **********************************************/
46 #ifndef NCI_PROTOCOL_18092_ACTIVE
47 #define NCI_PROTOCOL_18092_ACTIVE \
48   (p_nfa_proprietary_cfg->pro_protocol_18092_active)
49 #endif
50 #ifndef NCI_PROTOCOL_B_PRIME
51 #define NCI_PROTOCOL_B_PRIME (p_nfa_proprietary_cfg->pro_protocol_b_prime)
52 #endif
53 #ifndef NCI_PROTOCOL_DUAL
54 #define NCI_PROTOCOL_DUAL (p_nfa_proprietary_cfg->pro_protocol_dual)
55 #endif
56 #ifndef NCI_PROTOCOL_15693
57 #define NCI_PROTOCOL_15693 (p_nfa_proprietary_cfg->pro_protocol_15693)
58 #endif
59 #ifndef NCI_PROTOCOL_KOVIO
60 #define NCI_PROTOCOL_KOVIO (p_nfa_proprietary_cfg->pro_protocol_kovio)
61 #endif
62 #ifndef NCI_PROTOCOL_MIFARE
63 #define NCI_PROTOCOL_MIFARE (p_nfa_proprietary_cfg->pro_protocol_mfc)
64 #endif
65 
66 /**********************************************
67 * Proprietary Discovery technology and mode
68 **********************************************/
69 #ifndef NCI_DISCOVERY_TYPE_POLL_KOVIO
70 #define NCI_DISCOVERY_TYPE_POLL_KOVIO \
71   (p_nfa_proprietary_cfg->pro_discovery_kovio_poll)
72 #endif
73 
74 #ifndef NCI_DISCOVERY_TYPE_POLL_B_PRIME
75 #define NCI_DISCOVERY_TYPE_POLL_B_PRIME \
76   (p_nfa_proprietary_cfg->pro_discovery_b_prime_poll)
77 #endif
78 
79 #ifndef NCI_DISCOVERY_TYPE_LISTEN_B_PRIME
80 #define NCI_DISCOVERY_TYPE_LISTEN_B_PRIME \
81   (p_nfa_proprietary_cfg->pro_discovery_b_prime_listen)
82 #endif
83 
84 #endif /* __NFC_VENDOR_CFG_H__ */
85