STM32串口函数求教,这是什么函数啊,有什么作用?
voidclear_buf_uart1(void){unsignedinti=0,c;c=BUFLEN+1;USART_ITConfig(USART1,USART_IT_...
void clear_buf_uart1(void)
{
unsigned int i = 0 ,c ;
c = BUFLEN +1 ;
USART_ITConfig(USART1, USART_IT_RXNE, DISABLE);
for( i = 0 ; i < c ; i ++)
{
buf_uart1.buf[i] = 0x0 ;
}
buf_uart1.index = 0 ;
USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);
} 展开
{
unsigned int i = 0 ,c ;
c = BUFLEN +1 ;
USART_ITConfig(USART1, USART_IT_RXNE, DISABLE);
for( i = 0 ; i < c ; i ++)
{
buf_uart1.buf[i] = 0x0 ;
}
buf_uart1.index = 0 ;
USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询