diff options
Diffstat (limited to 'Linux_x86')
-rw-r--r-- | Linux_x86/phDal4Nfc.c | 6 | ||||
-rw-r--r-- | Linux_x86/phOsalNfc.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/Linux_x86/phDal4Nfc.c b/Linux_x86/phDal4Nfc.c index 7683c39..d824d6e 100644 --- a/Linux_x86/phDal4Nfc.c +++ b/Linux_x86/phDal4Nfc.c @@ -864,6 +864,12 @@ int phDal4Nfc_WriterThread(void * pArg) gReadWriteContext.nNbOfBytesWritten = gLinkFunc.write(gReadWriteContext.pWriteBuffer, gReadWriteContext.nNbOfBytesToWrite); if (gReadWriteContext.nNbOfBytesWritten != gReadWriteContext.nNbOfBytesToWrite) { + /* controller may be in standby. do it again! */ + usleep(8000); + gReadWriteContext.nNbOfBytesWritten = gLinkFunc.write(gReadWriteContext.pWriteBuffer, gReadWriteContext.nNbOfBytesToWrite); + } + if (gReadWriteContext.nNbOfBytesWritten != gReadWriteContext.nNbOfBytesToWrite) + { /* Report write failure or timeout */ DAL_DEBUG("Write error in write thread\n", 0); result = PHNFCSTVAL(CID_NFC_DAL, NFCSTATUS_BOARD_COMMUNICATION_ERROR); diff --git a/Linux_x86/phOsalNfc.c b/Linux_x86/phOsalNfc.c index ce01d26..7d8e7da 100644 --- a/Linux_x86/phOsalNfc.c +++ b/Linux_x86/phOsalNfc.c @@ -81,7 +81,7 @@ void phOsalNfc_DbgString(const char *pString) #ifndef ANDROID printf(pString); #else - LOGD(pString); + LOGD("%s", pString); #endif #endif } @@ -111,14 +111,14 @@ void phOsalNfc_DbgTrace(uint8_t data[], uint32_t size) { if((i % 10) == 0) { - LOGD(phOsalNfc_DbgTraceBuffer); + LOGD("%s", phOsalNfc_DbgTraceBuffer); phOsalNfc_DbgTraceBuffer[0] = '\0'; } snprintf(buf, 10, "%02X ", data[i]); strncat(phOsalNfc_DbgTraceBuffer, buf, 10); } - LOGD(phOsalNfc_DbgTraceBuffer); + LOGD("%s", phOsalNfc_DbgTraceBuffer); LOGD("Block size is: %d", size); #endif #endif |