adt650.h

来自「基于Senbo ADT650」· C头文件 代码 · 共 37 行

H
37 行
字号

#include <windows.h>
#include <winioctl.h>


extern "C" {
                __declspec(dllexport) HANDLE _stdcall   ADT650_DevLoad();
		__declspec(dllexport) void _stdcall   ADT650_InitBoard(HANDLE hDevice,unsigned int BaseAddr,int irq_chn);
 		__declspec(dllexport) BOOL _stdcall      ADT650_DevClose(HANDLE hDevice);
 		__declspec(dllexport) int _stdcall ADT650_SetEvent(HANDLE hDevice,HANDLE hEvent);
 		__declspec(dllexport) unsigned int _stdcall ReadIOPort(HANDLE hDevice,unsigned int addr);
		__declspec(dllexport) void _stdcall WriteIOPort(HANDLE hDevice,unsigned int addr,unsigned int data);
		__declspec(dllexport) void _stdcall _stdcall ADT650_ADSettings(HANDLE hDevice,float Range, char Polarity);
		__declspec(dllexport) float _stdcall ADT650_DigitToAnalog(HANDLE hDevice,int DigitalValue,int *Curchannel);
		__declspec(dllexport) void _stdcall ADT650_ClearIRQ(HANDLE hDevice);
		__declspec(dllexport) void _stdcall ADT650_SetChannel(HANDLE hDevice,unsigned int ChannelL, unsigned int ChannelH);
		__declspec(dllexport) void _stdcall ADT650_StartConversion(HANDLE hDevice);
		__declspec(dllexport) char _stdcall ADT650_ConversionDone(HANDLE hDevice);
		__declspec(dllexport) void _stdcall ADT650_EnableIRQ(HANDLE hDevice);
		__declspec(dllexport) void _stdcall ADT650_DisableIRQ(HANDLE hDevice);
		__declspec(dllexport) void _stdcall ADT650_SetIRQSource(HANDLE hDevice,unsigned char IrqSou);
		__declspec(dllexport) void _stdcall ADT650_ADConfig(HANDLE hDevice,unsigned char Timer2Con,unsigned char DMACon,
		                           unsigned char ADTrig,unsigned char GainCon,unsigned char FIFOEn);
		__declspec(dllexport) void _stdcall ADT650_WriteDataDA(HANDLE hDevice,unsigned int DAChannel, int DigitalValue);
                __declspec(dllexport) unsigned char _stdcall ADT650_ChannelSwitch(HANDLE hDevice);
                __declspec(dllexport) unsigned char _stdcall ADT650_IRQStatus(HANDLE hDevice);
		__declspec(dllexport) int _stdcall ADT650_ReadData(HANDLE hDevice);
		__declspec(dllexport) void _stdcall ADT650_ClockMode(HANDLE hDevice,unsigned char Clock, unsigned char Mode);
		__declspec(dllexport) void _stdcall ADT650_ClockDivisor(HANDLE hDevice,unsigned char Clock, unsigned int Divisor);
		__declspec(dllexport) unsigned int _stdcall  ADT650_ClockReadBack(HANDLE hDevice,unsigned char Timer);
		__declspec(dllexport) char _stdcall ADT650_ReadPITStatus(HANDLE hDevice,unsigned char Timer);
		__declspec(dllexport) unsigned char _stdcall ADT650_ReadDigitIO(HANDLE hDevice,unsigned char InputPort);
		__declspec(dllexport) void _stdcall ADT650_WriteDigitIO(HANDLE hDevice,unsigned char OutputPort, unsigned char v);
		__declspec(dllexport) void _stdcall ADT650_ConfigIOPorts(HANDLE hDevice,unsigned char Port0, unsigned char Port1,unsigned char Port2);
                __declspec(dllexport) void _stdcall ADT650_ADFIFOReset(HANDLE hDevice);
                __declspec(dllexport) unsigned char _stdcall ADT650_ReadADFIFOFlag(HANDLE hDevice);
}

⌨️ 快捷键说明

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