?? serial.cpp
字號:
// Serial.cpp: implementation of the CSerial class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "SL_PLC.h"
#include "Serial.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CSerial::CSerial()
{
}
CSerial::~CSerial()
{
}
void CSerial::InitComm(int port)
{
if(!GetPortOpen())
{
SetCommPort(port);
SetSettings("9600,n,8,1");
SetInBufferSize(1024);
SetOutBufferSize(512);
SetInBufferCount(0);
SetInputMode(1);
SetInputLen(0);
SetRThreshold(1);
SetPortOpen(1);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -