Skip to content

Commit e31520e

Browse files
authored
Update Print UUID example
2 parents 01f5b25 + 40fa78c commit e31520e

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

examples/print_uuid/print_uuid.ino

+4-19
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,14 @@
77
/* Use the default I2C address */
88
Adafruit_MFRC630 rfid = Adafruit_MFRC630(PDOWN_PIN);
99

10-
/* Prints out len bytes of hex data in table format. */
11-
static void print_buf_hex(uint8_t *buf, size_t len)
12-
{
13-
for (uint8_t i = 0; i < len; i++)
14-
{
15-
Serial.print("0x");
16-
if (buf[i] < 16)
17-
{
18-
Serial.print("0");
19-
}
20-
Serial.print(buf[i], HEX);
21-
Serial.print(" ");
22-
}
23-
Serial.println(" ");
24-
}
2510
/*
26-
* This more concise loop show the minimim requirements to dump the first 1K
27-
* of memory from a Mifare Classic or Mifare Plus compatible card. No meaningful
11+
* This more concise loop show the minimim requirements to dump the UUID of
12+
* a Mifare Classic or Mifare Plus compatible card / tag. No meaningful
2813
* error-handling or debug output is present here, so this code is intended
2914
* as a simple starting point for further work.
3015
*/
3116
bool radio_mifare1K_dump_minimal(void)
3217
{
33-
bool rc;
34-
3518
/* Put the IC in a known-state. */
3619
rfid.softReset();
3720

@@ -56,7 +39,9 @@ bool radio_mifare1K_dump_minimal(void)
5639
Serial.print(" ");
5740
}
5841
Serial.println("");
42+
return true;
5943
}
44+
return false;
6045
}
6146

6247
/**

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit MFRC630 RFID
2-
version=1.1.2
2+
version=1.1.3
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
55
sentence=Arduino library for I2C and SPI access to the MFRC630 RFID/Near Field Communication chip

0 commit comments

Comments
 (0)