Mercurial > hg > fxanalyse
annotate DDS4xAD9912.h @ 148:97b191998151
New build
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Wed, 22 Jan 2014 14:45:28 +0100 |
parents | fd085d61e4ca |
children | d96f0b04f7fe |
rev | line source |
---|---|
0 | 1 //============================================================================== |
2 // | |
3 // Title: DDS4xAD9912.h | |
4 // Purpose: | |
5 // | |
6 // Created on: by Volodimer Laurent, modified by YLC | |
7 // Copyright: syrte. All Rights Reserved. | |
8 // | |
9 //============================================================================== | |
10 | |
11 #ifndef __DDS4XAD9912_H__ | |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
0
diff
changeset
|
12 #define __DDS4XAD9912_H__ |
0 | 13 |
14 #ifdef __cplusplus | |
15 extern "C" { | |
16 #endif | |
17 | |
18 //============================================================================== | |
19 // Include files | |
20 | |
21 #include "cvidef.h" | |
22 | |
23 //============================================================================== | |
24 // Defines | |
25 | |
26 #define Adress "145.238.205.55" | |
27 #define Port1 6665 | |
28 #define Port2 6666 | |
29 #define Port3 6667 | |
30 #define Port4 6668 | |
31 #define Clk 1000000000 | |
32 #define E48 281474976710656.0 | |
33 #define E40 1099511627776.0 | |
34 #define E32 4294967296.0 | |
35 #define E24 16777216.0 | |
36 #define E16 65536.0 | |
37 #define E8 256.0 | |
38 | |
39 //============================================================================== | |
40 // Macros | |
41 | |
42 #define WORD(Freq,Clk) pow(2,48)*(Freq/Clk) | |
43 | |
44 // DDS4xAD9912_Data : the data of crypto class DDS4xAD9912 | |
45 | |
46 typedef struct { | |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
47 double frequency[4]; |
0 | 48 } DDS4xAD9912_Data ; |
49 | |
50 //============================================================================== | |
51 // Variables | |
52 | |
53 char Request[255]; | |
54 char Response[255]; | |
55 unsigned int hConv; | |
56 | |
57 | |
58 //============================================================================== | |
59 // Functions | |
60 | |
118
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
108
diff
changeset
|
61 double DDS4xAD9912_GetFrequency(DDS4xAD9912_Data *dds, int channel); |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
0
diff
changeset
|
62 int DDS4xAD9912_SetFrequency(DDS4xAD9912_Data * Instance, int DDSNum, double Freq); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
0
diff
changeset
|
63 int DDS4xAD9912_Reset(DDS4xAD9912_Data * Instance); |
118
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
108
diff
changeset
|
64 int DDS4xAD9912_RampFrequency(DDS4xAD9912_Data *dds, int channel, double f2, double fstep); |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
108
diff
changeset
|
65 int DDS4xAD9912_RampFrequency2(DDS4xAD9912_Data *dds, int channel, double f1, double f2, double fstep); |
0 | 66 |
67 | |
68 #ifdef __cplusplus | |
69 } | |
70 #endif | |
71 | |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
0
diff
changeset
|
72 #endif |
0 | 73 |