]>
Commit | Line | Data |
---|---|---|
b62a5a84 M |
1 | //-----------------------------------------------------------------------------\r |
2 | // Merlok - June 2012\r | |
3 | //\r | |
4 | // This code is licensed to you under the terms of the GNU GPL, version 2 or,\r | |
5 | // at your option, any later version. See the LICENSE.txt file for the text of\r | |
6 | // the license.\r | |
7 | //-----------------------------------------------------------------------------\r | |
8 | // Routines to support mifare classic sniffer.\r | |
9 | //-----------------------------------------------------------------------------\r | |
10 | \r | |
11 | #ifndef __MIFARESNIFF_H\r | |
12 | #define __MIFARESNIFF_H\r | |
13 | \r | |
33443e7c | 14 | #include <stdint.h>\r |
15 | #include <stdbool.h>\r | |
b62a5a84 | 16 | #include "util.h"\r |
b62a5a84 | 17 | \r |
39864b0b | 18 | #define SNF_INIT 0\r |
33443e7c | 19 | #define SNF_NO_FIELD 1\r |
20 | #define SNF_WUPREQ 2\r | |
39864b0b | 21 | #define SNF_ATQA 3\r |
33443e7c | 22 | #define SNF_ANTICOL1 4\r |
39864b0b | 23 | #define SNF_UID1 5\r |
33443e7c | 24 | #define SNF_ANTICOL2 6\r |
39864b0b M |
25 | #define SNF_UID2 7\r |
26 | #define SNF_SAK 8\r | |
33443e7c | 27 | #define SNF_CARD_IDLE 9\r |
28 | #define SNF_CARD_CMD 10\r | |
29 | #define SNF_CARD_RESP 11\r | |
f7887fa8 | 30 | #define SNF_MAGIC_WUPC2 12\r |
39864b0b M |
31 | \r |
32 | #define SNF_UID_4 0\r | |
33 | #define SNF_UID_7 0\r | |
34 | \r | |
7bc95e2e | 35 | bool MfSniffInit(void);\r |
6a1f2d82 | 36 | bool RAMFUNC MfSniffLogic(const uint8_t *data, uint16_t len, uint8_t *parity, uint16_t bitCnt, bool reader);\r |
7bc95e2e | 37 | bool RAMFUNC MfSniffSend(uint16_t maxTimeoutMs);\r |
38 | bool intMfSniffSend();\r | |
39 | bool MfSniffEnd(void);\r | |
b62a5a84 | 40 | \r |
33443e7c | 41 | #endif\r |