summaryrefslogtreecommitdiff
path: root/src/rfid.c
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2006-10-14 12:34:38 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2006-10-14 12:34:38 +0000
commite404cccecd20a2418c2429cd182c18218e54bd28 (patch)
tree5a15b5ca51874f0f8e96ccc4ee0457a66de3cec7 /src/rfid.c
parent6e87a007525b313dcf2da194977bb1abdf62026f (diff)
Prepare RFID compilation in firmware mode
- switch from linked lists to static arrays - remove all non-handle dynamic allocations (at the expense of stack) - declare all proto/reader/asic/layer2 structures as const - wrap all handle allocations in macros that expand to references to static structures in case of firmware mode - update copyright notices - add skeleton code for openpcd-inside-firmware driver - update TODO with remaining TODO for firmware mode git-svn-id: https://svn.gnumonks.org/trunk/librfid@1903 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'src/rfid.c')
-rw-r--r--src/rfid.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/rfid.c b/src/rfid.c
index ba166a2..ec0ce1f 100644
--- a/src/rfid.c
+++ b/src/rfid.c
@@ -18,13 +18,19 @@
#include <string.h>
#include <librfid/rfid_reader.h>
-#include <librfid/rfid_reader_cm5121.h>
-#include <librfid/rfid_reader_openpcd.h>
#include <librfid/rfid_protocol.h>
#include <librfid/rfid_protocol_tcl.h>
#include <librfid/rfid_protocol_mifare_ul.h>
#include <librfid/rfid_protocol_mifare_classic.h>
+#ifdef LIBRFID_FIRMWARE
+struct rfid_asic_handle rfid_ah;
+struct rfid_layer2_handle rfid_l2h;
+struct rfid_protocol_handle rfid_ph;
+struct rfid_asic_transport_handle rfid_ath;
+struct rfid_reader_handle rfid_rh;
+#endif
+
const char *
rfid_hexdump(const void *data, unsigned int len)
{
@@ -92,6 +98,7 @@ int rfid_getopt(struct rfid_handle *rh, unsigned int level,
int rfid_init()
{
+#if 0
rfid_reader_register(&rfid_reader_cm5121);
rfid_reader_register(&rfid_reader_openpcd);
rfid_layer2_register(&rfid_layer2_iso14443a);
@@ -99,6 +106,7 @@ int rfid_init()
rfid_protocol_register(&rfid_protocol_tcl);
rfid_protocol_register(&rfid_protocol_mful);
rfid_protocol_register(&rfid_protocol_mfcl);
+#endif
return 0;
}
personal git repositories of Harald Welte. Your mileage may vary