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/phDal4Nfc.c | |
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/phDal4Nfc.c')
-rw-r--r-- | Linux_x86/phDal4Nfc.c | 6 |
1 files changed, 6 insertions, 0 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); |