typechange: byte -> PICC_Type
This commit is contained in:
10
MFRC522.cpp
10
MFRC522.cpp
@@ -1214,7 +1214,7 @@ MFRC522::PICC_Type MFRC522::PICC_GetType(byte sak ///< The SAK byte returned fr
|
||||
*
|
||||
* @return const __FlashStringHelper *
|
||||
*/
|
||||
const __FlashStringHelper *MFRC522::PICC_GetTypeName(byte piccType ///< One of the PICC_Type enums.
|
||||
const __FlashStringHelper *MFRC522::PICC_GetTypeName(PICC_Type piccType ///< One of the PICC_Type enums.
|
||||
) {
|
||||
switch (piccType) {
|
||||
case PICC_TYPE_ISO_14443_4: return F("PICC compliant with ISO/IEC 14443-4");
|
||||
@@ -1252,7 +1252,7 @@ void MFRC522::PICC_DumpToSerial(Uid *uid ///< Pointer to Uid struct returned fro
|
||||
Serial.println();
|
||||
|
||||
// PICC type
|
||||
byte piccType = PICC_GetType(uid->sak);
|
||||
PICC_Type piccType = PICC_GetType(uid->sak);
|
||||
Serial.print(F("PICC type: "));
|
||||
Serial.println(PICC_GetTypeName(piccType));
|
||||
|
||||
@@ -1293,9 +1293,9 @@ void MFRC522::PICC_DumpToSerial(Uid *uid ///< Pointer to Uid struct returned fro
|
||||
* Dumps memory contents of a MIFARE Classic PICC.
|
||||
* On success the PICC is halted after dumping the data.
|
||||
*/
|
||||
void MFRC522::PICC_DumpMifareClassicToSerial( Uid *uid, ///< Pointer to Uid struct returned from a successful PICC_Select().
|
||||
byte piccType, ///< One of the PICC_Type enums.
|
||||
MIFARE_Key *key ///< Key A used for all sectors.
|
||||
void MFRC522::PICC_DumpMifareClassicToSerial( Uid *uid, ///< Pointer to Uid struct returned from a successful PICC_Select().
|
||||
PICC_Type piccType, ///< One of the PICC_Type enums.
|
||||
MIFARE_Key *key ///< Key A used for all sectors.
|
||||
) {
|
||||
byte no_of_sectors = 0;
|
||||
switch (piccType) {
|
||||
|
||||
@@ -380,12 +380,12 @@ public:
|
||||
// old function used too much memory, now name moved to flash; if you need char, copy from flash to memory
|
||||
//const char *GetStatusCodeName(byte code);
|
||||
const __FlashStringHelper *GetStatusCodeName(MFRC522::StatusCode code);
|
||||
MFRC522::PICC_Type PICC_GetType(byte sak);
|
||||
PICC_Type PICC_GetType(byte sak);
|
||||
// old function used too much memory, now name moved to flash; if you need char, copy from flash to memory
|
||||
//const char *PICC_GetTypeName(byte type);
|
||||
const __FlashStringHelper *PICC_GetTypeName(byte type);
|
||||
const __FlashStringHelper *PICC_GetTypeName(PICC_Type type);
|
||||
void PICC_DumpToSerial(Uid *uid);
|
||||
void PICC_DumpMifareClassicToSerial(Uid *uid, byte piccType, MIFARE_Key *key);
|
||||
void PICC_DumpMifareClassicToSerial(Uid *uid, PICC_Type piccType, MIFARE_Key *key);
|
||||
void PICC_DumpMifareClassicSectorToSerial(Uid *uid, MIFARE_Key *key, byte sector);
|
||||
void PICC_DumpMifareUltralightToSerial();
|
||||
void MIFARE_SetAccessBits(byte *accessBitBuffer, byte g0, byte g1, byte g2, byte g3);
|
||||
|
||||
@@ -91,7 +91,7 @@ void loop() {
|
||||
Serial.println();
|
||||
|
||||
// Dump PICC type
|
||||
// byte piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
// MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
// Serial.print(F("PICC type: "));
|
||||
// Serial.print(mfrc522.PICC_GetTypeName(piccType));
|
||||
// Serial.print(F(" (SAK "));
|
||||
|
||||
@@ -78,7 +78,7 @@ void loop() {
|
||||
dump_byte_array(mfrc522.uid.uidByte, mfrc522.uid.size);
|
||||
Serial.println();
|
||||
Serial.print(F("PICC type: "));
|
||||
byte piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
Serial.println(mfrc522.PICC_GetTypeName(piccType));
|
||||
|
||||
// Check for compatibility
|
||||
|
||||
@@ -77,7 +77,7 @@ void loop() {
|
||||
dump_byte_array(mfrc522.uid.uidByte, mfrc522.uid.size);
|
||||
Serial.println();
|
||||
Serial.print(F("PICC type: "));
|
||||
byte piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
Serial.println(mfrc522.PICC_GetTypeName(piccType));
|
||||
|
||||
// Check for compatibility
|
||||
|
||||
@@ -72,7 +72,7 @@ void loop() {
|
||||
dump_byte_array(mfrc522[reader].uid.uidByte, mfrc522[reader].uid.size);
|
||||
Serial.println();
|
||||
Serial.print(F("PICC type: "));
|
||||
byte piccType = mfrc522[reader].PICC_GetType(mfrc522[reader].uid.sak);
|
||||
MFRC522::PICC_Type piccType = mfrc522[reader].PICC_GetType(mfrc522[reader].uid.sak);
|
||||
Serial.println(mfrc522[reader].PICC_GetTypeName(piccType));
|
||||
|
||||
// Halt PICC
|
||||
|
||||
@@ -132,7 +132,7 @@ void loop() {
|
||||
dump_byte_array(mfrc522.uid.uidByte, mfrc522.uid.size);
|
||||
Serial.println();
|
||||
Serial.print(F("PICC type: "));
|
||||
byte piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
Serial.println(mfrc522.PICC_GetTypeName(piccType));
|
||||
|
||||
// Try the known default keys
|
||||
|
||||
@@ -53,7 +53,7 @@ void loop() {
|
||||
Serial.print(mfrc522.uid.uidByte[i], HEX);
|
||||
}
|
||||
Serial.print(F(" PICC type: ")); // Dump PICC type
|
||||
byte piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
MFRC522::PICC_Type piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
|
||||
Serial.println(mfrc522.PICC_GetTypeName(piccType));
|
||||
|
||||
byte buffer[34];
|
||||
|
||||
Reference in New Issue
Block a user