nfc_target_receive_bits() function returns now received bits count on success and libnfc error code on failure.

This commit is contained in:
Audrey Diacre 2012-01-04 13:33:53 +00:00
parent 951dde8143
commit 0de1136037
7 changed files with 18 additions and 16 deletions

View file

@ -175,7 +175,7 @@ main (int argc, char *argv[])
while (!quitting) {
// Test if we received a frame from the reader
if (nfc_target_receive_bits (pndTag, abtReaderRx, &szReaderRxBits, abtReaderRxPar)) {
if (nfc_target_receive_bits (pndTag, abtReaderRx, &szReaderRxBits, abtReaderRxPar) > 0) {
// Drop down the field before sending a REQA command and start a new session
if (szReaderRxBits == 7 && abtReaderRx[0] == 0x26) {
// Drop down field for a very short time (original tag will reboot)