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_layer2_iso15693.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_layer2_iso15693.c')
-rw-r--r-- | src/rfid_layer2_iso15693.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rfid_layer2_iso15693.c b/src/rfid_layer2_iso15693.c index 8c5d808..8ab0b1e 100644 --- a/src/rfid_layer2_iso15693.c +++ b/src/rfid_layer2_iso15693.c @@ -1,6 +1,6 @@ /* ISO 15693 anticollision implementation * - * (C) 2005 by Harald Welte <laforge@gnumonks.org> + * (C) 2005-2006 by Harald Welte <laforge@gnumonks.org> * */ @@ -263,7 +263,7 @@ static struct rfid_layer2_handle * iso15693_init(struct rfid_reader_handle *rh) { int ret; - struct rfid_layer2_handle *h = malloc(sizeof(*h)); + struct rfid_layer2_handle *h = malloc_layer2_handle(sizeof(*h)); if (!h) return NULL; @@ -273,7 +273,7 @@ iso15693_init(struct rfid_reader_handle *rh) ret = h->rh->reader->iso15693.init(h->rh); if (ret < 0) { - free(h); + free_layer2_handle(h); return NULL; } @@ -283,12 +283,12 @@ iso15693_init(struct rfid_reader_handle *rh) static int iso15693_fini(struct rfid_layer2_handle *handle) { - free(handle); + free_layer2_handle(handle); return 0; } -struct rfid_layer2 rfid_layer2_iso15693 = { +const struct rfid_layer2 rfid_layer2_iso15693 = { .id = RFID_LAYER2_ISO15693, .name = "ISO 15693", .fn = { |