Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Commit 145b1d3

Browse files
authored
Merge pull request #52 from mrnuke/cs-high-fix
SPI: Make sure CS line is active-low
2 parents bde795a + d70b111 commit 145b1d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Adafruit_GPIO/SPI.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ def __init__(self, port, device, max_speed_hz=500000):
4141
self._device = spidev.SpiDev()
4242
self._device.open(port, device)
4343
self._device.max_speed_hz=max_speed_hz
44-
# Default to mode 0.
44+
# Default to mode 0, and make sure CS is active low.
4545
self._device.mode = 0
46+
self.cshigh = False
4647

4748
def set_clock_hz(self, hz):
4849
"""Set the speed of the SPI clock in hertz. Note that not all speeds

0 commit comments

Comments
 (0)