当前位置:网站首页>Printf redirection of serial port under sw4stm32 (SW4)
Printf redirection of serial port under sw4stm32 (SW4)
2022-06-24 23:35:00 【mialo163】
keil(mdk)
sw4stm32(SW4)
int __io_putchar(int ch)//for sw4
{
// Block send a byte ( Wait until the last one is sent , Or wait until the current byte is sent )
// return ch
USART_SendData(USART1, (unsigned char) ch);
while (!(USART1->SR & USART_FLAG_TXE));
return (ch);
}
int fputc(int ch, FILE *f)//for mdk
{
USART_SendData(USART1, (unsigned char) ch);
while (!(USART1->SR & USART_FLAG_TXE));
return (ch);
}Reprinted address :https://blog.csdn.net/shentianguo1985/article/details/84561477
边栏推荐
- Simple use of libnum Library (hexadecimal string conversion)
- Morris遍曆
- R语言使用MatchIt包进行倾向性匹配分析、使用match.data函数构建匹配后的样本集合、对匹配后的样本的不同分组对应的目标变量的均值进行Welch双样本t检验分析、双独立样本t检验
- [basic knowledge] ~ half adder & full adder
- Harmonyos accessing database instances (3) -- use ORM bee to test how good harmonyos is
- js监听页面或元素scroll事件,滚动到底部或顶部
- The R language uses the matchit package for propensity matching analysis and match The data function constructs the matched sample set, and judges the balance of all covariates in the sample after the
- 都2022年了,你还不了解什么是性能测试?
- Window系统安装Nacos
- SQL -convert function
猜你喜欢
随机推荐
Ganglia 的安装与部署
7-7 digital triangle
Websocket learning
明天就是PMP考试了(6月25日),这些大家都了解了吗?
[introduction to UVM== > episode_8] ~ sequence and sequencer, sequence hierarchy
Morris traversal
Hyperledger Fabric 2. X dynamic update smart contract
一文理解OpenStack网络
常用正则表达式
Hydropower project construction scheme based on 3D GIS Development
379. hide and seek
R语言使用MatchIt包进行倾向性匹配分析、使用match.data函数构建匹配后的样本集合、通过双样本t检验分析(双独立样本t检验)来判断倾向性评分匹配后样本中的所有协变量的平衡情况
Design and practice of vivo server monitoring architecture
What you must know about time series database!
R language uses the aggregate function of epidisplay package to split numerical variables into different subsets based on factor variables, calculate the summary statistics of each subset, and customi
Unveiling the secrets of the Winter Olympics | smartbi's partners supported the "front and back" of the Beijing Winter Olympics
7-8 梯云纵
[JS] - [tree] - learning notes
RT thread uses RT kprintf
websocket长链接压测









