Skip to content

Commit 91b53dd

Browse files
Add SPI baudrate passthrough
1 parent f7279ea commit 91b53dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_dotstar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ class DotStar:
7676
time.sleep(2)
7777
"""
7878

79-
def __init__(self, clock, data, n, *, brightness=1.0, auto_write=True, pixel_order=BGR):
79+
def __init__(self, clock, data, n, *, brightness=1.0, auto_write=True, pixel_order=BGR, baudrate=4000000):
8080
self._spi = None
8181
try:
8282
self._spi = busio.SPI(clock, MOSI=data)
8383
while not self._spi.try_lock():
8484
pass
85-
self._spi.configure(baudrate=4000000)
85+
self._spi.configure(baudrate=baudrate)
8686

8787
except (NotImplementedError, ValueError):
8888
self.dpin = digitalio.DigitalInOut(data)

0 commit comments

Comments
 (0)