#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;
#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
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
if (ret < 0)
return ret;
- rfid_hexdump(buf, 4);
+ printf("Page 0x%x: %s\n", i, rfid_hexdump(buf, 4));
}
return 0;
}
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;
}
#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"
.name = "Mifare Ultralight",
.fn = {
.init = &mful_init,
- /* .transcieve = &mful_transcieve,*/
.read = &mful_read,
.write = &mful_write,
.fini = &mful_fini,