//非中断方式接受数据
if
(USART_GetFlagStatus(USART1, USART_FLAG_RXNE) == SET) //接收数据寄存器非空标志位
{ str
= USART_ReceiveData(USART1); printf("str = %x\n",str); }

 

//此函数写在stm32f10x_it.c文件中
//中断方式接受数据
void USART1_IRQHandler(void)
{
 RESET)
    {     
        str=USART1->DR;
          printf("%x\t",str);
    } 
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2021-12-16
  • 2021-11-15
  • 2022-12-23
  • 2022-02-08
  • 2021-11-13
猜你喜欢
  • 2021-07-17
  • 2021-12-27
  • 2021-12-01
  • 2021-12-05
  • 2021-05-03
  • 2021-09-01
  • 2021-11-23
相关资源
相似解决方案