mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-12-08 20:39:01 +00:00
fix various bugs found by the 'prospector' static-analysis tool
This commit is contained in:
@@ -184,7 +184,7 @@ class SPISoftwareBus(SharedMixin, Device):
|
||||
for write_word in data:
|
||||
mask = 1 if self.lsb_first else 1 << (self.bits_per_word - 1)
|
||||
read_word = 0
|
||||
for bit in range(self.bits_per_word):
|
||||
for _ in range(self.bits_per_word):
|
||||
if self.mosi is not None:
|
||||
self.mosi.value = bool(write_word & mask)
|
||||
self.clock.on()
|
||||
|
||||
Reference in New Issue
Block a user