summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-10-22 18:31:59 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-10-22 18:31:59 +0000
commit073fc3dcce216782501b12113704b6256d15670c (patch)
treec29eba696301dfa2136d5f0cd85262e01353f33e
parent852829c4ab597ce137bac4bb9b612fd57b1dd282 (diff)
cleanup
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1554 e0336214-984f-0b4b-a45f-81c69e1f0ede
-rw-r--r--include/rfid/rfid_protocol.h4
-rw-r--r--include/rfid/rfid_protocol_mifare_ul.h5
-rw-r--r--openct-escape.c4
-rw-r--r--rfid_proto_mifare_ul.c4
4 files changed, 8 insertions, 9 deletions
diff --git a/include/rfid/rfid_protocol.h b/include/rfid/rfid_protocol.h
index 7d5dcff..c232818 100644
--- a/include/rfid/rfid_protocol.h
+++ b/include/rfid/rfid_protocol.h
@@ -3,11 +3,11 @@
#include <rfid/rfid_layer2.h>
+struct rfid_protocol_handle;
+
#include <rfid/rfid_protocol_tcl.h>
#include <rfid/rfid_protocol_mifare_ul.h>
-struct rfid_protocol_handle;
-
struct rfid_protocol {
struct rfid_protocol *next;
unsigned int id;
diff --git a/include/rfid/rfid_protocol_mifare_ul.h b/include/rfid/rfid_protocol_mifare_ul.h
index 74972ee..729c481 100644
--- a/include/rfid/rfid_protocol_mifare_ul.h
+++ b/include/rfid/rfid_protocol_mifare_ul.h
@@ -1,6 +1,7 @@
#ifndef _RFID_PROTOCOL_MFUL_H
#define _RFID_PROTOCOL_MFUL_H
+#include <rfid/rfid_protocol.h>
#define MIFARE_UL_CMD_WRITE 0xA2
#define MIFARE_UL_CMD_READ 0x30
@@ -15,7 +16,7 @@
struct rfid_protocol rfid_protocol_mful;
-extern int rfid_mful_lock_page(struct rfid_protocol_handle *ph, unsigned int page);
-extern int rfid_mful_lock_otp(struct rfid_protocol_handle *ph);
+int rfid_mful_lock_page(struct rfid_protocol_handle *ph, unsigned int page);
+int rfid_mful_lock_otp(struct rfid_protocol_handle *ph);
#endif
diff --git a/openct-escape.c b/openct-escape.c
index 7085fc7..41eb9c3 100644
--- a/openct-escape.c
+++ b/openct-escape.c
@@ -271,7 +271,7 @@ mifare_ulight_read(struct rfid_protocol_handle *ph)
if (ret < 0)
return ret;
- rfid_hexdump(buf, 4);
+ printf("Page 0x%x: %s\n", i, rfid_hexdump(buf, 4));
}
return 0;
}
@@ -309,9 +309,11 @@ int main(int argc, char **argv)
break;
case RFID_PROTOCOL_MIFARE_UL:
mifare_ulight_read(ph);
+#if 0
//mifare_ulight_blank(ph);
mifare_ulight_write(ph);
mifare_ulight_read(ph);
+#endif
break;
}
diff --git a/rfid_proto_mifare_ul.c b/rfid_proto_mifare_ul.c
index e420fcf..adac9cc 100644
--- a/rfid_proto_mifare_ul.c
+++ b/rfid_proto_mifare_ul.c
@@ -30,9 +30,6 @@
#include <rfid/rfid_layer2.h>
#include <rfid/rfid_protocol_mifare_ul.h>
-//#include <rfid/rfid_asic.h>
-//#include <rfid/rfid_reader.h>
-
#include "rfid_iso14443_common.h"
@@ -130,7 +127,6 @@ struct rfid_protocol rfid_protocol_mful = {
.name = "Mifare Ultralight",
.fn = {
.init = &mful_init,
- /* .transcieve = &mful_transcieve,*/
.read = &mful_read,
.write = &mful_write,
.fini = &mful_fini,
personal git repositories of Harald Welte. Your mileage may vary