Skip to content

Commit

Permalink
fix: add spi build config
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jun 29, 2022
1 parent 0417fa6 commit 3c74323
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions jacdac/transports/spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import List
from time import sleep, monotonic
from jacdac.transport import Transport
from gpiod import Chip, Line, LineBulk, LINE_REQ_EV_RISING_EDGE, LINE_REQ_FLAG_ACTIVE_LOW, LINE_REQ_DIR_OUT # type: ignore
from gpiod import Chip, Line, LineBulk, LINE_REQ_EV_RISING_EDGE, LINE_REQ_DIR_OUT # type: ignore
from spidev import SpiDev # type: ignore
from weakref import finalize

Expand Down Expand Up @@ -55,7 +55,7 @@ def _open(self) -> None:
self._flip_reset()
self.logger.debug("open device")
self.spi = SpiDev()
self.spi.open(0, 0)
self.spi.open(0, 0)
self.spi.max_speed_hz = 15600000
self.spi.bits_per_word = 8
self.logger.debug("start read loop")
Expand Down Expand Up @@ -97,7 +97,7 @@ def close(self):
def _flip_reset(self) -> None:
self.logger.debug("reset bridge")
self.sendQueue = []
rst = self.chip.get_line(RPI_PIN_RST)
rst: Line = self.chip.get_line(RPI_PIN_RST)
try:
rst.request(consumer = CONSUMER, type = LINE_REQ_DIR_OUT)
rst.set_value(0)
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ install_requires =
[options.extras_require]
pi = spidev
serial = pyserial
spi = spidev
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
version=JD_VERSION,
packages=find_packages(
include=['jacdac', 'jacdac.*'], exclude=['*test.py'])

)

0 comments on commit 3c74323

Please sign in to comment.