把串口当作文件IO来操作,简单易行!    已验证,gcc和tcc都可以编译成功,并使用。  需注意,先有串口,改好红色字体串口号再编译运行!

#include <stdio.h>
 #include <windows.h> int main(void)
{   
FILE *fp;       
char temp;
char buf[];     if((fp=fopen("com3","r"))==NULL)
puts("Can't open com3 /n"); while()
{
temp=;
fscanf(fp,"%c",&temp);
if(temp!=)
putchar(temp);
else
Sleep();
}
fclose(fp); return ;    

最新文章

  1. docker 与 vmware 的区别
  2. 常用到的git,mvn,postgres,vim命令总结
  3. 套题 codeforces 361
  4. 第 30 章 使用 Emmet 插件
  5. StringBuilder 和 StringBuffer
  6. POS管理系统之设备出库
  7. 论文第4章:iOS绘图平台的实现
  8. win7 通过命令行压缩文件
  9. ASP.NET MVC 教程
  10. css实现网页布局随滚轮变化响应移动
  11. ExtJS学习-----------Ext.String,ExtJS对javascript中的String的扩展
  12. adb出现adb server is out of date时的解决的方法
  13. 51驱动LCD1602
  14. MySQL1-基础知识点
  15. 初学者易上手的SSH-hibernate02 三种查询方式
  16. 2015 多校联赛 ——HDU5303(贪心)
  17. DB查询分析器访问EXCEL时,要在表名前后加上中括弧或双引号
  18. springboot访问数据库(MySql)
  19. Exception in thread &quot;main&quot; java.lang.RuntimeException: Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, do
  20. Android屏幕适配全攻略(最权威的官方适配指导)

热门文章

  1. BZOJ4260: Codechef REBXOR
  2. Mina小例子
  3. 使用 CJSON 在C语言中进行 JSON 的创建和解析的实例讲解
  4. iOS开发项目之一 [ 项目流程]
  5. VTKMY 3.3 VS 2010 Configuration 配置
  6. 关于Stock Quant与生产内容的理解
  7. hdu Collect More Jewels
  8. myeclipse10 .jsp将表单提交给.java(form网页与后台通信初识)
  9. HTML&amp;CSS----练习(运算符)
  10. 【转】const和static readonly