void SPI_ClearITPendingBit(SPI_TypeDef* SPIx, u8 SPI_IT)函数中有:
if(SPI_IT == SPI_IT_MODF) { /* Read SR register */ (void)SPIx->SR; /* Write on CR1 register */ SPIx->CR1 |= CR1_SPE_Set; }
读取SR寄存器,用(void)SPIx->SR; 这句话不大明白,用(void)SPIx->SR;就表示了读取SR寄存器?这种写法没怎么见过啊! |