Merge pull request #106 from socram8888/master

Added selftest support for FM17522
This commit is contained in:
Miki Balboa
2015-06-13 23:17:07 -04:00
2 changed files with 14 additions and 0 deletions

View File

@@ -323,6 +323,9 @@ bool MFRC522::PCD_PerformSelfTest() {
// Pick the appropriate reference values // Pick the appropriate reference values
const byte *reference; const byte *reference;
switch (version) { switch (version) {
case 0x88: // Fudan Semiconductor FM17522 clone
reference = FM17522_firmware_reference;
break;
case 0x91: // Version 1.0 case 0x91: // Version 1.0
reference = MFRC522_firmware_referenceV1_0; reference = MFRC522_firmware_referenceV1_0;
break; break;

View File

@@ -102,6 +102,17 @@ const byte MFRC522_firmware_referenceV2_0[] PROGMEM = {
0x86, 0x96, 0x83, 0x38, 0xCF, 0x9D, 0x5B, 0x6D, 0x86, 0x96, 0x83, 0x38, 0xCF, 0x9D, 0x5B, 0x6D,
0xDC, 0x15, 0xBA, 0x3E, 0x7D, 0x95, 0x3B, 0x2F 0xDC, 0x15, 0xBA, 0x3E, 0x7D, 0x95, 0x3B, 0x2F
}; };
// Fudan Semiconductor FM17522
const byte FM17522_firmware_reference[] PROGMEM = {
0x00, 0xD6, 0x78, 0x8C, 0xE2, 0xAA, 0x0C, 0x18,
0x2A, 0xB8, 0x7A, 0x7F, 0xD3, 0x6A, 0xCF, 0x0B,
0xB1, 0x37, 0x63, 0x4B, 0x69, 0xAE, 0x91, 0xC7,
0xC3, 0x97, 0xAE, 0x77, 0xF4, 0x37, 0xD7, 0x9B,
0x7C, 0xF5, 0x3C, 0x11, 0x8F, 0x15, 0xC3, 0xD7,
0xC1, 0x5B, 0x00, 0x2A, 0xD0, 0x75, 0xDE, 0x9E,
0x51, 0x64, 0xAB, 0x3E, 0xE9, 0x15, 0xB5, 0xAB,
0x56, 0x9A, 0x98, 0x82, 0x26, 0xEA, 0x2A, 0x62
};
class MFRC522 { class MFRC522 {
public: public: