void USART_SendData(USART_TypeDef* USARTx, uint16_t Data)
{
/* Check the parameters */
assert_param(IS_USART_ALL_PERIPH(USARTx));//检测形参实参是否正确
assert_param(IS_USART_DATA(Data)); ///#define IS_USART_DATA(DATA) ((DATA) <= 0x1FF)
/* Transmit Data */
USARTx->DR = (Data & (uint16_t)0x01FF);
}
((DATA) <= 0x1FF)这个是什么意思啊?
Data & (uint16_t)0x01FF)这个位与又是做什么用呢? |