⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lptda.h

📁 计算机并口转3路串行DA的DLL源码及电路,芯片MAX541/MAX5541,可以免费申请,8路I/O输出,5路输入,并口的简单极限应用.经使用各项性能不错,就是DA抗干扰较差,没有较大的电磁干扰运行
💻 H
字号:
#ifndef   _LPTDA_H_
#define   _LPTDA_H_

#include "Winio.h"
#include "conio.h"
#include "math.h"
// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the LPTDA_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// LPTDA_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef LPTDA_EXPORTS
#define LPTDA_API __declspec(dllexport)
#else
#define LPTDA_API __declspec(dllimport)
#endif
typedef struct               //端口字节的字段
{
	UCHAR   bit0:1;
	UCHAR   bit1:1;
	UCHAR   bit2:1;
	UCHAR   bit3:1;
	UCHAR   bit4:1;
	UCHAR   bit5:1;
	UCHAR   bit6:1;
	UCHAR   bit7:1;
}LPTBIT;
typedef union
{
	LPTBIT BIT;
	UCHAR byte;
}LPTBYTE;
extern LPTDA_API LPTBYTE bOutByte;
extern LPTDA_API LPTBYTE bInByte;
extern LPTDA_API LPTBYTE bDaByte;
extern LPTDA_API unsigned short address;
LPTDA_API _stdcall OpenLptPort();
LPTDA_API _stdcall CloseLptPort();
LPTDA_API _stdcall daOut(UINT Chan,float Value);
LPTDA_API _stdcall CS(UINT Chan);
LPTDA_API _stdcall SCLKH();
LPTDA_API _stdcall SCLKL();
LPTDA_API _stdcall DINH();
LPTDA_API _stdcall DINL();
LPTDA_API _stdcall Delay(long time);
#endif

⌨️ 快捷键说明

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