6076| 7
|
怎样利用串口发送文件到PC?printf好像不行。。 |
1金钱
最佳答案在你的串口中加入这样的代码:
int fputc(int ch, FILE *f)
{
USART_SendData(USART1,(uint8_t) ch);
while (USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET )
{}
return ch;
}
然后点“option for target”.在“use MicroLib”前面打勾。
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
|手机版|OpenEdv-开源电子网
( 粤ICP备12000418号-1 )
GMT+8, 2025-5-24 06:41
Powered by OpenEdv-开源电子网
© 2001-2030 OpenEdv-开源电子网