-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathUSTCDACDriver.h
More file actions
61 lines (53 loc) · 1.92 KB
/
USTCDACDriver.h
File metadata and controls
61 lines (53 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
FileName:DACDriver.h
Author:GuoCheng
E-mail:fortune@mail.ustc.edu.cn
All right reserved @ GuoCheng.
Modified: 2017.9.15
Description: Export function.
*/
#pragma once
#ifdef DLLAPI
#else
#define DLLAPI __declspec(dllimport)
#endif
#ifndef WORD
#define WORD unsigned short
#endif
#ifndef UINT
#define UINT unsigned int
#endif
#ifndef LPVOID
#define LPVOID void*
#endif
#ifndef NULL
#define NULL 0
#endif
/* Open a device and add it to device list. */
DLLAPI int OpenDAC(UINT */*pID*/,char*/*ip*/,WORD/*port*/);
/* Close the device and clear the data */
DLLAPI int CloseDAC(UINT/*id*/);
/* Write a command to FPGA */
DLLAPI int WriteInstruction(UINT/*id*/,UINT/*instructino*/,UINT/*para1*/,UINT/*para2*/);
/* Write data to DDR4 */
DLLAPI int WriteMemory(UINT/*id*/,UINT/*instruction*/,UINT/*start*/,UINT/*length*/,WORD*/*pData*/);
/* Read data from DDR4 */
DLLAPI int ReadMemory(UINT/*id*/,UINT/*instruction*/,UINT/*start*/,UINT/*length*/);
/* Set TCPIP timeout,uint:second. */
DLLAPI int SetTimeOut(UINT/*id*/,UINT /*direction*/,float/*time*/);
/* Get funtion type and parameter */
DLLAPI int GetFunctionType(UINT/*id*/,UINT/*offset*/,UINT*/*pFunctype*/,UINT */*pInstruction*/,UINT */*pPara1*/,UINT */*pPara2*/);
/* If run as PARALLEL mode, the result will be store in stack, The stack is first in last out.*/
DLLAPI int GetReturn(UINT/*id*/,UINT /*offset*/,int*/*pRespStat*/,int*/*pRespData*/,WORD*/*pData*/);
/* Check whether the task execute finished. */
DLLAPI int CheckFinished(UINT/*id*/,UINT* /*isFinished*/);
/* Wait task finished */
DLLAPI int WaitUntilFinished(UINT /*id*/,UINT /*time*/);
/* Get software Information*/
DLLAPI int GetSoftInformation(char */*description*/);
/* Scan the local network */
DLLAPI int ScanDevice(char *);
/* Check if all task successed. */
DLLAPI int CheckSuccessed(UINT/*id*/,UINT */*pIsSuccessed*/,UINT*/*pPosition*/);
/* Get lastest error message */
DLLAPI int GetErrorMsg(int/* errorcode */,char */* strMsg */);