From e404cccecd20a2418c2429cd182c18218e54bd28 Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 14 Oct 2006 12:34:38 +0000 Subject: 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 --- src/rfid.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/rfid.c') 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 #include -#include -#include #include #include #include #include +#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; } -- cgit v1.2.3