diff options
author | Evan Chu <evanchu@broadcom.com> | 2012-08-28 13:08:20 -0400 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-08-31 09:25:10 +0200 |
commit | f340f1a071a54c6ea4644fcef45c784a9be3c19a (patch) | |
tree | a413fbacfc77b3647bf0bb190ca0f716795647a5 /nci | |
parent | 8e9cdd7891bc1d6589b6d51b7c39efc87a64ba5e (diff) | |
download | packages_apps_nfc-f340f1a071a54c6ea4644fcef45c784a9be3c19a.zip packages_apps_nfc-f340f1a071a54c6ea4644fcef45c784a9be3c19a.tar.gz packages_apps_nfc-f340f1a071a54c6ea4644fcef45c784a9be3c19a.tar.bz2 |
Upgrade to stack NFA_MI_1.03.36
Change-Id: I79510a45e8a552626f0473000e23d0fc6888ee33
Diffstat (limited to 'nci')
-rwxr-xr-x | nci/jni/NativeNfcManager.cpp | 18 | ||||
-rwxr-xr-x | nci/jni/SecureElement.cpp | 4 |
2 files changed, 13 insertions, 9 deletions
diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp index 20bdd96..ff61cfe 100755 --- a/nci/jni/NativeNfcManager.cpp +++ b/nci/jni/NativeNfcManager.cpp @@ -133,7 +133,7 @@ static void nfaConnectionCallback (UINT8 event, tNFA_CONN_EVT_DATA *eventData); static void nfaDeviceManagementCallback (UINT8 event, tNFA_DM_CBACK_DATA *eventData); static bool isPeerToPeer (tNFA_ACTIVATED& activated); static void startRfDiscovery (bool isStart); -static void nfaBrcmInitCallback (UINT32 brcm_hw_id); +static void nfaBrcmInitCallback (UINT32 brcm_hw_id, UINT8 nvm_type); ///////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////// @@ -671,6 +671,14 @@ static jboolean nfcManager_doInitialize (JNIEnv* e, jobject o) { SyncEventGuard guard (sNfaEnableEvent); NFA_Init(); + + // Initialize the Crystal Frequency if configured. + if (GetNumValue((char*)NAME_XTAL_FREQUENCY, &devInitConfig.xtal_freq, sizeof(devInitConfig.xtal_freq))) + { + ALOGD("%s: setting XTAL Frequency=%d", __FUNCTION__, devInitConfig.xtal_freq); + devInitConfig.flags |= BRCM_DEV_INIT_FLAGS_SET_XTAL_FREQ; + } + NFA_BrcmInit (&devInitConfig, nfaBrcmInitCallback); stat = NFA_Enable (nfaDeviceManagementCallback, nfaConnectionCallback); @@ -733,10 +741,6 @@ static jboolean nfcManager_doInitialize (JNIEnv* e, jobject o) if (!GetNumValue(NAME_NFA_DM_MULTI_TECH_RESP, &num, sizeof(num)) || (num != 0)) NFA_SetMultiTechRsp(TRUE); - // if this value is not set or set and non-zero, enable sleep mode. - if (!GetNumValue(NAME_NFA_DM_ENABLE_SLEEP, &num, sizeof(num)) || (num != 0)) - NFA_EnableSnoozeMode(); - // Do custom NFCA startup configuration. doStartupConfig(); goto TheEnd; @@ -1706,9 +1710,9 @@ bool nfcManager_isNfcActive() ** Returns: None. ** *******************************************************************************/ -void nfaBrcmInitCallback (UINT32 brcm_hw_id) +void nfaBrcmInitCallback (UINT32 brcm_hw_id, UINT8 nvm_type) { - ALOGD ("%s: enter; brcm_hw_id=0x%lX", __FUNCTION__, brcm_hw_id); + ALOGD ("%s: enter; brcm_hw_id=0x%lX; nvm_type=0x%X", __FUNCTION__, brcm_hw_id, nvm_type); nfa_app_post_nci_reset (brcm_hw_id); } diff --git a/nci/jni/SecureElement.cpp b/nci/jni/SecureElement.cpp index 8847db7..1d52955 100755 --- a/nci/jni/SecureElement.cpp +++ b/nci/jni/SecureElement.cpp @@ -811,9 +811,9 @@ bool SecureElement::transceive (UINT8* xmitBuffer, INT32 xmitBufferSize, UINT8* mActualResponseSize = 0; memset (mResponseData, 0, sizeof(mResponseData)); if ((mNewPipeId == STATIC_PIPE_0x70) || (mNewPipeId == STATIC_PIPE_0x71)) - nfaStat = NFA_HciSendEvent (mNfaHciHandle, mNewPipeId, EVT_SEND_DATA, xmitBufferSize, xmitBuffer, sizeof(mResponseData), mResponseData); + nfaStat = NFA_HciSendEvent (mNfaHciHandle, mNewPipeId, EVT_SEND_DATA, xmitBufferSize, xmitBuffer, sizeof(mResponseData), mResponseData, 0); else - nfaStat = NFA_HciSendEvent (mNfaHciHandle, mNewPipeId, NFA_HCI_EVT_POST_DATA, xmitBufferSize, xmitBuffer, sizeof(mResponseData), mResponseData); + nfaStat = NFA_HciSendEvent (mNfaHciHandle, mNewPipeId, NFA_HCI_EVT_POST_DATA, xmitBufferSize, xmitBuffer, sizeof(mResponseData), mResponseData, 0); if (nfaStat == NFA_STATUS_OK) { |