diff options
| -rwxr-xr-x | halimpl/hal/phNxpNciHal.cc | 6 | ||||
| -rwxr-xr-x | halimpl/hal/phNxpNciHal_ext.cc | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/halimpl/hal/phNxpNciHal.cc b/halimpl/hal/phNxpNciHal.cc index d798f0c..51375ef 100755 --- a/halimpl/hal/phNxpNciHal.cc +++ b/halimpl/hal/phNxpNciHal.cc @@ -2076,7 +2076,11 @@ int phNxpNciHal_close(bool bShutdown) { CONCURRENCY_LOCK(); - + int sem_val; + sem_getvalue(&(nxpncihal_ctrl.syncSpiNfc), &sem_val); + if(sem_val == 0 ) { + sem_post(&(nxpncihal_ctrl.syncSpiNfc)); + } if(!bShutdown){ status = phNxpNciHal_send_ext_cmd(sizeof(cmd_ven_disable_nci), cmd_ven_disable_nci); if(status != NFCSTATUS_SUCCESS) { diff --git a/halimpl/hal/phNxpNciHal_ext.cc b/halimpl/hal/phNxpNciHal_ext.cc index 646a07b..da74afa 100755 --- a/halimpl/hal/phNxpNciHal_ext.cc +++ b/halimpl/hal/phNxpNciHal_ext.cc @@ -915,6 +915,7 @@ static void hal_extns_write_rsp_timeout_cb(uint32_t timerId, void* pContext) { NXPLOG_NCIHAL_E("hal_extns_write_rsp_timeout_cb - write timeout!!!"); nxpncihal_ctrl.ext_cb_data.status = NFCSTATUS_FAILED; usleep(1); + sem_post(&(nxpncihal_ctrl.syncSpiNfc)); SEM_POST(&(nxpncihal_ctrl.ext_cb_data)); return; |
