config.h revision 077f48fc39770c8db3cdc27ba65c2f12299199dd
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 22extern "C" 23{ 24#endif 25 26int GetStrValue(const char* name, char* p_value, unsigned long len); 27int 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_UICC_LISTEN_TECH_EX_MASK "UICC_LISTEN_TECH_EXCLUDE_MASK" 68#define NAME_SNOOZE_MODE_CFG "SNOOZE_MODE_CFG" 69#define NAME_NFA_DM_DISC_DURATION_POLL "NFA_DM_DISC_DURATION_POLL" 70#define NAME_SPD_DEBUG "SPD_DEBUG" 71#define NAME_SPD_MAXRETRYCOUNT "SPD_MAX_RETRY_COUNT" 72#define NAME_SPI_NEGOTIATION "SPI_NEGOTIATION" 73#define NAME_AID_FOR_EMPTY_SELECT "AID_FOR_EMPTY_SELECT" 74#define NAME_PRESERVE_STORAGE "PRESERVE_STORAGE" 75#define NAME_NFA_MAX_EE_SUPPORTED "NFA_MAX_EE_SUPPORTED" 76#define NAME_NFCC_ENABLE_TIMEOUT "NFCC_ENABLE_TIMEOUT" 77#define NAME_NFA_DM_PRE_DISCOVERY_CFG "NFA_DM_PRE_DISCOVERY_CFG" 78#define NAME_POLL_FREQUENCY "POLL_FREQUENCY" 79#define NAME_XTAL_HARDWARE_ID "XTAL_HARDWARE_ID" 80#define NAME_XTAL_FREQUENCY "XTAL_FREQUENCY" 81#define NAME_XTAL_FREQ_INDEX "XTAL_FREQ_INDEX" 82#define NAME_XTAL_PARAMS_CFG "XTAL_PARAMS_CFG" 83#define NAME_EXCLUSIVE_SE_ACCESS "EXCLUSIVE_SE_ACCESS" 84#define NAME_DBG_NO_UICC_IDLE_TIMEOUT_TOGGLING "DBG_NO_UICC_IDLE_TIMEOUT_TOGGLING" 85#define NAME_PRESENCE_CHECK_ALGORITHM "PRESENCE_CHECK_ALGORITHM" 86#define NAME_ALLOW_NO_NVM "ALLOW_NO_NVM" 87#define NAME_DEVICE_HOST_WHITE_LIST "DEVICE_HOST_WHITE_LIST" 88#define NAME_POWER_OFF_MODE "POWER_OFF_MODE" 89#define NAME_GLOBAL_RESET "DO_GLOBAL_RESET" 90#define NAME_NCI_HAL_MODULE "NCI_HAL_MODULE" 91 92#define LPTD_PARAM_LEN (40) 93 94// default configuration 95#define default_transport "/dev/bcm2079x" 96#define default_storage_location "/data/nfc" 97 98struct tUART_CONFIG { 99 int m_iBaudrate; // 115200 100 int m_iDatabits; // 8 101 int m_iParity; // 0 - none, 1 = odd, 2 = even 102 int m_iStopbits; 103}; 104 105extern struct tUART_CONFIG uartConfig; 106#define MAX_CHIPID_LEN (16) 107void readOptionalConfig(const char* option); 108 109/* Snooze mode configuration structure */ 110typedef struct 111{ 112 unsigned char snooze_mode; /* Snooze Mode */ 113 unsigned char idle_threshold_dh; /* Idle Threshold Host */ 114 unsigned char idle_threshold_nfcc; /* Idle Threshold NFCC */ 115 unsigned char nfc_wake_active_mode; /* NFC_LP_ACTIVE_LOW or NFC_LP_ACTIVE_HIGH */ 116 unsigned char dh_wake_active_mode; /* NFC_LP_ACTIVE_LOW or NFC_LP_ACTIVE_HIGH */ 117} tSNOOZE_MODE_CONFIG; 118#endif 119