comm.h

来自「本源码主要是通过API函数实现串口打开」· C头文件 代码 · 共 35 行

H
35
字号
//---------------------------------------------------------------------------

#ifndef CommH
#define CommH
//---------------------------------------------------------------------------
#include <dstring.h>
#include <Classes.hpp>
#include <System.hpp>
//---------------------------------------------------------------------------


class TComm : public TObject
{
#define TxAbort 0
#define RxAbort 1
#define TxClear 2
#define RxClear 3

private:
        HANDLE ComHandle;
protected:
public:
    
    virtual __fastcall TComm();
    virtual __fastcall ~TComm();
    bool __fastcall openport(String port,String baud,int &result);
    bool __fastcall WriteCom(String str);
    unsigned long __fastcall ReadCom(char * array);
    void __fastcall purge_comm(int type);
    void __fastcall ClosePort();
	unsigned long __fastcall GetModemStatus();
	unsigned long __fastcall ClearError();
};
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?