Skip to content
Commit d33b89be authored by Andreas Sandberg's avatar Andreas Sandberg Committed by Carles Cufí
Browse files

drivers: spi: spi-bitbang: Add support for half duplex



Implement support for half duplex communication in the bit bang SPI
driver. The SPI driver will use the MOSI pin is for both TX and RX
operations when using half duplex mode.

In half-duplex mode, the driver configures the MOSI pin as an input
pin for input only transactions. Transactions that are bidirectional
are forbidden. After an SPI transaction, the MOSI pin is left as an
input if it was an RX transaction or an output after a TX
transaction. Like before, the MOSI pin is initialized as an
(inactive) output pin when the bus is initialized.

Signed-off-by: default avatarAndreas Sandberg <andreas@sandberg.uk>
parent 8bfc215b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment