mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
spi_slave: Fix MOSI/MISO enable on transaction preparation
MOSI and MISO enablement were conditioned to the existence of TX and RX buffers, respectively. This is valid for the SPI Master, but for the SPI Slave the opposite is expected.
This commit is contained in:
parent
7fbedd426d
commit
8639e3511b
@ -71,8 +71,8 @@ void spi_slave_hal_prepare_data(const spi_slave_hal_context_t *hal)
|
||||
spi_ll_slave_set_rx_bitlen(hal->hw, hal->bitlen);
|
||||
spi_ll_slave_set_tx_bitlen(hal->hw, hal->bitlen);
|
||||
|
||||
spi_ll_enable_mosi(hal->hw, (hal->tx_buffer == NULL) ? 0 : 1);
|
||||
spi_ll_enable_miso(hal->hw, (hal->rx_buffer == NULL) ? 0 : 1);
|
||||
spi_ll_enable_mosi(hal->hw, (hal->rx_buffer == NULL) ? 0 : 1);
|
||||
spi_ll_enable_miso(hal->hw, (hal->tx_buffer == NULL) ? 0 : 1);
|
||||
}
|
||||
|
||||
void spi_slave_hal_store_result(spi_slave_hal_context_t *hal)
|
||||
|
Loading…
x
Reference in New Issue
Block a user