微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > STM8L101F3P6查询发送中断接收

STM8L101F3P6查询发送中断接收

时间:11-09 来源:互联网 点击:
USART_ITConfig(USART_IT_RXNE,ENABLE);//打开串口接收中断 } /******************************************************************************/ /* Function name: UART1_SendByte */ /* Descriptions: 发送单字节 */ /* input parameters: data:待发送数据 */ /* output parameters: 无 */ /* Returned value: 无 */ /******************************************************************************/ void USART_SendByte(uint8_t data) { USART_SendData8((unsigned char)data); /* Loop until the end of transmission */ while (USART_GetFlagStatus(USART_FLAG_TXE) == RESET); } /******************************************************************************/ /* Function name: UART1_SendString */ /* Descriptions: 发送字符串 */ /* input parameters: 无 */ /* output parameters: 无 */ /* Returned value: 无 */ /******************************************************************************/ void USART_SendString(uint8_t* Data,uint16_t len) { uint16_t i=0; for(;id assert_failed(uint8_t* file, uint32_t line) { /* User can add his own implementation to report the file name and line number, ex: printf("Wrong parameters value: file %s on line %drn", file, line) */ /* Infinite loop */ while (1) { } } #endif /*********************************END OF FILE**********************************/

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top