Skip to content

Commit

Permalink
Merge pull request #30 from Linkeor/Linkeor-patch-1
Browse files Browse the repository at this point in the history
Bitbangio writes incorrectly in registers
  • Loading branch information
dhalbert authored Feb 12, 2024
2 parents ce94f55 + 325f600 commit 2410e85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_bitbangio.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,13 @@ def write(
# Set clock to base
if not self._phase: # Mode 0, 2
self._mosi.value = bit_value
self._sclk.value = self._polarity
self._sclk.value = not self._polarity
start_time = self._wait(start_time)

# Flip clock off base
if self._phase: # Mode 1, 3
self._mosi.value = bit_value
self._sclk.value = not self._polarity
self._sclk.value = self._polarity
start_time = self._wait(start_time)

# Return pins to base positions
Expand Down

0 comments on commit 2410e85

Please sign in to comment.