From 2145c3b86144232f4ef50dd164985bdad2150dcc Mon Sep 17 00:00:00 2001 From: Ayush Raj Date: Mon, 22 Jul 2019 11:53:54 +0530 Subject: Added support for Autonomous Mode. To support card emulation when phone is in switch off state and being charged by USB or Host stack not available in power on case --- SN100x/src/nfa/ee/nfa_ee_act.cc | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/SN100x/src/nfa/ee/nfa_ee_act.cc b/SN100x/src/nfa/ee/nfa_ee_act.cc index a7b15d1..f58dcaa 100755 --- a/SN100x/src/nfa/ee/nfa_ee_act.cc +++ b/SN100x/src/nfa/ee/nfa_ee_act.cc @@ -234,8 +234,11 @@ static void nfa_ee_update_route_size(tNFA_EE_ECB* p_cb) { power_cfg |= NCI_ROUTE_PWR_STATE_SWITCH_OFF; if (p_cb->tech_battery_off & nfa_ee_tech_mask_list[xx]) power_cfg |= NCI_ROUTE_PWR_STATE_BATT_OFF; - if ((power_cfg & NCI_ROUTE_PWR_STATE_ON) && - (NFC_GetNCIVersion() == NCI_VERSION_2_0)) { + if ( +#if (NXP_EXTNS != TRUE) + (power_cfg & NCI_ROUTE_PWR_STATE_ON) && +#endif + (NFC_GetNCIVersion() == NCI_VERSION_2_0)) { if (p_cb->tech_screen_lock & nfa_ee_tech_mask_list[xx]) power_cfg |= NCI_ROUTE_PWR_STATE_SCREEN_ON_LOCK(); if (p_cb->tech_screen_off & nfa_ee_tech_mask_list[xx]) @@ -258,8 +261,11 @@ static void nfa_ee_update_route_size(tNFA_EE_ECB* p_cb) { power_cfg |= NCI_ROUTE_PWR_STATE_SWITCH_OFF; if (p_cb->proto_battery_off & nfa_ee_proto_mask_list[xx]) power_cfg |= NCI_ROUTE_PWR_STATE_BATT_OFF; - if ((power_cfg & NCI_ROUTE_PWR_STATE_ON) && - (NFC_GetNCIVersion() == NCI_VERSION_2_0)) { + if ( +#if (NXP_EXTNS != TRUE) + (power_cfg & NCI_ROUTE_PWR_STATE_ON) && +#endif + (NFC_GetNCIVersion() == NCI_VERSION_2_0)) { if (p_cb->proto_screen_lock & nfa_ee_proto_mask_list[xx]) power_cfg |= NCI_ROUTE_PWR_STATE_SCREEN_ON_LOCK(); if (p_cb->proto_screen_off & nfa_ee_proto_mask_list[xx]) @@ -433,8 +439,11 @@ static void nfa_ee_add_tech_route_to_ecb(tNFA_EE_ECB* p_cb, uint8_t* pp, power_cfg |= NCI_ROUTE_PWR_STATE_SWITCH_OFF; if (p_cb->tech_battery_off & nfa_ee_tech_mask_list[xx]) power_cfg |= NCI_ROUTE_PWR_STATE_BATT_OFF; - if ((power_cfg & NCI_ROUTE_PWR_STATE_ON) && - (NFC_GetNCIVersion() == NCI_VERSION_2_0)) { + if ( +#if (NXP_EXTNS != TRUE) + (power_cfg & NCI_ROUTE_PWR_STATE_ON) && +#endif + (NFC_GetNCIVersion() == NCI_VERSION_2_0)) { if (p_cb->tech_screen_lock & nfa_ee_tech_mask_list[xx]) power_cfg |= NCI_ROUTE_PWR_STATE_SCREEN_ON_LOCK(); if (p_cb->tech_screen_off & nfa_ee_tech_mask_list[xx]) @@ -479,8 +488,11 @@ static void nfa_ee_add_proto_route_to_ecb(tNFA_EE_ECB* p_cb, uint8_t* pp, /* Enable screen on lock power state for ISO-DEP protocol to enable HCE screen lock */ - if ((power_cfg & NCI_ROUTE_PWR_STATE_ON) && - (NFC_GetNCIVersion() == NCI_VERSION_2_0)) { + if ( +#if (NXP_EXTNS != TRUE) + (power_cfg & NCI_ROUTE_PWR_STATE_ON) && +#endif + (NFC_GetNCIVersion() == NCI_VERSION_2_0)) { if (p_cb->proto_screen_lock & nfa_ee_proto_mask_list[xx]) power_cfg |= NCI_ROUTE_PWR_STATE_SCREEN_ON_LOCK(); if (p_cb->proto_screen_off & nfa_ee_proto_mask_list[xx]) -- cgit v1.2.3