spi: Fix half-duplex read transactions

Half-duplex read transactions should not use a write buffer. Previously,
only 3-wire half-duplex transactions followed this, but the esp-idf
error-checking logic applies to all half-duplex transactions.
This commit is contained in:
Eli Lipsitz 2024-09-25 21:55:17 -04:00 committed by Frederick Vollbrecht
parent a0bae3035a
commit edf7527e34

View File

@ -1751,10 +1751,10 @@ fn spi_read_transactions(
spi_create_transaction(
chunk.as_mut_ptr(),
core::ptr::null(),
if duplex == Duplex::Half3Wire {
0
} else {
if duplex == Duplex::Full {
chunk.len()
} else {
0
},
chunk.len(),
)