projects
/
librfid
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove autogenerated file
[librfid]
/
src
/
rfid_asic_rc632.c
diff --git
a/src/rfid_asic_rc632.c
b/src/rfid_asic_rc632.c
index
65a37b8
..
28bd5a1
100644
(file)
--- a/
src/rfid_asic_rc632.c
+++ b/
src/rfid_asic_rc632.c
@@
-288,7
+288,9
@@
static int rc632_wait_idle_timer(struct rfid_asic_handle *handle)
DEBUGP_STATUS_FLAG(stat);
if (stat & RC632_STAT_ERR) {
u_int8_t err;
DEBUGP_STATUS_FLAG(stat);
if (stat & RC632_STAT_ERR) {
u_int8_t err;
- rc632_reg_read(handle, RC632_REG_ERROR_FLAG, &err);
+ ret = rc632_reg_read(handle, RC632_REG_ERROR_FLAG, &err);
+ if (ret < 0)
+ return ret;
DEBUGP_ERROR_FLAG(err);
if (err & (RC632_ERR_FLAG_COL_ERR |
RC632_ERR_FLAG_PARITY_ERR |
DEBUGP_ERROR_FLAG(err);
if (err & (RC632_ERR_FLAG_COL_ERR |
RC632_ERR_FLAG_PARITY_ERR |
@@
-355,7
+357,9
@@
rc632_wait_idle(struct rfid_asic_handle *handle, u_int64_t timeout)
ret = rc632_reg_read(handle, RC632_REG_INTERRUPT_RQ, &foo);
DEBUGP_INTERRUPT_FLAG("irq_rq",foo);
/* clear all interrupts */
ret = rc632_reg_read(handle, RC632_REG_INTERRUPT_RQ, &foo);
DEBUGP_INTERRUPT_FLAG("irq_rq",foo);
/* clear all interrupts */
- rc632_clear_irqs(handle, 0xff);
+ ret = rc632_clear_irqs(handle, 0xff);
+ if (ret < 0)
+ return ret;
}
}
if (cmd == 0) {
}
}
if (cmd == 0) {
@@
-454,10
+458,6
@@
rc632_transceive(struct rfid_asic_handle *handle,
{ u_int8_t tmp;
rc632_reg_read(handle, RC632_REG_PRIMARY_STATUS, &tmp);
DEBUGP_STATUS_FLAG(tmp);
{ u_int8_t tmp;
rc632_reg_read(handle, RC632_REG_PRIMARY_STATUS, &tmp);
DEBUGP_STATUS_FLAG(tmp);
- rc632_reg_read(handle, RC632_REG_PRIMARY_STATUS, &tmp);
- DEBUGP_STATUS_FLAG(tmp);
- rc632_reg_read(handle, RC632_REG_PRIMARY_STATUS, &tmp);
- DEBUGP_STATUS_FLAG(tmp);
rc632_reg_read(handle, RC632_REG_ERROR_FLAG, &tmp);
DEBUGP_ERROR_FLAG(tmp);
}
rc632_reg_read(handle, RC632_REG_ERROR_FLAG, &tmp);
DEBUGP_ERROR_FLAG(tmp);
}
@@
-525,7
+525,7
@@
rc632_transceive(struct rfid_asic_handle *handle,
rc632_reg_read(handle, RC632_REG_CHANNEL_REDUNDANCY, &tmp);
//return 0;
rc632_reg_read(handle, RC632_REG_CHANNEL_REDUNDANCY, &tmp);
//return 0;
- return -
1
;
+ return -
EIO
;
}
return rc632_fifo_read(handle, *rx_len, rx_buf);
}
return rc632_fifo_read(handle, *rx_len, rx_buf);
@@
-1773,7
+1773,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);
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 */
return ret;
/* determine whether there was a collission */
@@
-1791,6
+1791,8
@@
rc632_iso15693_transceive_ac(struct rfid_asic_handle *handle,
*bit_of_col = boc;
} else {
*bit_of_col = 0;
*bit_of_col = boc;
} else {
*bit_of_col = 0;
+ if (error_flag & RC632_ERR_FLAG_CRC_ERR)
+ return -EIO;
}
return 0;
}
return 0;