spi_master: correctly set cs polarity

All devices must be added to the same spi line before use.

Partly solve this problem: https://github.com/espressif/esp-idf/pull/5490
This commit is contained in:
Wielebny666
2020-06-23 16:02:50 +02:00
committed by bot
parent 0fe231d2b3
commit db6fbba73e
3 changed files with 4 additions and 4 deletions

View File

@@ -274,7 +274,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);
}
}