summaryrefslogtreecommitdiff
path: root/include/librfid/rfid_protocol_mifare_ul.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/librfid/rfid_protocol_mifare_ul.h')
-rw-r--r--include/librfid/rfid_protocol_mifare_ul.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/librfid/rfid_protocol_mifare_ul.h b/include/librfid/rfid_protocol_mifare_ul.h
new file mode 100644
index 0000000..cc93b6b
--- /dev/null
+++ b/include/librfid/rfid_protocol_mifare_ul.h
@@ -0,0 +1,24 @@
+#ifndef _RFID_PROTOCOL_MFUL_H
+#define _RFID_PROTOCOL_MFUL_H
+
+int rfid_mful_lock_page(struct rfid_protocol_handle *ph, unsigned int page);
+int rfid_mful_lock_otp(struct rfid_protocol_handle *ph);
+
+#define MIFARE_UL_PAGE_MAX 15
+
+#ifdef __LIBRFID__
+
+#define MIFARE_UL_CMD_WRITE 0xA2
+#define MIFARE_UL_CMD_READ 0x30
+
+#define MIFARE_UL_RESP_ACK 0x0a
+#define MIFARE_UL_RESP_NAK 0x00
+
+#define MIFARE_UL_PAGE_LOCK 2
+#define MIFARE_UL_PAGE_OTP 3
+
+extern struct rfid_protocol rfid_protocol_mful;
+
+#endif /* __LIBRFID__ */
+
+#endif
personal git repositories of Harald Welte. Your mileage may vary