File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -81,14 +81,14 @@ def _wait_ready(self, timeout=1):
81
81
status = bytearray ([reverse_bit (_SPI_STATREAD ), 0 ])
82
82
83
83
timestamp = time .monotonic ()
84
- while ( time . monotonic () - timestamp ) < timeout :
85
- with self . _spi as spi :
84
+ with self . _spi as spi :
85
+ while ( time . monotonic () - timestamp ) < timeout :
86
86
time .sleep (0.02 ) # required
87
87
spi .write_readinto (status , status ) #pylint: disable=no-member
88
- if reverse_bit (status [1 ]) == 0x01 : # LSB data is read in MSB
89
- return True # Not busy anymore!
90
- else :
91
- time .sleep (0.01 ) # pause a bit till we ask again
88
+ if reverse_bit (status [1 ]) == 0x01 : # LSB data is read in MSB
89
+ return True # Not busy anymore!
90
+ else :
91
+ time .sleep (0.01 ) # pause a bit till we ask again
92
92
# We timed out!
93
93
return False
94
94
You can’t perform that action at this time.
0 commit comments