← index #11082PR #7405
Related · high · value 1.174
QUERY · ISSUE

RP2 SPI: Instantiating with spi=None does not behave sensibly.

openby peterhinchopened 2023-03-20updated 2024-09-02
bugport-rp2

The constructor accepts None as an arg to miso, but still instantiates the default pin.

The clear intent is to create an output-only interface. Either it should reject the arg or (preferably) it should not instantiate a pin. Current behaviour can lead to unexpected pin conflicts.

This should also apply to mosi.

CANDIDATE · PULL REQUEST

esp32/machine_hw_spi: Allow None for unused pins in initializer.

closedby jonathanhoggopened 2021-06-16updated 2021-06-17
port-esp32

Make the hardware SPI initializer method match the init() method by
allowing None to be given for sck/mosi/miso to specify an unused
signal.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied