Skip to content

Commit

Permalink
Fix [#5]: Register errors are wrong
Browse files Browse the repository at this point in the history
0x1D properly masks out the error bits in that register not 0x1B. 0x1B
caused problems with parity bit error that was not valid in the use
case.
  • Loading branch information
konsgn authored and ljos committed Jan 14, 2015
1 parent 59d9053 commit d427494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MFRC522.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ int MFRC522::commandTag(byte cmd, byte *data, int dlen, byte *result, int *rlen)
clearBitMask(BitFramingReg, 0x80); // StartSend=0

if (i != 0) { // Request did not time out.
if(!(readFromRegister(ErrorReg) & 0x1B)) { // BufferOvfl Collerr CRCErr ProtocolErr
if(!(readFromRegister(ErrorReg) & 0x1D)) { // BufferOvfl Collerr CRCErr ProtocolErr
status = MI_OK;
if (n & irqEn & 0x01) {
status = MI_NOTAGERR;
Expand Down

0 comments on commit d427494

Please sign in to comment.