diff options
author | Sebastian Niciarz <sebastian.niciarz@intel.com> | 2012-03-17 19:26:21 +0100 |
---|---|---|
committer | Shuo Gao <shuo.gao@intel.com> | 2012-08-23 10:00:56 +0800 |
commit | 95696b8de4657f02ba1f75d7592e0670810d807f (patch) | |
tree | ed4fcc707c2bf0e3dcbf701630c4ebee142d88b3 | |
parent | b668d06f9447b613f6e8e65817e12ccd8d2b6225 (diff) | |
download | external_libnfc-nxp-95696b8de4657f02ba1f75d7592e0670810d807f.zip external_libnfc-nxp-95696b8de4657f02ba1f75d7592e0670810d807f.tar.gz external_libnfc-nxp-95696b8de4657f02ba1f75d7592e0670810d807f.tar.bz2 |
Add support for target-customized NFC stack configuration
This patch allows inclusion of target-customized configuration
of NFC stack.
The target-specific configuration will be stored in a header file,
outside of AOSP. To have it icluded, define TARGET_HAS_NFC_CUSTOM_CONFIG
macro and export your header file using BUILD_COPY_HEADERS macro.
Change-Id: Ifa2d08c2ae8860c3f0690a04c517025892bd4c16
Author: Sebastian Niciarz <sebastian.niciarz@intel.com>
Signed-off-by: Sebastian Niciarz <sebastian.niciarz@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 23071
-rw-r--r-- | Android.mk | 5 | ||||
-rw-r--r-- | inc/nfc_custom_config_example.h (renamed from inc/nfc_custom_config.h) | 37 |
2 files changed, 23 insertions, 19 deletions
@@ -106,6 +106,11 @@ LOCAL_SRC_FILES += Linux_x86/phDal4Nfc_messageQueueLib.c LOCAL_CFLAGS += -DNXP_MESSAGING -DANDROID -DNFC_TIMER_CONTEXT -fno-strict-aliasing +ifeq ($(TARGET_HAS_NFC_CUSTOM_CONFIG),true) +LOCAL_CFLAGS += -DNFC_CUSTOM_CONFIG_INCLUDE +LOCAL_CFLAGS += -I$(TARGET_OUT_HEADERS)/libnfc-nxp +endif + # Uncomment for Chipset command/responses # Or use "setprop debug.nfc.LOW_LEVEL_TRACES" at run-time # LOCAL_CFLAGS += -DLOW_LEVEL_TRACES diff --git a/inc/nfc_custom_config.h b/inc/nfc_custom_config_example.h index 0b4455a..d400bcc 100644 --- a/inc/nfc_custom_config.h +++ b/inc/nfc_custom_config_example.h @@ -20,7 +20,7 @@ * \brief HAL Custom Configurations * * -* \note This is the configuration header file of the HAL 4.0. custom configurable +* \note This is the configuration header file of the HAL 4.0. custom configurable * parameters of the HAL 4.0 are provided in this file * * Project: NFC-FRI-1.1 / HAL4.0 @@ -39,7 +39,7 @@ /*@}*/ -/** +/** * \name Hal * * File: \ref nfc_custom_config.h @@ -60,15 +60,15 @@ /**< Default Session ID for Initialisation */ #define DEFAULT_SESSION "NXP-NFC2" -/** Resolution value for the timer, here the +/** Resolution value for the timer, here the timer resolution is 100 milliseconds */ #define TIMER_RESOLUTION 100U -/**< Defines connection time out value for LLC timer, +/**< Defines connection time out value for LLC timer, 500 is in milliseconds */ #define LINK_CONNECTION_TIMEOUT 500U -/**< Defines guard time out value for LLC timer, +/**< Defines guard time out value for LLC timer, 250 is in milliseconds */ #define LINK_GUARD_TIMEOUT 250U @@ -76,14 +76,14 @@ * Initialisation */ -/* PLEASE NOTE: This Macro should be only enabled if there is a SMART_MX +/* PLEASE NOTE: This Macro should be only enabled if there is a SMART_MX * Chip attached to the PN544. */ /* #define NXP_HAL_ENABLE_SMX */ -/* PLEASE NOTE: Kindly change the DEFAULT_SESSION Macro for each of the +/* PLEASE NOTE: Kindly change the DEFAULT_SESSION Macro for each of the * configuration change done for the below Macros */ @@ -108,12 +108,12 @@ #define NFC_DEV_HWCONF_DEFAULT 0xBCU -/**< TX LDO Configuration +/**< TX LDO Configuration 0x00 -> 00b 3.0 V, 0x01 -> 01b 3.0 V, 0x02 -> 10b 2.7 V, 0x03 -> 11b 3.3 V, - + */ #define NXP_DEFAULT_TX_LDO 0x00U @@ -134,17 +134,17 @@ #define NXP_UICC_BIT_RATE 0x08U /**< Indicates PN544 Power Modes Configuration for the NFC Device, - 0x00U -> PN544 stays in active bat mode + 0x00U -> PN544 stays in active bat mode (except when generating RF field) - 0x01U -> PN544 goes in standby when possible otherwise + 0x01U -> PN544 goes in standby when possible otherwise stays in active bat mode - 0x02U -> PN544 goes in idle mode as soon as it can + 0x02U -> PN544 goes in idle mode as soon as it can (otherwise it is in active bat except when generating RF field) - 0x03U -> PN544 goes in standby when possible otherwise goes in idle mode - as soon as it can (otherwise it is in active bat except when + 0x03U -> PN544 goes in standby when possible otherwise goes in idle mode + as soon as it can (otherwise it is in active bat except when generating RF field) */ - + #define NXP_SYSTEM_PWR_STATUS 0x01U @@ -169,10 +169,10 @@ /* Reset the Default values of Host Link Timers */ -/* Macro to Enable the Host Side Link Timeout Configuration +/* Macro to Enable the Host Side Link Timeout Configuration * 0x00 ----> Default Pre-defined Configuration; * 0x01 ----> Update only the Host Link Guard Timeout Configuration; - * 0x03 ----> Update Both the Host Link Guard Timeout + * 0x03 ----> Update Both the Host Link Guard Timeout and ACK Timeout Configuration; */ #define HOST_LINK_TIMEOUT 0x00U @@ -184,7 +184,7 @@ #define NXP_NFC_LINK_ACK_CFG_DEFAULT 0x0005U -/* Macro to Enable the Interface Character Timeout Configuration +/* Macro to Enable the Interface Character Timeout Configuration * 0x00 ----> Default Pre-defined Configuration; * 0x01 ----> Update the IFC Timeout Default Configuration; */ @@ -198,4 +198,3 @@ #endif /* NFC_CUSTOM_CONFIG_H */ - |