Merge branch 'bugfix/spi_master_multiple_dev_with_diff_cs_lvl_3.3' into 'release/v3.3'

spi_master: correctly set cs polarity (3.3)

See merge request espressif/esp-idf!10406
This commit is contained in:
Michael (XIAO Xufeng) 2020-09-21 10:21:22 +08:00
commit f2f13eb8e8

View file

@ -494,12 +494,12 @@ Specify ``SPI_DEVICE_NO_DUMMY`` to ignore this checking. Then you can output dat
if (dev_config->flags&SPI_DEVICE_CLK_AS_CS) {
spihost[host]->hw->pin.master_ck_sel |= (1<<freecs);
} else {
spihost[host]->hw->pin.master_ck_sel &= (1<<freecs);
spihost[host]->hw->pin.master_ck_sel &= ~(1<<freecs);
}
if (dev_config->flags&SPI_DEVICE_POSITIVE_CS) {
spihost[host]->hw->pin.master_cs_pol |= (1<<freecs);
} else {
spihost[host]->hw->pin.master_cs_pol &= (1<<freecs);
spihost[host]->hw->pin.master_cs_pol &= ~(1<<freecs);
}
spihost[host]->hw->ctrl2.mosi_delay_mode = 0;
spihost[host]->hw->ctrl2.mosi_delay_num = 0;