Skip to content

esp8266: Support SPI bus with only MOSI or MISO line #65

@tdicola

Description

@tdicola

Right now the nativeio.SPI class seems to require both MOSI and MISO to be specified, for example on esp8266:

>>> import nativeio
>>> import board
>>> spi = nativeio.SPI(clock=board.SCK, MOSI=board.MOSI)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: Pins not valid for SPI
>>> 

Compared to specifying both MOSI and MISO which does work fine:

>>> spi = nativeio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
>>>

Talking earlier we do think supporting just a MOSI or MISO makes sense and this might be a small bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions