mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
Merge branch 'bugfix/spi_master_multiple_dev_with_diff_cs_lvl_4.1' into 'release/v4.1'
spi_master: correctly set cs polarity (4.1) See merge request espressif/esp-idf!10392
This commit is contained in:
@@ -287,7 +287,7 @@ static inline void spi_ll_master_set_pos_cs(spi_dev_t *hw, int cs, uint32_t pos_
|
|||||||
if (pos_cs) {
|
if (pos_cs) {
|
||||||
hw->pin.master_cs_pol |= (1 << cs);
|
hw->pin.master_cs_pol |= (1 << cs);
|
||||||
} else {
|
} else {
|
||||||
hw->pin.master_cs_pol &= (1 << cs);
|
hw->pin.master_cs_pol &= ~(1 << cs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,7 +611,7 @@ static inline void spi_ll_master_set_cksel(spi_dev_t *hw, int cs, uint32_t cksel
|
|||||||
if (cksel) {
|
if (cksel) {
|
||||||
hw->pin.master_ck_sel |= (1 << cs);
|
hw->pin.master_ck_sel |= (1 << cs);
|
||||||
} else {
|
} else {
|
||||||
hw->pin.master_ck_sel &= (1 << cs);
|
hw->pin.master_ck_sel &= ~(1 << cs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -322,7 +322,7 @@ static inline void spi_ll_master_set_pos_cs(spi_dev_t *hw, int cs, uint32_t pos_
|
|||||||
if (pos_cs) {
|
if (pos_cs) {
|
||||||
hw->misc.master_cs_pol |= (1 << cs);
|
hw->misc.master_cs_pol |= (1 << cs);
|
||||||
} else {
|
} else {
|
||||||
hw->misc.master_cs_pol &= (1 << cs);
|
hw->misc.master_cs_pol &= ~(1 << cs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user