lptda.h
来自「计算机并口转3路串行DA的DLL源码及电路,芯片MAX541/MAX5541,可」· C头文件 代码 · 共 47 行
H
47 行
#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 + =
减小字号Ctrl + -
显示快捷键?