用查询模式发送字符串
void UART_SendWait(UART_Type *pUART, uint8_t *pSendBuff, uint32_t u32Length)
{
uint8_t u8TxChar;
uint32_t i;
for (i = 0; i < u32Length; i++)
{
u8TxChar = pSendBuff[i];
while (!UART_IsTxBuffEmpty(pUART))
{
#if defined(ENABLE_WDOG)
WDOG_Feed();
#endif
}
UART_WriteDataReg(pUART, u8TxChar);
}
}
|