mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
spi_master: fix the dual/quad io issue
introduced in f871cc5ffa
The issue is caused by
1. The hal didn't pass the io_mode to LL.
2. The setup_device function overwrite the trans-specific settings.
This commit is contained in:

committed by
Michael (XIAO Xufeng)

parent
ca6cff7637
commit
0b523c2300
@@ -647,7 +647,9 @@ static void SPI_MASTER_ISR_ATTR spi_new_trans(spi_device_t *dev, spi_trans_priv_
|
||||
|
||||
trans = trans_buf->trans;
|
||||
host->cur_cs = dev_id;
|
||||
//We should be done with the transmission.
|
||||
|
||||
//Reconfigure according to device settings, the function only has effect when the dev_id is changed.
|
||||
spi_setup_device(host, dev_id);
|
||||
|
||||
hal->tx_bitlen = trans->length;
|
||||
hal->rx_bitlen = trans->rxlength;
|
||||
@@ -683,8 +685,6 @@ static void SPI_MASTER_ISR_ATTR spi_new_trans(spi_device_t *dev, spi_trans_priv_
|
||||
hal->dummy_bits = dev->cfg.dummy_bits;
|
||||
}
|
||||
|
||||
//Reconfigure according to device settings, the function only has effect when the dev_id is changed.
|
||||
spi_setup_device(host, dev_id);
|
||||
spi_hal_setup_trans(hal);
|
||||
spi_hal_prepare_data(hal);
|
||||
|
||||
|
Reference in New Issue
Block a user