irpulse.h

来自「这是专门针对PDA设备做的一个电视遥控器程序」· C头文件 代码 · 共 46 行

H
46
字号
// IrPulse.h: interface for the IrPulse class.
// Written by Nick Deacon May 2003. nhgdeacon@hotmail.com
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IRPULSE_H__53993D2B_D7DE_49AB_8C8F_AA4B42511789__INCLUDED_)
#define AFX_IRPULSE_H__53993D2B_D7DE_49AB_8C8F_AA4B42511789__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000



class CIrPulse : public CObject
{
public:
	CIrPulse();
	virtual ~CIrPulse();

	BOOL Open(UINT uiPort);
    void Close();
	static UINT FindIrPort();
	BOOL IsOpen() const;
	BOOL SendCode(long);
	BOOL SetCodeSize(DWORD);
protected:
	HANDLE m_irPort;
	CByteArray bPulseStream;
	DWORD Write(const char *, DWORD) const;
	int iDataLength; //number of bits to transmit
	int iHPulse; //length of start bit (us)
	int iHSpace; //length of start space (us)
	int i1Pulse; //length of 1pulse (us)
	int i1Space; //length of 1space (us)
	int i0Pulse; //length of 0pulse (us)
	int i0Space; //length of 0space (us)
	
	DWORD dwLastValue;
	BOOL MakeStream(long);
	
	
	
};

#endif // !defined(AFX_IRPULSE_H__53993D2B_D7DE_49AB_8C8F_AA4B42511789__INCLUDED_)

⌨️ 快捷键说明

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