esp-idf-hal
esp-idf-hal copied to clipboard
Fix Half/Half3Wire read transactions bug
fn spi_read_transactions
inside spi_create_transaction
's transaction_length changed to 0
Sadly this breaks full duplex transfers. You need an if statement here.
Sadly this breaks full duplex transfers. You need an if statement here.
Need to determine whether it is half duplex or full duplex? Or other apis to do full duplex?
Sadly this breaks full duplex transfers. You need an if statement here.
Need to determine whether it is half duplex or full duplex? Or other apis to do full duplex?
You need a config setting for this.
Sadly this breaks full duplex transfers. You need an if statement here.
Need to determine whether it is half duplex or full duplex? Or other apis to do full duplex?
You need a config setting for this.
I don't know what to do...
@Dominaezzz @ivmarkov
Can explain how to change it ?
I changed it according to spi_write_transactions
, they look the same.
the spi_read_transcton function is used in different configurations of the drivers but itself doesn't now in witch state it is. Though simply changing to make it work for half3wire in this case breaks it for every case where it is not used that way. That's why it needed to be addressed on a case by case basis depending on what configuration the bus/device is.
the spi_read_transcton function is used in different configurations of the drivers but itself doesn't now in witch state it is. Though simply changing to make it work for half3wire in this case breaks it for every case where it is not used that way. That's why it needed to be addressed on a case by case basis depending on what configuration the bus/device is.
I still won't, how do..., please you fix
fn spi_read_transactions(
words: &mut [u8],
chunk_size: usize,
) -> impl Iterator<Item = spi_transaction_t> + '_ {
words.chunks_mut(chunk_size).map(|chunk| {
spi_create_transaction(
chunk.as_mut_ptr(),
core::ptr::null(),
chunk.len(),
chunk.len(),
)
})
}
You need to pass a boolean to spi_read_transactions
to switch between the old full duplex behavior and your new half duplex behavior.
You need to pass a boolean to
spi_read_transactions
to switch between the old full duplex behavior and your new half duplex behavior.
Dose spi_write_transactions
need to be changed? it looks similar to spi_read_transactions
I'm not sure, you'll have to check the esp-idf docs to verify. (I don't use std/esp-idf much these days)
Is that the reason(L 804)?
out of date