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

@ -172,7 +172,7 @@ main (int argc, char *argv[])
while (true) {
// Test if we received a frame
if (nfc_target_receive_bits (pnd, abtRecv, &szRecvBits, NULL)) {
if (nfc_target_receive_bits (pnd, abtRecv, &szRecvBits, NULL) > 0) {
// Prepare the command to send back for the anti-collision request
switch (szRecvBits) {
case 7: // Request or Wakeup