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

Commit 8cf257f

Browse files
author
Alexander Frank
committed
fix unwanted SPI cs assert during startup
First set the chipselect to high then change the pin to output. By fixing the order the pin does not go low and then high for a short time.
1 parent 5abc5d2 commit 8cf257f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_GPIO/FT232H.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ def __init__(self, ft232h, cs=None, max_speed_hz=1000000, mode=0, bitorder=MSBFI
396396
self._ft232h = ft232h
397397
# Initialize chip select pin if provided to output high.
398398
if cs is not None:
399-
ft232h.setup(cs, GPIO.OUT)
400399
ft232h.set_high(cs)
400+
ft232h.setup(cs, GPIO.OUT)
401401
self._cs = cs
402402
# Initialize clock, mode, and bit order.
403403
self.set_clock_hz(max_speed_hz)

0 commit comments

Comments
 (0)