catch NotImplementedError when using bitbanged pins
On the Pi / CPython, I'm getting NotImplementedError here rather than ValueError. This pull makes the assumption that ValueError is still necessary on CircuitPython.
This commit is contained in:
parent
cd5053419c
commit
2f5d69172a
1 changed files with 2 additions and 1 deletions
|
|
@ -83,7 +83,8 @@ class DotStar:
|
|||
while not self._spi.try_lock():
|
||||
pass
|
||||
self._spi.configure(baudrate=4000000)
|
||||
except ValueError:
|
||||
|
||||
except (NotImplementedError, ValueError) as e:
|
||||
self.dpin = digitalio.DigitalInOut(data)
|
||||
self.cpin = digitalio.DigitalInOut(clock)
|
||||
self.dpin.direction = digitalio.Direction.OUTPUT
|
||||
|
|
|
|||
Loading…
Reference in a new issue