Skip to content

Change _pin arguments to _dio #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions adafruit_esp32spi/adafruit_esp32spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class ESP_SPIcontrol: # pylint: disable=too-many-public-methods, too-many-insta

# pylint: disable=too-many-arguments
def __init__(
self, spi, cs_pin, ready_pin, reset_pin, gpio0_pin=None, *, debug=False
self, spi, cs_dio, ready_dio, reset_dio, gpio0_dio=None, *, debug=False
):
self._debug = debug
self.set_psk = False
Expand All @@ -144,11 +144,11 @@ def __init__(
self._sendbuf = bytearray(256) # buffer for command sending
self._socknum_ll = [[0]] # pre-made list of list of socket #

self._spi_device = SPIDevice(spi, cs_pin, baudrate=8000000)
self._cs = cs_pin
self._ready = ready_pin
self._reset = reset_pin
self._gpio0 = gpio0_pin
self._spi_device = SPIDevice(spi, cs_dio, baudrate=8000000)
self._cs = cs_dio
self._ready = ready_dio
self._reset = reset_dio
self._gpio0 = gpio0_dio
self._cs.direction = Direction.OUTPUT
self._ready.direction = Direction.INPUT
self._reset.direction = Direction.OUTPUT
Expand Down