diff options
author | Karthik Poosa <kpoosa2@codeaurora.org> | 2020-05-03 10:50:02 +0530 |
---|---|---|
committer | Karthik Poosa <kpoosa2@codeaurora.org> | 2020-05-04 16:17:48 +0530 |
commit | 7d333fb9415ce10a293010fe32ffed7430f69396 (patch) | |
tree | 79bcba375cb26075abc393e23781439ec6dd468e | |
parent | 50fd82d61d737b59f7ae401e22ca284b619b9d14 (diff) |
NFC: HIDL implementation manual merge
Manual merge for HAL service implementation files
from third party release for MW upgradation to 11.02.00.
Change-Id: I7187a961d4195a8eb1f1bffae88f015f2f51bdb2
-rw-r--r-- | 2.0/default/NqNfc.cpp | 26 | ||||
-rw-r--r-- | 2.0/default/NqNfc.h | 9 |
2 files changed, 7 insertions, 28 deletions
diff --git a/2.0/default/NqNfc.cpp b/2.0/default/NqNfc.cpp index 0a5cfec..4e2cd03 100644 --- a/2.0/default/NqNfc.cpp +++ b/2.0/default/NqNfc.cpp @@ -50,11 +50,8 @@ #include <hardware/hardware.h> #include <log/log.h> #include "NqNfc.h" -#include "eSEClientExtns.h" -#include "eSEClientIntf.h" #include "phNxpNciHal.h" #include "phNxpNciHal_Adaptation.h" -#include "phNxpNciHal_IoctlOperations.h" namespace vendor { namespace nxp { @@ -93,31 +90,22 @@ Return<bool> NqNfc::resetEse(uint64_t resetType) { bool ret = false; ALOGD("NqNfc::resetEse Entry"); - if((uint64_t)Constants::HAL_NFC_ESE_HARD_RESET == resetType) { - status = phNxpNciHal_resetEse(); - if(NFCSTATUS_SUCCESS == status) { - ret = true; - status = NFCSTATUS_SUCCESS; - ALOGD("HAL_NFC_ESE_HARD_RESET completed"); - } else { - ALOGD("HAL_NFC_ESE_HARD_RESET failed"); - } + status = phNxpNciHal_resetEse(resetType); + if(NFCSTATUS_SUCCESS == status) { + ret = true; + status = NFCSTATUS_SUCCESS; + ALOGD("HAL_NFC_ESE_HARD_RESET completed"); } else { - ALOGD("reset called with %lu type", resetType); + ALOGD("HAL_NFC_ESE_HARD_RESET failed"); } ALOGD("NqNfc::resetEse Exit"); return ret; } Return<bool> NqNfc::setEseUpdateState(NxpNfcHalEseState eSEState) { - int ret = -1; bool status = false; ALOGD("NqNfc::setEseUpdateState Entry"); - ret = phNxpNciHal_nfcTriggerSavedCb((uint8_t)NxpNfcEvents::HAL_NFC_HCI_RESET); - if(ret == 0) { - status = true; - } if(eSEState == NxpNfcHalEseState::HAL_NFC_ESE_JCOP_UPDATE_COMPLETED || eSEState == NxpNfcHalEseState::HAL_NFC_ESE_LS_UPDATE_COMPLETED) { @@ -126,7 +114,7 @@ Return<bool> NqNfc::setEseUpdateState(NxpNfcHalEseState eSEState) { eSEClientUpdate_NFC_Thread(); } if (eSEState == NxpNfcHalEseState::HAL_NFC_ESE_UPDATE_COMPLETED) { - phNxpNciHal_nfcTriggerSavedCb((uint8_t)NxpNfcEvents::HAL_NFC_RESTART); + status = phNxpNciHal_Abort(); } ALOGD("NqNfc::setEseUpdateState Exit"); return status; diff --git a/2.0/default/NqNfc.h b/2.0/default/NqNfc.h index a1869d5..4242174 100644 --- a/2.0/default/NqNfc.h +++ b/2.0/default/NqNfc.h @@ -51,7 +51,6 @@ #define VENDOR_NXP_HARDWARE_NFC_V2_0_NQNFC_H #include <vendor/nxp/hardware/nfc/2.0/INqNfc.h> -#include <vendor/nxp/hardware/nfc/2.0/types.h> #include <hidl/MQDescriptor.h> #include <hidl/Status.h> @@ -59,10 +58,6 @@ enum Constants : uint16_t { HAL_NFC_ESE_HARD_RESET = 5, }; -enum NxpNfcEvents : uint8_t { - HAL_NFC_RESTART = 0x30, - HAL_NFC_HCI_RESET = 0x40, -}; namespace vendor { namespace nxp { @@ -71,15 +66,11 @@ namespace nfc { namespace V2_0 { namespace implementation { -using ::android::hidl::base::V1_0::DebugInfo; using ::android::hidl::base::V1_0::IBase; using ::vendor::nxp::hardware::nfc::V2_0::INqNfc; -using ::vendor::nxp::hardware::nfc::V2_0::NxpNfcHalEseState; -using ::android::hardware::hidl_string; using ::android::hardware::hidl_vec; using ::android::hardware::Return; using ::android::hardware::Void; -using ::android::sp; struct NqNfc : public INqNfc { // Methods from ::vendor::nxp::hardware::nfc::V2_0::INqNfc follow. |