mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-09-27 12:21:02 +00:00
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:
parent
a0bae3035a
commit
edf7527e34
@ -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(),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user