当前位置:网站首页>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
边栏推荐
- Pseudo original intelligent rewriting API Baidu - good collection
- 二分查找数组下标
- What you must know about time series database!
- Leetcode topic [array] -39- combined sum
- idea创建模块提示已存在
- JS listens for page or element scroll events, scrolling to the bottom or top
- Morris traverse
- go 语言指针,值引用和指针引用
- Use of types, values, namespaces, combinations, etc. in typescript
- R语言使用MatchIt包进行倾向性匹配分析、使用match.data函数构建匹配后的样本集合、对匹配后的样本的不同分组对应的目标变量的均值进行Welch双样本t检验分析、双独立样本t检验
猜你喜欢

点的螺旋距离

RT thread uses RT kprintf

华为机器学习服务语音识别功能,让应用绘“声”绘色

Understanding openstack network
Record a Webflux application memory leak troubleshooting

(Smooth)ScrollToPosition doesn't work properly with RecyclerView

22map introduction and API

选择类排序法

Jetpack Compose 最新进展

Design and practice of vivo server monitoring architecture
随机推荐
Leetcode topic [array] -39- combined sum
Whereabouts computer desktop small arrow
7-7 数字三角形
golang convert json string to map
throttle-debounce.js:一个小型的防抖节流函数库
7-7 求解众数问题
372. chessboard coverage
7-8 ladder cloud vertical
安装IBM CPLEX学术版 academic edition | conda 安装 CPLEX
[JS] - [string - application] - learning notes
Morris traverse
Volcano成Spark默认batch调度器
当初吃土建起来的“中台”,现在为啥不香了?
企业数据防泄露解决方案分享
throttle-debounce. JS: a small anti shake throttling function library
普通人的生活准则
R语言使用epiDisplay包的aggregate函数将数值变量基于因子变量拆分为不同的子集,计算每个子集的汇总统计信息、自定义FUN参数为多个统计量函数名称的列表计算多个统计量
Morris遍历
[JS] - [stack, team - application] - learning notes
R语言使用nnet包的multinom函数构建无序多分类logistic回归模型、使用exp函数和coef函数获取模型中每个变量(自变量改变一个单位)对应的优势比(odds ratio)