summaryrefslogtreecommitdiff
path: root/openpcd/firmware/include
diff options
context:
space:
mode:
author(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-07-25 08:32:47 +0000
committer(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-07-25 08:32:47 +0000
commitdd0638d20edf7893eac179c24e0e519bc4fc21cb (patch)
treec87e48e1c20a4c9d8483b589a66f80e9848c6be0 /openpcd/firmware/include
parentb8b8c2f6b9542d293b05a741b8011777608fa0dc (diff)
make rc632 API compatible with librfid. Import real librfid functions.
git-svn-id: https://svn.openpcd.org:2342/trunk@45 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpcd/firmware/include')
-rw-r--r--openpcd/firmware/include/rfid.h14
-rw-r--r--openpcd/firmware/include/rfid_protocol_mifare_classic.h28
2 files changed, 42 insertions, 0 deletions
diff --git a/openpcd/firmware/include/rfid.h b/openpcd/firmware/include/rfid.h
new file mode 100644
index 0000000..5684884
--- /dev/null
+++ b/openpcd/firmware/include/rfid.h
@@ -0,0 +1,14 @@
+#ifndef _RFID_H
+#define _RFID_H
+
+struct rfid_asic_handle {
+};
+
+struct rfid_asic {
+};
+
+#define RAH NULL
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+#endif
diff --git a/openpcd/firmware/include/rfid_protocol_mifare_classic.h b/openpcd/firmware/include/rfid_protocol_mifare_classic.h
new file mode 100644
index 0000000..e6b2400
--- /dev/null
+++ b/openpcd/firmware/include/rfid_protocol_mifare_classic.h
@@ -0,0 +1,28 @@
+#ifndef _MIFARE_CLASSIC_H
+
+#define MIFARE_CL_KEYA_DEFAULT "\xa0\xa1\xa2\xa3\xa4\xa5"
+#define MIFARE_CL_KEYB_DEFAULT "\xb0\xb1\xb2\xb3\xb4\xb5"
+
+#define MIFARE_CL_KEYA_DEFAULT_INFINEON "\xff\xff\xff\xff\xff\xff"
+#define MIFARE_CL_KEYB_DEFAULT_INFINEON MIFARE_CL_KEYA_DEFAULT_INFINEON
+
+#define MIFARE_CL_PAGE_MAX 0xff
+
+#define RFID_CMD_MIFARE_AUTH1A 0x60
+#define RFID_CMD_MIFARE_AUTH1B 0x61
+
+#ifdef __LIBRFID__
+
+extern struct rfid_protocol rfid_protocol_mfcl;
+
+
+#define MIFARE_CL_CMD_WRITE16 0xA0
+#define MIFARE_CL_CMD_READ 0x30
+
+#define MIFARE_CL_RESP_ACK 0x0a
+#define MIFARE_CL_RESP_NAK 0x00
+
+
+#endif /* __LIBRFID__ */
+
+#endif /* _MIFARE_CLASSIC_H */
personal git repositories of Harald Welte. Your mileage may vary