全站数据
8 4 2 0 5 8 1

如何用串口传输文件

财会审计帮 | 简单学习,快乐成才!         
问题更新日期:2024-10-16 12:44:27

问题描述

如何用串口传输文件,麻烦给回复
精选答案
最佳答案

#include #include int main(void){FILE *fp;char temp;char buf[100];if((fp = fopen("com3","r")) == NULL)puts("this way doesn't work!

")

;elseputs("this way works!

")

;while(1){temp = 0;fscanf(fp,"%c",&temp)

;if(temp != 0)putchar(temp)

;elseSleep(100);}fclose(fp);return 0;}:CONCATENATE(Text,Text……) 参数说明:T