From d63157a41d46f9835262dc38bd4bb9cb1affcb30 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Tue, 27 Jul 2010 09:29:54 +0000 Subject: [PATCH] Fix mask to extract "Error Code" from status byte. --- libnfc/chips/pn53x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index fafc605..4e53fd0 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -81,7 +81,7 @@ bool pn53x_transceive(nfc_device_t* pnd, const byte_t* pbtTx, const size_t szTxL if (!pnd->pdc->transceive(pnd->nds,pbtTx,szTxLen,pbtRx,pszRxLen)) return false; printf ("Leaving transceive (bsin = %lu, bsout = %lu)\n", szTxLen, *pszRxLen); - pnd->iErrorCode = pbtRx[0] & 0x2f; + pnd->iErrorCode = pbtRx[0] & 0x3f; // Make sure there was no failure reported by the PN53X chip (0x00 == OK) if (pnd->iErrorCode != 0) {