interface.h

来自「光学仪器的控制系统 用于教学和科研的仪器」· C头文件 代码 · 共 49 行

H
49
字号
//---------------------------------------------------------------------------

#ifndef InterfaceH
#define InterfaceH

//---------------------------------------------------------------------------
#include <Classes.hpp>
//---------------------------------------------------------------------------
class TInterface : public TObject
{
public:
//接收缓冲区
	typedef struct UPDATA {
    	UCHAR   char1;
        UCHAR   char2;
        UCHAR   char3;
        UCHAR   char4;
        UCHAR   char5;
        UCHAR   char6;
        UCHAR   char7;
        UCHAR   char8;
	}Updata;

private:	// User declarations
//	向下发送数据结构
	struct DownDataBuf
	{
          UCHAR   code1;
          UCHAR   code2;
          UCHAR   code3;
          UCHAR   code4;
	}DDBuf;
//	返回字节长度
	unsigned long	DataLength;
//	接收字节长度
	UINT  pktlength;
public:		// User declarations
	__fastcall TInterface();
    __fastcall ~TInterface();
    void USBDataDown(UCHAR code1, UCHAR code2, UCHAR code3, UCHAR code4);
    UCHAR * PortUpData();

	int CommandReturn();
    bool DelUpLong(int total);
	bool Delay(int cmd, int t, int total);
};
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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