当前位置:网站首页>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
边栏推荐
- (Smooth)ScrollToPosition doesn't work properly with RecyclerView
- 一文理解OpenStack网络
- Simple use of libnum Library (hexadecimal string conversion)
- Spark's wide dependence and narrow dependence yyds dry goods inventory
- No main manifest attribute in jar
- 都2022年了,你还不了解什么是性能测试?
- Leetcode topic [array] -39- combined sum
- 六大行数据治理现状盘点:治理架构、数据标准与数据中台(2022.04)
- 7-8 ladder cloud vertical
- R语言使用MatchIt包进行倾向性匹配分析、使用match.data函数构建匹配后的样本集合、对匹配后的样本的不同分组对应的目标变量的均值进行Welch双样本t检验分析、双独立样本t检验
猜你喜欢

What good smart home brands in China support homekit?

Annual salary of millions, 7 years of testing experience: stay at a fairly good track, accumulate slowly, wait for the wind to come

Quickly build KVM virtual machine on # yyds dry goods inventory # physical machine

Actipro WPF Controls 2022.1.2

企业数据防泄露解决方案分享

Tomorrow is the PMP Exam (June 25). Have you understood all this?

JS listens for page or element scroll events, scrolling to the bottom or top

From client to server

7-6 laying oil well pipeline

今天睡眠质量记录79分
随机推荐
Jetpack Compose 最新进展
无鸟用的SAP PA证书,刚入行的同行可以考一考
R language dplyr package group_ By function and summarize_ The at function calculates the dataframe to calculate the number of counts and the mean value of different groups (summary data by category v
Installing IBM CPLEX academic edition | CONDA installing CPLEX
Volcano becomes spark default batch scheduler
Record a Webflux application memory leak troubleshooting
7-3 最大子段和
websocket长链接压测
选择类排序法
MySQL semi sync replication
[JS] - [array application] - learning notes
[JS] - [tree] - learning notes
R语言dplyr包group_by函数和summarise_at函数计算dataframe计算不同分组的计数个数和均值(Summarise Data by Categorical Variable)
Fibonacci
[JS] - [array, stack, queue, linked list basics] - Notes
7-7 digital triangle
抖音实战~实现App端视频上传与发布
378. Knight placement
2021-2022 China's financial digitalization "new" insight Industry Research Report
还在用 SimpleDateFormat 做时间格式化?小心项目崩掉