diff options
author | goodsc.lee <goodsc.lee@samsung.com> | 2010-10-10 14:43:53 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2010-10-12 20:40:19 -0700 |
commit | 0fb8aa8edcde194a1ac5e6116a6ce7ee374122b6 (patch) | |
tree | 7938eb66b4f3acdc70921dfca329a141e37ba7dd /Linux_x86 | |
parent | 372231c2145fcb97c8900242c2a61247b0db309d (diff) | |
download | external_libnfc-nxp-0fb8aa8edcde194a1ac5e6116a6ce7ee374122b6.zip external_libnfc-nxp-0fb8aa8edcde194a1ac5e6116a6ce7ee374122b6.tar.gz external_libnfc-nxp-0fb8aa8edcde194a1ac5e6116a6ce7ee374122b6.tar.bz2 |
STANDBY mode and Polling loop
Change-Id: Ib6563a94b29c7eb9de6615881eadbdf0e94994c8
S5PC11X: NFC: Enable the STANDBY mode and add enableDiscovery and disableDiscovery for polling loop.
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 |