文本描述
作者:黄锦威 Author:Wilson e-Mail:wilsonwong@126 QQ:106365089 QQ群:15267957 http://wilsonwong88.cublog http://wilsonsoft.taobao VC串口开发 序言 一、虚拟串口平台搭建 二、MSComm控件编程实例 a)流程 b) 源码 三、Windows API串口编程实例 a)流程 b) 源码 四、实例:汽车行驶记录仪测试平台 五、附件 a)串口通信编程基础 i. ii. 通讯概述 脚位意义及方向 iii. iv. i. 流量控制 通讯端口初始化 CRC校验 b) c) MSComm控件编程介绍 MSComm控件介绍 MSComm控件串口编程—基本流程 Windows API串口编程介绍 Windows API串口通信编程概述 Windows通信相关 API函数 i. ii. i. ii. 作者:黄锦威 Author:Wilson e-Mail:wilsonwong@126 QQ:106365089 QQ群:15267957 http://wilsonwong88.cublog http://wilsonsoft.taobao 一、虚拟串口平台搭建 1.1安装虚拟串口“VSPM虚拟串口” 1.2工作模式设置 1.3 新增虚拟串口 1.4 虚拟机 TCP/IP模拟串口程序 通过监听远程服务器的 TCP服务,并与串口进行数据交换,以此达到虚拟目的,因此我们在虚拟机上建立TCP 服务: 作者:黄锦威 Author:Wilson e-Mail:wilsonwong@126 QQ:106365089 QQ群:15267957 http://wilsonwong88.cublog http://wilsonsoft.taobao Makefile文件: CFLAGS=-Wall -lpthread all:listen connect listen:listen.c gcc $(CFLAGS) $< -o $@ connect:connect.c gcc $(CFLAGS) $< -o $@ clean: rm *.o listen connect -rf Listen.c文件: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include