summaryrefslogtreecommitdiffstats
path: root/Linux_x86/phDal4Nfc.c
diff options
context:
space:
mode:
authorDaniel Tomas <dtomas.nxp@gmail.com>2011-04-21 14:11:28 -0700
committerNick Pelly <npelly@google.com>2011-05-19 11:49:00 -0700
commitc1f33130d9d2100e6232f8f3c782949c75205be6 (patch)
treedf4ca2b3312e0f14b3e90eb0c06c3c4dd9a216c6 /Linux_x86/phDal4Nfc.c
parent651794422f331be5865ed8afcab6a56e3abe7521 (diff)
downloadexternal_libnfc-nxp-c1f33130d9d2100e6232f8f3c782949c75205be6.zip
external_libnfc-nxp-c1f33130d9d2100e6232f8f3c782949c75205be6.tar.gz
external_libnfc-nxp-c1f33130d9d2100e6232f8f3c782949c75205be6.tar.bz2
Patch to enable low level traces.
This patch permit to display the NFC frames exchanged through the I2C line. To enable that, you just need to enable LOW_LEVEL_TRACES macro. Change-Id: Ica2ff2e6d111b76c056161ec557346f23d21ada0
Diffstat (limited to 'Linux_x86/phDal4Nfc.c')
-rw-r--r--Linux_x86/phDal4Nfc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Linux_x86/phDal4Nfc.c b/Linux_x86/phDal4Nfc.c
index a39f062..bda22c5 100644
--- a/Linux_x86/phDal4Nfc.c
+++ b/Linux_x86/phDal4Nfc.c
@@ -707,6 +707,7 @@ retry:
else
{
i2c_error_count = 0;
+ phOsalNfc_PrintData("Received buffer", (uint16_t)gReadWriteContext.nNbOfBytesRead, gReadWriteContext.pReadBuffer);
DAL_DEBUG("Read ok. nbToRead=%d\n", gReadWriteContext.nNbOfBytesToRead);
DAL_DEBUG("NbReallyRead=%d\n", gReadWriteContext.nNbOfBytesRead);
DAL_PRINT("ReadBuff[]={ ");
@@ -847,6 +848,11 @@ void phDal4Nfc_DeferredCb (void *params)
break;
case PHDAL4NFC_WRITE_MESSAGE:
DAL_PRINT(" Dal deferred write called \n");
+
+#ifdef LOW_LEVEL_TRACES
+ phOsalNfc_PrintData("Send buffer", (uint16_t)gReadWriteContext.nNbOfBytesToWrite, gReadWriteContext.pWriteBuffer);
+#endif
+
/* DAL_DEBUG("dalMsg->transactInfo.length : %d\n", dalMsg->transactInfo.length); */
/* Make a Physical WRITE */
usleep(3000); /* Wait 3ms before issuing a Write */