Complete the code to set the clock polarity (CPOL) bit to 1.
SPI->CR1 |= (1 << [1]);
The CPOL bit is usually bit 1 in the SPI control register CR1. Setting it to 1 configures the clock polarity.
Complete the code to clear the clock phase (CPHA) bit.
SPI->CR1 &= ~(1 << [1]);
The CPHA bit is usually bit 0 in the SPI control register CR1. Clearing it sets the clock phase to 0.
Fix the error in the code to set CPOL and CPHA correctly.
SPI->CR1 = (1 << [1]) | (1 << [2]);
CPOL is bit 1 and CPHA is bit 0. The code should set both bits 1 and 0.
Fill both blanks to configure SPI with CPOL=1 and CPHA=0 using bitwise operations.
SPI->CR1 = (1 << [1]) & ~(1 << [2]);
Set CPOL (bit 1) by shifting 1 left by 1, and clear CPHA (bit 0) by clearing bit 0.
Fill all three blanks to create a mask that sets CPOL and CPHA bits and clears bit 2.
SPI->CR1 = ((1 << [1]) | (1 << [2])) & ~(1 << [3]);
Set CPOL (bit 1) and CPHA (bit 0), and clear bit 2 to disable unwanted features.