Skip to content

Commit d57e422

Browse files
committed
Fix typo in ST7789 PIO driver
1 parent 17bc4ae commit d57e422

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

red_vision/displays/st7789_pio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def _setup_sm_and_dma(self, bytes_per_transfer):
109109
# The tx and clk pins just got their mode and alt set for PIO0 or PIO1.
110110
# We need to save them again to restore later when _write() is called,
111111
# if we haven't already
112-
if not hasattr(self, 'txMode'):
112+
if not hasattr(self, '_txMode'):
113113
self._txMode, self._txAlt = self._save_pin_mode_alt(self._tx)
114114
self._clkMode, self._clkAlt = self._save_pin_mode_alt(self._clk)
115115

@@ -118,7 +118,7 @@ def _setup_sm_and_dma(self, bytes_per_transfer):
118118
self._clk.init(mode=clkMode, alt=clkAlt)
119119

120120
# Instantiate a DMA controller if not already done
121-
if not hasattr(self, 'dma'):
121+
if not hasattr(self, '_dma'):
122122
self._dma = rp2.DMA()
123123

124124
# Configure up DMA to write to the PIO state machine

0 commit comments

Comments
 (0)