diff --git a/components/soc/include/hal/spi_ll.h b/components/soc/include/hal/spi_ll.h index 0213d6dc12..2784aabf6a 100644 --- a/components/soc/include/hal/spi_ll.h +++ b/components/soc/include/hal/spi_ll.h @@ -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); } }