Merge branch 'bugfix/spi_master_multiple_dev_with_diff_cs_lvl_4.2' into 'release/v4.2'

spi_master: correctly set cs polarity (4.2)

See merge request espressif/esp-idf!10391
This commit is contained in:
Michael (XIAO Xufeng)
2020-10-17 09:27:24 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -291,7 +291,7 @@ static inline void spi_ll_master_set_pos_cs(spi_dev_t *hw, int cs, uint32_t pos_
if (pos_cs) {
hw->pin.master_cs_pol |= (1 << cs);
} else {
hw->pin.master_cs_pol &= (1 << cs);
hw->pin.master_cs_pol &= ~(1 << cs);
}
}
@@ -615,7 +615,7 @@ static inline void spi_ll_master_set_cksel(spi_dev_t *hw, int cs, uint32_t cksel
if (cksel) {
hw->pin.master_ck_sel |= (1 << cs);
} else {
hw->pin.master_ck_sel &= (1 << cs);
hw->pin.master_ck_sel &= ~(1 << cs);
}
}

View File

@@ -316,7 +316,7 @@ static inline void spi_ll_master_set_pos_cs(spi_dev_t *hw, int cs, uint32_t pos_
if (pos_cs) {
hw->misc.master_cs_pol |= (1 << cs);
} else {
hw->misc.master_cs_pol &= (1 << cs);
hw->misc.master_cs_pol &= ~(1 << cs);
}
}