自己动手编写串口动态库超详细.docxVIP

  • 7
  • 0
  • 约9.53千字
  • 约 12页
  • 2019-07-12 发布于浙江
  • 举报
自己动手编写串口动态库 手把手教你编写串口调试助手,单片机串口程序 一、串口库源码: 自行在vc6中建立动态库工程 #include stdafx.h #include stdio.h #include stdlib.h #include windows.h #include conio.h #includeresource.h /*导出函数*/ //函数参数:串口名:com1 波特率:9600 用于显示接收数据的文本框的句柄 extern C _declspec(dllexport) void Entry(char *comname, int BaudRate, HWND rhbox); extern C _declspec(dllexport) bool openport(char *portname); extern C _declspec(dllexport) bool setupdcb(int rate_arg); extern C _declspec(dllexport) void SetTimeOut(int a, int b, int c, int d, int e); //发送字符或16进制数 extern C _declspec(dllexport) void SendChar(unsigned char ch); //显示方式:1:hex 0:ch

文档评论(0)

1亿VIP精品文档

相关文档