• 大小: 72KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-10
  • 标签: C++  串口  

资源简介

C++ 串口通信源代码(完整工程,亲测可用),在Debug里有已经调试好的exe文件,很不错!

资源截图

代码片段和文件信息

#include “stdafx.h“
#include “com232.h“

BYTE XwCom=0x40;
BYTE  sCom1[5]sCom2[MAXBLOCKLENGTH+12]sCom3[MAXBLOCKLENGTH+12];
BYTE opation;
short ComNum;
//COMSTAT ComStat;


CComStatus::CComStatus()
{
m_hCom = NULL;
m_bComId = (char)ComNum;//COM1

m_bByteSize=8;
m_bStopBits=ONESTOPBIT;
m_bParity=NOPARITY;
m_dwBaudRate=9600;
// m_fChEvt=1;
m_bEvtChar=EVENTCHAR;
m_fBinary=1;

m_bConnected = FALSE;
m_bFlowCtrl = FC_XONXOFF ;
m_fXonXoff = FALSE;
}
CComStatus::CComStatus(BYTE bComIdBYTE bByteSizeBYTE bStopBitsBYTE bParity
DWORD dwBaudRate/*WORD fChEvt*/char bEvtCharDWORD fBinary)
{
m_hCom = NULL;
m_bComId = bComId;

m_bByteSize=bByteSize;
m_bStopBits=bStopBits;
m_bParity=bParity;
m_dwBaudRate=dwBaudRate;
// m_fChEvt=1;
m_bEvtChar=b

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      19314  2012-06-13 12:01  serial-computer\Com232.cpp

     文件       1904  1999-09-12 11:01  serial-computer\COM232.H

     文件       1939  2012-05-27 10:57  serial-computer\ComDlg.cpp

     文件       1325  2012-05-27 10:57  serial-computer\ComDlg.h

     文件      80896  2012-05-29 13:12  serial-computer\Debug\serealcom.exe

     文件       3633  1999-08-29 10:34  serial-computer\ReadMe.txt

     文件       1078  1999-08-29 10:34  serial-computer\res\serealcom.ico

     文件        401  1999-08-29 10:34  serial-computer\res\serealcom.rc2

     文件        916  1999-09-12 11:10  serial-computer\resource.h

     文件      38808  2012-05-29 13:11  serial-computer\serealcom.aps

     文件       1586  2000-01-03 00:55  serial-computer\serealcom.clw

     文件       2163  1999-09-12 11:07  serial-computer\serealcom.cpp

     文件       4458  2000-01-03 01:01  serial-computer\serealcom.dsp

     文件        541  1999-08-29 10:34  serial-computer\serealcom.dsw

     文件       1357  1999-08-29 10:34  serial-computer\serealcom.h

     文件     107520  2000-01-03 01:01  serial-computer\serealcom.ncb

     文件      59904  2000-01-03 01:01  serial-computer\serealcom.opt

     文件        848  2000-01-03 00:53  serial-computer\serealcom.plg

     文件       5713  2012-05-29 13:11  serial-computer\serealcom.rc

     文件        884  2012-05-29 13:11  serial-computer\serealcom.sln

    ..A..H.     14336  2012-06-13 12:05  serial-computer\serealcom.suo

     文件       8068  2012-05-27 10:57  serial-computer\serealcom.vcxproj

     文件       2294  2012-04-20 17:49  serial-computer\serealcom.vcxproj.filters

     文件        143  2012-04-20 17:49  serial-computer\serealcom.vcxproj.user

     文件       6112  1999-09-12 11:35  serial-computer\serealcomDlg.cpp

     文件       1830  1999-09-12 11:31  serial-computer\serealcomDlg.h

     文件        211  1999-08-29 10:34  serial-computer\StdAfx.cpp

     文件       1054  1999-08-29 10:34  serial-computer\StdAfx.h

    ..AD...         0  2012-12-09 16:37  serial-computer\Debug

    ..AD...         0  2012-05-29 13:05  serial-computer\res

............此处省略4个文件信息

评论

共有 条评论