diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2008-05-24 13:23:03 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2008-05-24 13:23:03 +0000 |
commit | f835206e57b76cbc300d8510257f171e4f259ea0 (patch) | |
tree | 60027656001145de1c5e5b515c27d6831289f458 /src | |
parent | 77fc8096e2303a22fe02998370d565d48e2babdf (diff) |
add CRC check to ISO15693 (Bjoern Riemer)
git-svn-id: https://svn.gnumonks.org/trunk/librfid@2104 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'src')
-rw-r--r-- | src/rfid_asic_rc632.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rfid_asic_rc632.c b/src/rfid_asic_rc632.c index c93ba81..1c64558 100644 --- a/src/rfid_asic_rc632.c +++ b/src/rfid_asic_rc632.c @@ -521,7 +521,7 @@ rc632_transceive(struct rfid_asic_handle *handle, rc632_reg_read(handle, RC632_REG_CHANNEL_REDUNDANCY, &tmp); //return 0; - return -1; + return -EIO; } return rc632_fifo_read(handle, *rx_len, rx_buf); @@ -1769,7 +1769,7 @@ rc632_iso15693_transceive_ac(struct rfid_asic_handle *handle, ret = rc632_transceive(handle, (u_int8_t *)acf, acf_len, (u_int8_t *) resp, rx_len, iso15693_timing[rate][ISO15693_T1], 0); - if (ret == -ETIMEDOUT) + if (ret == -ETIMEDOUT || ret == -EIO) return ret; /* determine whether there was a collission */ @@ -1787,6 +1787,8 @@ rc632_iso15693_transceive_ac(struct rfid_asic_handle *handle, *bit_of_col = boc; } else { *bit_of_col = 0; + if (error_flag & RC632_ERR_FLAG_CRC_ERR) + return -EIO; } return 0; |