summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-07-30 10:21:55 +0000
committer(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-07-30 10:21:55 +0000
commitfebdf6da8ca7b48a1f04f6153dd3d11215d61479 (patch)
tree2890b7934449183ed4ae7cc2698333b0fe1f7958
parent5f19aeb0e4dd2fe1b50ffae6560c0cbc6166b402 (diff)
- export anticol() function
- use rc632_iso14443ab_transceive() instead of rc632_transceive() - some more debugging code git-svn-id: https://svn.openpcd.org:2342/trunk@64 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
-rw-r--r--openpcd/firmware/src/rfid_layer2_iso14443a.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/openpcd/firmware/src/rfid_layer2_iso14443a.c b/openpcd/firmware/src/rfid_layer2_iso14443a.c
index 7d99dc9..2dbc09b 100644
--- a/openpcd/firmware/src/rfid_layer2_iso14443a.c
+++ b/openpcd/firmware/src/rfid_layer2_iso14443a.c
@@ -38,6 +38,7 @@ iso14443a_transceive_sf(struct rfid_layer2_handle *handle,
struct iso14443a_atqa *atqa)
{
//struct rfid_reader *rdr = handle->rh->reader;
+ DEBUGPCRF("");
return rc632_iso14443a_transceive_sf(handle->rh, cmd, atqa);
}
@@ -49,6 +50,7 @@ iso14443a_transceive_acf(struct rfid_layer2_handle *handle,
unsigned int *bit_of_col)
{
//struct rfid_reader *rdr = handle->rh->reader;
+ DEBUGPCRF("");
return rc632_iso14443a_transceive_acf(handle->rh, acf, bit_of_col);
}
@@ -61,8 +63,9 @@ iso14443a_transceive(struct rfid_layer2_handle *handle,
unsigned char *rx_buf, unsigned int *rx_len,
u_int64_t timeout, unsigned int flags)
{
- return rc632_transceive(handle->rh, frametype, tx_buf,
- tx_len, rx_buf, rx_len, timeout, flags);
+ DEBUGPCRF("tx_len=%u, rx_len=%u", tx_len, *rx_len);
+ return rc632_iso14443ab_transceive(handle->rh, frametype, tx_buf,
+ tx_len, rx_buf, rx_len, timeout, flags);
}
static int
@@ -93,7 +96,7 @@ set_bit_in_field(unsigned char *bitfield, unsigned int bit)
DEBUGP("%p = 0x%02x\n", (bitfield+byte_count), *(bitfield+byte_count));
}
-static int
+int
iso14443a_anticol(struct rfid_layer2_handle *handle)
{
int ret;
@@ -145,13 +148,13 @@ cascade:
ret = iso14443a_transceive_acf(handle, &acf, &bit_of_col);
if (ret < 0)
return ret;
- DEBUGP("bit_of_col = %u\n", bit_of_col);
+ DEBUGP("bit_of_col = %d\n", bit_of_col);
while (bit_of_col != ISO14443A_BITOFCOL_NONE) {
set_bit_in_field(&acf.uid_bits[0], bit_of_col-16);
iso14443a_code_nvb_bits(&acf.nvb, bit_of_col);
ret = iso14443a_transceive_acf(handle, &acf, &bit_of_col);
- DEBUGP("bit_of_col = %u\n", bit_of_col);
+ DEBUGP("bit_of_col = %d\n", bit_of_col);
if (ret < 0)
return ret;
}
personal git repositories of Harald Welte. Your mileage may vary