📄 serial.h
字号:
// --------------------------------------------------------------------------------------
// (c) 2003 www.winapi.net
//
// Serial.h
//
// Headerdatei f黵 eine einfache, aber leistungsf鋒ige
// Kommunikation 黚er die Serielle Schnittstelle
// --------------------------------------------------------------------------------------
#ifndef __SERIAL_H__
#define __SERIAL_H__
class CSerial
{
public:
CSerial();
~CSerial();
BOOL Open (int nComPortNr, int nBaud, int nBits, int nParity, int nStopp);
BOOL Close (void);
BOOL ModeSet (int nBaud, int nBits, int nParity, int nStopp);
BOOL SetTimeout (int iTotalReadTimeout);
BOOL IsOpen (void);
int ReadData (char *buffer, int iMaxCount);
int SendData (const char *buffer, int iBytesToWrite);
BOOL WriteCommByte (unsigned char ucByte);
private:
HANDLE hComm;
DCB dcb_alt;
COMMTIMEOUTS timeouts_alt;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -