Skip to content

Commit

Permalink
add return message to haltTag
Browse files Browse the repository at this point in the history
  • Loading branch information
ljos committed Feb 24, 2014
1 parent 49985f6 commit cd6b7a3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions MFRC522.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ MFRC522::MFRC522(int sad, int reset) {
pinMode(_sad, OUTPUT); // Set digital as OUTPUT to connect it to the RFID /ENABLE pin
digitalWrite(_sad, HIGH);


_reset = reset;
pinMode(_reset, OUTPUT); // Set digital pin, Not Reset and Power-Down
digitalWrite(_reset, LOW);

}

/**************************************************************************/
Expand Down Expand Up @@ -588,9 +586,12 @@ int MFRC522::writeToTag(byte block, byte *data) {
@brief Sends a halt command to the current tag.
@returns Returns the result of the halt.
MI_ERR If the command didn't complete properly.
MI_OK If the command completed.
*/
/**************************************************************************/
void MFRC522::haltTag() {
int MFRC522::haltTag() {
int status, len;
byte buffer[4];

Expand All @@ -599,4 +600,6 @@ void MFRC522::haltTag() {
calculateCRC(buffer, 2, &buffer[2]);
clearBitMask(Status2Reg, 0x08); // turn off encryption
status = commandTag(MFRC522_TRANSCEIVE, buffer, 4, buffer, &len);

return status;
}

0 comments on commit cd6b7a3

Please sign in to comment.