xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡(jiǎn)介

串口操作封裝類: 包括: BOOL WriteComm(char* lpBuffer, int nLen); // 寫串口 BOOL ReadComm(char* lpBuff, int nLen); // 讀串口函數(shù) BOOL SetTimeOuts(COMMTIMEOUTS stTimeOuts); // 設(shè)置超時(shí)時(shí)間 BOOL SetComm(int nBaudRate/*波特率*/,int nParity/*奇偶校驗(yàn)*/,int nByteSize, int nStopBits); // 設(shè)置串口 void CloseComm

資源截圖

代碼片段和文件信息

//?Comm.cpp:?implementation?of?the?CComm?class.
//
//////////////////////////////////////////////////////////////////////

#include?“stdafx.h“
#include?“Comm.h“

#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////
const?int?MAXBLOCK?=2048;
CComm::CComm()
{
m_hComm?=?INVALID_HANDLE_VALUE;
}

CComm::~CComm()
{
CloseComm();//關(guān)閉串口
}
//?
BOOL?CComm::OpenComm(int?nComm)
{
CString?strCommName?=_T(““);
CString?strErrInfo?=_T(““);
strCommName.Format(_T(“COM%d“)?nComm);
m_hComm?=::CreateFile(strCommName?/*要打開串口名稱*/
GENERIC_READ?|?GENERIC_WRITE?/*允

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????2753??2009-06-18?20:39??Comm.cpp

?????文件????????770??2009-07-07?09:55??Comm.h

-----------?---------??----------?-----??----

?????????????????3523????????????????????2


評(píng)論

共有 條評(píng)論