mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
SPI: Also check SPI_TRANS_USE_[T|R]XDATA when decifding to turn on MOSI/MISO. Fixes https://github.com/espressif/esp-idf/issues/488
This commit is contained in:
parent
881a90b8ab
commit
bf0c32364a
@ -551,8 +551,8 @@ static void IRAM_ATTR spi_intr(void *arg)
|
||||
} else {
|
||||
host->hw->addr=trans->address & 0xffffffff;
|
||||
}
|
||||
host->hw->user.usr_mosi=(trans->tx_buffer==NULL)?0:1;
|
||||
host->hw->user.usr_miso=(trans->rx_buffer==NULL)?0:1;
|
||||
host->hw->user.usr_mosi=(trans->tx_buffer!=NULL || (trans->flags & SPI_TRANS_USE_TXDATA))?1:0;
|
||||
host->hw->user.usr_miso=(trans->rx_buffer!=NULL || (trans->flags & SPI_TRANS_USE_RXDATA))?1:0;
|
||||
|
||||
//Call pre-transmission callback, if any
|
||||
if (dev->cfg.pre_cb) dev->cfg.pre_cb(trans);
|
||||
|
Loading…
x
Reference in New Issue
Block a user