|
| 1 | +/// Both NFC (ISO/IEC 18092) and RFID (ISO/IEC 14443) codes/types collected here |
| 2 | +#[derive(Debug, Clone, Copy, PartialEq)] |
| 3 | +pub enum PiccCodes { |
| 4 | + /// REQuest command, Type A, moves PICC from IDLE to READY state |
| 5 | + REQA = 0x26, |
| 6 | + /// Wake-UP command, Type A, moves PICC from IDLE or HALT to READY |
| 7 | + WUPA = 0x52, |
| 8 | + /// REQuest command, Type B, (Requested/slot-maker) ready |
| 9 | + REQB = 0x05, |
| 10 | + /// Wake-UP command, Type B |
| 11 | + WUPB = 0x08, |
| 12 | + /// With matching PUPI moves PICC to ACTIVE |
| 13 | + ATTRIB = 0x1D, |
| 14 | + /// Cascade Tag, UID not complete, used during anti-collision |
| 15 | + CT = 0x88, |
| 16 | + /// Anti collision/Select, Cascade Level 1 |
| 17 | + SelCl1 = 0x93, |
| 18 | + /// Anti collision/Select, Cascade Level 2 |
| 19 | + SelCl2 = 0x95, |
| 20 | + /// Anti collision/Select, Cascade Level 3 |
| 21 | + SelCl3 = 0x97, |
| 22 | + /// HaLT command, Type A == Type B, move PICC state to HALT |
| 23 | + HLT = 0x50, |
| 24 | + /// Request command for Answer To Select |
| 25 | + RATS = 0xE0, |
| 26 | + /// Select, Type B |
| 27 | + SEL = 0x0E, |
| 28 | + /// Perform authentication with Key A |
| 29 | + MfAuthKeyA = 0x60, |
| 30 | + /// Perform authentication with Key B |
| 31 | + MfAuthKeyB = 0x61, |
| 32 | + /// Reads one 16 byte block from the authenticated sector of the PICC.\ |
| 33 | + /// Also used for MIFARE Ultralight. |
| 34 | + MfRead = 0x30, |
| 35 | + /// Writes one 16 byte block to the authenticated sector of the PICC.\ |
| 36 | + /// Called "COMPATIBILITY WRITE" for MIFARE Ultralight. |
| 37 | + MfWrite = 0xA0, |
| 38 | + /// Decrements the contents of a block and stores the result in the internal data register. |
| 39 | + MfDecrement = 0xC0, |
| 40 | + /// Increments the contents of a block and stores the result in the internal data register. |
| 41 | + MfIncrement = 0xC1, |
| 42 | + /// Reads the contents of a block into the internal data register. |
| 43 | + MfRestore = 0xC2, |
| 44 | + /// Writes the contents of the internal data register to a block. |
| 45 | + MfTransfer = 0xB0, |
| 46 | + /// Writes one 4 byte page to the PICC. |
| 47 | + UlWrite = 0xA2, |
| 48 | + /// TODO |
| 49 | + RFU = 0xF8, |
| 50 | +} |
0 commit comments