Upgrade stack to NFA_PI_1.03.66+

Take code from NFCA_MI_430.10.00.07.
Additional changes include:
* Adjust copyright.
* Clean up stack and HAL diagnostic tracing.
* Fix ce_t4t_data_cback() in src/nfc/tags/ce_t4t.c in order to let HCE payment to work.
* Reduce compilation warnings.

Change-Id: I7b174229029d4a4955ff7750623e78c9a8c856f6
diff --git a/src/include/nfc_target.h b/src/include/nfc_target.h
index c7cf22b..52cc228 100644
--- a/src/include/nfc_target.h
+++ b/src/include/nfc_target.h
@@ -186,8 +186,6 @@
 #define NFC_BRCM_VS_INCLUDED    TRUE
 #endif
 
-/* Define to TRUE to include not openned Broadcom Vendor Specific implementation */
-
 /* Define to TRUE if compling for NFC Reader/Writer Only mode */
 #ifndef NFC_RW_ONLY
 #define NFC_RW_ONLY         FALSE
@@ -562,11 +560,21 @@
 #define NFA_DM_AUTO_READ_NDEF        FALSE  /* !!!!! NFC-Android needs FALSE */
 #endif
 
-/* Automatic NDEF read (when not in exclusive RF mode) */
+/* Automatic NDEF presence check (when not in exclusive RF mode) */
 #ifndef NFA_DM_AUTO_PRESENCE_CHECK
 #define NFA_DM_AUTO_PRESENCE_CHECK   FALSE  /* Android requires FALSE */
 #endif
 
+/* Presence check option: 0x01: use sleep/wake for none-NDEF ISO-DEP tags */
+#ifndef NFA_DM_PRESENCE_CHECK_OPTION
+#define NFA_DM_PRESENCE_CHECK_OPTION                0x03  /* !!!!! Android needs value 3 */
+#endif
+
+/* Maximum time to wait for presence check response */
+#ifndef NFA_DM_MAX_PRESENCE_CHECK_TIMEOUT
+#define NFA_DM_MAX_PRESENCE_CHECK_TIMEOUT           500
+#endif
+
 /* Default delay to auto presence check after sending raw frame */
 #ifndef NFA_DM_DEFAULT_PRESENCE_CHECK_START_DELAY
 #define NFA_DM_DEFAULT_PRESENCE_CHECK_START_DELAY   750
@@ -677,6 +685,23 @@
 #ifndef HAL_WRITE
 #define HAL_WRITE(p)    {nfc_cb.p_hal->write(p->len, (UINT8 *)(p+1) + p->offset); GKI_freebuf(p);}
 
+#ifdef NFC_HAL_SHARED_GKI
+
+/* NFC HAL Included if NFC_NFCEE_INCLUDED */
+#if (NFC_NFCEE_INCLUDED == TRUE)
+
+#ifndef NFC_HAL_HCI_INCLUDED
+#define NFC_HAL_HCI_INCLUDED    TRUE
+#endif
+#else /* NFC_NFCEE_INCLUDED == TRUE */
+#ifndef NFC_HAL_HCI_INCLUDED
+#define NFC_HAL_HCI_INCLUDED    FALSE
+#endif
+
+#endif /* NFC_NFCEE_INCLUDED == FALSE */
+
+#endif /* NFC_HAL_SHARED_GKI */
+
 
 
 #endif /* HAL_WRITE */