adconvert.h

来自「研华数据采集卡PCI1713,PCI1720,PCL730测试程序」· C头文件 代码 · 共 43 行

H
43
字号
// ADConvert.h: interface for the CADConvert class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ADCONVERT_H__62219181_8CD8_11D6_9E0C_8C6A3D0CD838__INCLUDED_)
#define AFX_ADCONVERT_H__62219181_8CD8_11D6_9E0C_8C6A3D0CD838__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "driver.h"
#include "os.h"

class CADConvert  
{
public:
	////////////////////////////////////////////////////
	//I/O口函数组及成员变量
	////////////////////////////////////////////////////
	PT_ReadPortWord		ptReadPortWord;
	PT_ReadPortByte		ptReadPortByte;
	PT_WritePortWord	ptWritePortWord;
	PT_WritePortByte	ptWritePortByte;
	
	LRESULT ReadPortWord(LONG DriverHandle,PT_ReadPortWord* lpReadPortWord);	//从指定I/O口读一16位数据
	LRESULT ReadPortByte(LONG DriverHandle,PT_ReadPortByte* lpReadPortByte);	//从指定I/O口读一8位数据
	LRESULT WritePortWord(LONG DriverHandle,PT_WritePortWord* lpWritePortWord);	//写一16位的数据到指定I/O口		
	LRESULT WritePortByte(LONG DriverHandle, PT_WritePortByte* lpWritePortByte);//写一个8位的数据到指定I/O口
	
	//设备函数组及变量
	LRESULT GetFeatures(LONG DriverHandle,PT_DeviceGetFeatures* lpDevFeatures);//获得设备性能
	LRESULT CloseDevice(LONG* DeviceHandle);				//关闭设备函数	
	LRESULT OpenDevice(DWORD DeviceNum,LONG*DriverHandle);	//打开设备函数
	void ErrMessage(DWORD ErrorCode, char* ErrorMsg);		//出错信息函数
	LRESULT		ErrCde;					//错误码
	char		szErrMsg[80];			//错误信息
	CADConvert();
	virtual ~CADConvert();

};

#endif // !defined(AFX_ADCONVERT_H__62219181_8CD8_11D6_9E0C_8C6A3D0CD838__INCLUDED_)

⌨️ 快捷键说明

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