You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PN532_SPI._wait_ready polls the status until ready. However, the command to be sent is overwritten by the response received. Hence, if the device is not ready at the first request, we might send the wrong command for subsequent polling:
while (time.monotonic() - timestamp) < timeout:
time.sleep(0.02) # required
spi.write_readinto(status, status) #pylint: disable=no-member
if reverse_bit(status[1]) == 0x01: # LSB data is read in MSB
return True # Not busy anymore!
else:
time.sleep(0.01) # pause a bit till we ask again
the command in status is overwritten.
The text was updated successfully, but these errors were encountered:
basil-huber
added a commit
to basil-huber/Adafruit_CircuitPython_PN532
that referenced
this issue
Jan 5, 2020
PN532_SPI._wait_ready
polls the status until ready. However, the command to be sent is overwritten by the response received. Hence, if the device is not ready at the first request, we might send the wrong command for subsequent polling:the command in
status
is overwritten.The text was updated successfully, but these errors were encountered: