diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2006-10-14 12:34:38 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2006-10-14 12:34:38 +0000 |
commit | e404cccecd20a2418c2429cd182c18218e54bd28 (patch) | |
tree | 5a15b5ca51874f0f8e96ccc4ee0457a66de3cec7 /src/rfid_asic_rc632.c | |
parent | 6e87a007525b313dcf2da194977bb1abdf62026f (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_asic_rc632.c')
-rw-r--r-- | src/rfid_asic_rc632.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rfid_asic_rc632.c b/src/rfid_asic_rc632.c index 05ed2cd..f8a8483 100644 --- a/src/rfid_asic_rc632.c +++ b/src/rfid_asic_rc632.c @@ -1,6 +1,6 @@ /* Generic Philips CL RC632 Routines * - * (C) Harald Welte <laforge@gnumonks.org> + * (C) 2005-2006 Harald Welte <laforge@gnumonks.org> * */ @@ -41,7 +41,7 @@ #define RC632_TMO_AUTH1 14000 #define ENTER() DEBUGP("entering\n") -struct rfid_asic rc632; +const struct rfid_asic rc632; /* Register and FIFO Access functions */ static int @@ -596,7 +596,7 @@ rc632_open(struct rfid_asic_transport_handle *th) { struct rfid_asic_handle *h; - h = malloc(sizeof(*h)); + h = malloc_asic_handle(sizeof(*h)); if (!h) return NULL; memset(h, 0, sizeof(*h)); @@ -609,7 +609,7 @@ rc632_open(struct rfid_asic_transport_handle *th) h->mtu = h->mru = 64; if (rc632_init(h) < 0) { - free(h); + free_asic_handle(h); return NULL; } @@ -620,14 +620,14 @@ void rc632_close(struct rfid_asic_handle *h) { rc632_fini(h); - free(h); + free_asic_handle(h); } /* * Philips CL RC632 primitives for ISO 14443-A compliant PICC's * - * (C) 2005 by Harald Welte <laforge@gnumonks.org> + * (C) 2005-2006 by Harald Welte <laforge@gnumonks.org> * */ @@ -1581,7 +1581,7 @@ rc632_mifare_transceive(struct rfid_asic_handle *handle, return 0; } -struct rfid_asic rc632 = { +const struct rfid_asic rc632 = { .name = "Philips CL RC632", .fc = ISO14443_FREQ_CARRIER, .priv.rc632 = { |