spi_master: correctly set cs polarity

All devices must be added to the same spi line before use.
This commit is contained in:
Wielebny666 2020-06-23 16:02:50 +02:00 committed by Armando
parent 6093407d78
commit fb594f8f5d

View File

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