Skip to content

Commit 88250a1

Browse files
authored
Merge pull request #99 from RetiredWizard/spicsinit
Set inital SPI CS value according to parameters
2 parents c4f1054 + 519bf36 commit 88250a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: adafruit_bus_device/spi_device.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __init__(
8989
self.chip_select = chip_select
9090
self.cs_active_value = cs_active_value
9191
if self.chip_select:
92-
self.chip_select.switch_to_output(value=True)
92+
self.chip_select.switch_to_output(value=not self.cs_active_value)
9393

9494
def __enter__(self) -> SPI:
9595
while not self.spi.try_lock():

0 commit comments

Comments
 (0)