📄 lptda.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 + -