File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,14 @@ def _wakeup(self):
78
78
79
79
def _wait_ready (self , timeout = 1 ):
80
80
"""Poll PN532 if status byte is ready, up to `timeout` seconds"""
81
- status = bytearray ([reverse_bit (_SPI_STATREAD ), 0 ])
82
-
81
+ status_cmd = bytearray ([reverse_bit (_SPI_STATREAD ), 0x00 ])
82
+ status_response = bytearray ([ 0x00 , 0x00 ])
83
83
timestamp = time .monotonic ()
84
84
with self ._spi as spi :
85
85
while (time .monotonic () - timestamp ) < timeout :
86
86
time .sleep (0.02 ) # required
87
- spi .write_readinto (status , status ) #pylint: disable=no-member
88
- if reverse_bit (status [1 ]) == 0x01 : # LSB data is read in MSB
87
+ spi .write_readinto (status_cmd , status_response ) #pylint: disable=no-member
88
+ if reverse_bit (status_response [1 ]) == 0x01 : # LSB data is read in MSB
89
89
return True # Not busy anymore!
90
90
else :
91
91
time .sleep (0.01 ) # pause a bit till we ask again
You can’t perform that action at this time.
0 commit comments