Android Hardware Abstraction Layer
config.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 1999-2012 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 #ifndef __CONFIG_H
19 #define __CONFIG_H
20 
21 #ifdef __cplusplus
22 extern "C"
23 {
24 #endif
25 
26 int GetStrValue(const char* name, char* p_value, unsigned long len);
27 int GetNumValue(const char* name, void* p_value, unsigned long len);
28 
29 #ifdef __cplusplus
30 };
31 #endif
32 
33 #define NAME_POLLING_TECH_MASK "POLLING_TECH_MASK"
34 #define NAME_REGISTER_VIRTUAL_SE "REGISTER_VIRTUAL_SE"
35 #define NAME_APPL_TRACE_LEVEL "APPL_TRACE_LEVEL"
36 #define NAME_USE_RAW_NCI_TRACE "USE_RAW_NCI_TRACE"
37 #define NAME_LOGCAT_FILTER "LOGCAT_FILTER"
38 #define NAME_LPTD_CFG "LPTD_CFG"
39 #define NAME_SCREEN_OFF_POWER_STATE "SCREEN_OFF_POWER_STATE"
40 #define NAME_PREINIT_DSP_CFG "PREINIT_DSP_CFG"
41 #define NAME_DTA_START_CFG "DTA_START_CFG"
42 #define NAME_TRANSPORT_DRIVER "TRANSPORT_DRIVER"
43 #define NAME_POWER_CONTROL_DRIVER "POWER_CONTROL_DRIVER"
44 #define NAME_PROTOCOL_TRACE_LEVEL "PROTOCOL_TRACE_LEVEL"
45 #define NAME_UART_PORT "UART_PORT"
46 #define NAME_UART_BAUD "UART_BAUD"
47 #define NAME_UART_PARITY "UART_PARITY"
48 #define NAME_UART_STOPBITS "UART_STOPBITS"
49 #define NAME_UART_DATABITS "UART_DATABITS"
50 #define NAME_CLIENT_ADDRESS "BCMI2CNFC_ADDRESS"
51 #define NAME_NFA_DM_START_UP_CFG "NFA_DM_START_UP_CFG"
52 #define NAME_NFA_DM_CFG "NFA_DM_CFG"
53 #define NAME_NFA_DM_LP_CFG "NFA_DM_LP_CFG"
54 #define NAME_LOW_SPEED_TRANSPORT "LOW_SPEED_TRANSPORT"
55 #define NAME_NFC_WAKE_DELAY "NFC_WAKE_DELAY"
56 #define NAME_NFC_WRITE_DELAY "NFC_WRITE_DELAY"
57 #define NAME_PERF_MEASURE_FREQ "REPORT_PERFORMANCE_MEASURE"
58 #define NAME_READ_MULTI_PACKETS "READ_MULTIPLE_PACKETS"
59 #define NAME_POWER_ON_DELAY "POWER_ON_DELAY"
60 #define NAME_PRE_POWER_OFF_DELAY "PRE_POWER_OFF_DELAY"
61 #define NAME_POST_POWER_OFF_DELAY "POST_POWER_OFF_DELAY"
62 #define NAME_CE3_PRE_POWER_OFF_DELAY "CE3_PRE_POWER_OFF_DELAY"
63 #define NAME_NFA_STORAGE "NFA_STORAGE"
64 #define NAME_NFA_DM_START_UP_VSC_CFG "NFA_DM_START_UP_VSC_CFG"
65 #define NAME_NFA_DTA_START_UP_VSC_CFG "NFA_DTA_START_UP_VSC_CFG"
66 #define NAME_UICC_LISTEN_TECH_MASK "UICC_LISTEN_TECH_MASK"
67 #define NAME_SNOOZE_MODE_CFG "SNOOZE_MODE_CFG"
68 #define NAME_NFA_DM_DISC_DURATION_POLL "NFA_DM_DISC_DURATION_POLL"
69 #define NAME_SPD_DEBUG "SPD_DEBUG"
70 #define NAME_SPD_MAXRETRYCOUNT "SPD_MAX_RETRY_COUNT"
71 #define NAME_SPI_NEGOTIATION "SPI_NEGOTIATION"
72 #define NAME_AID_FOR_EMPTY_SELECT "AID_FOR_EMPTY_SELECT"
73 #define NAME_PRESERVE_STORAGE "PRESERVE_STORAGE"
74 #define NAME_NFA_MAX_EE_SUPPORTED "NFA_MAX_EE_SUPPORTED"
75 #define NAME_NFCC_ENABLE_TIMEOUT "NFCC_ENABLE_TIMEOUT"
76 #define NAME_NFA_DM_PRE_DISCOVERY_CFG "NFA_DM_PRE_DISCOVERY_CFG"
77 #define NAME_POLL_FREQUENCY "POLL_FREQUENCY"
78 
79 #define LPTD_PARAM_LEN (40)
80 
81 // default configuration
82 #define default_transport "/dev/bcm2079x"
83 #define default_storage_location "/data/nfc"
84 
85 struct tUART_CONFIG {
86  int m_iBaudrate; // 115200
87  int m_iDatabits; // 8
88  int m_iParity; // 0 - none, 1 = odd, 2 = even
90 };
91 
92 extern struct tUART_CONFIG uartConfig;
93 #define MAX_CHIPID_LEN (16)
94 void readOptionalConfig(const char* option);
95 
96 /* Snooze mode configuration structure */
97 typedef struct
98 {
99  unsigned char snooze_mode; /* Snooze Mode */
100  unsigned char idle_threshold_dh; /* Idle Threshold Host */
101  unsigned char idle_threshold_nfcc; /* Idle Threshold NFCC */
102  unsigned char nfc_wake_active_mode; /* NFC_LP_ACTIVE_LOW or NFC_LP_ACTIVE_HIGH */
103  unsigned char dh_wake_active_mode; /* NFC_LP_ACTIVE_LOW or NFC_LP_ACTIVE_HIGH */
105 #endif