mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
Now fifo size in ST25 chip is calculated properly (#3829)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
235cb649a6
commit
3672efa7da
1 changed files with 6 additions and 3 deletions
|
@ -57,9 +57,12 @@ bool st25r3916_read_fifo(
|
|||
do {
|
||||
uint8_t fifo_status[2] = {};
|
||||
st25r3916_read_burst_regs(handle, ST25R3916_REG_FIFO_STATUS1, fifo_status, 2);
|
||||
size_t bytes = ((fifo_status[1] & ST25R3916_REG_FIFO_STATUS2_fifo_b_mask) >>
|
||||
ST25R3916_REG_FIFO_STATUS2_fifo_b_shift) |
|
||||
fifo_status[0];
|
||||
|
||||
uint16_t fifo_status_b9_b8 =
|
||||
((fifo_status[1] & ST25R3916_REG_FIFO_STATUS2_fifo_b_mask) >>
|
||||
ST25R3916_REG_FIFO_STATUS2_fifo_b_shift);
|
||||
size_t bytes = (fifo_status_b9_b8 << 8) | fifo_status[0];
|
||||
|
||||
uint8_t bits =
|
||||
((fifo_status[1] & ST25R3916_REG_FIFO_STATUS2_fifo_lb_mask) >>
|
||||
ST25R3916_REG_FIFO_STATUS2_fifo_lb_shift);
|
||||
|
|
Loading…
Reference in a new issue