mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-23 13:21:44 +03: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
@ -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 New Issue
Block a user