2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2
4 * as published by the Free Software Foundation
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #include <librfid/rfid_reader_cm5121.h>
19 #include <librfid/rfid_protocol.h>
20 #include <librfid/rfid_protocol_tcl.h>
21 #include <librfid/rfid_protocol_mifare_ul.h>
22 #include <librfid/rfid_protocol_mifare_classic.h>
25 rfid_hexdump(const void *data, unsigned int len)
27 static char string[1024];
28 unsigned char *d = (unsigned char *) data;
32 left = sizeof(string);
33 for (i = 0; len--; i += 3) {
34 if (i >= sizeof(string) -4)
36 snprintf(string+i, 4, " %02x", *d++);
41 int rfid_init(unsigned int id)
44 case RFID_READER_CM5121:
45 rfid_reader_register(&rfid_reader_cm5121);
47 case RFID_READER_X501:
48 rfid_reader_register(&rfid_reader_x501);
51 case RFID_READER_PEGODA:
52 rfid_reader_register(&rfid_reader_pegoda);
58 rfid_layer2_register(&rfid_layer2_iso14443a);
59 rfid_layer2_register(&rfid_layer2_iso14443b);
60 rfid_protocol_register(&rfid_protocol_tcl);
61 rfid_protocol_register(&rfid_protocol_mful);
62 rfid_protocol_register(&rfid_protocol_mfcl);
69 /* FIXME: implementation */