From bca1beb3f0f8c872e45f207495d54712c3429317 Mon Sep 17 00:00:00 2001 From: Wielebny666 <31576684+Wielebny666@users.noreply.github.com> Date: Tue, 23 Jun 2020 16:02:50 +0200 Subject: [PATCH] spi_master: correctly set cs polarity All devices must be added to the same spi line before use. --- components/driver/spi_master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/driver/spi_master.c b/components/driver/spi_master.c index 61376c9b38..755f01951b 100644 --- a/components/driver/spi_master.c +++ b/components/driver/spi_master.c @@ -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<hw->pin.master_ck_sel &= (1<hw->pin.master_ck_sel &= ~(1<flags&SPI_DEVICE_POSITIVE_CS) { spihost[host]->hw->pin.master_cs_pol |= (1<hw->pin.master_cs_pol &= (1<hw->pin.master_cs_pol &= ~(1<hw->ctrl2.mosi_delay_mode = 0; spihost[host]->hw->ctrl2.mosi_delay_num = 0;