Mercurial > hg > fxanalyse
annotate DDS4xAD9912.c @ 146:931ebae87964
Tweaks to FakeDataProvider
Make generated counter data more realistic. Add the possibility to add noise
to the generated data. Make the sampling period easier to change.
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Wed, 22 Jan 2014 14:45:24 +0100 |
parents | fd085d61e4ca |
children | d96f0b04f7fe |
rev | line source |
---|---|
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
1 #include <ansi_c.h> |
0 | 2 #include <utility.h> |
3 #include <userint.h> | |
4 #include <tcpsupp.h> | |
5 | |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
6 #include "DDS4xAD9912.h" |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
7 |
0 | 8 |
9 static int OnTCPEvent(unsigned handle, int xType, int errCode, void *callbackData) | |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
10 { |
0 | 11 switch(xType) |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
12 { |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
13 case TCP_DISCONNECT: |
0 | 14 break; |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
15 case TCP_DATAREADY: |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
16 ClientTCPRead(handle, Response, sizeof(Response), 0); |
0 | 17 break; |
18 } | |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
19 return 0; |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
20 } |
0 | 21 |
22 | |
23 //============================================================================== | |
24 // DDS4xAD9912_SendCmd | |
25 // | |
26 // FUNC : envoie une chaine de caracteres sur un port du serveur TCP/IP de la foxboard | |
27 // PARAM : DDSNum contient le numero de la DDS (1,2,3 ou 4) | |
28 // PARAM : Buffer contenant la chaîne de caractères à envoyer | |
29 // RETURN : 0 si la connexion et l'ecriture sur le serveur TCP/IP sont OK | |
30 //============================================================================== | |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
31 static int DDS4xAD9912_SendCmd(int DDSNum, char * Buffer) |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
32 { |
112
e501896c0e7c
Avoid compilation warning
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
108
diff
changeset
|
33 int port = 0; |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
34 int rv; |
0 | 35 |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
36 switch (DDSNum) { |
0 | 37 case 1: |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
38 port = Port1; |
0 | 39 break; |
40 case 2: | |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
41 port = Port2; |
0 | 42 break; |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
43 case 3: |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
44 port = Port3; |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
45 break; |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
46 case 4: |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
47 port = Port4; |
0 | 48 break; |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
49 default: |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
50 return -1; |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
51 } |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
52 |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
53 rv = ConnectToTCPServer(&hConv, port, Adress, OnTCPEvent, 0, 0); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
54 if (rv < 0) { |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
55 MessagePopup("DDS4xAD9912", "Connection to server failed!"); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
56 return rv; |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
57 } |
0 | 58 |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
59 rv = ClientTCPWrite(hConv, Buffer, strlen(Buffer)+1, 0); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
60 if (rv < 0) { |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
61 MessagePopup("DDS Serveur", "Write to server failed!"); |
0 | 62 } |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
63 |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
64 DisconnectFromTCPServer(hConv); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
65 |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
66 return rv; |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
67 } |
0 | 68 |
69 | |
70 //============================================================================== | |
71 // DDS4xAD9912_Reset | |
72 // | |
73 // FUNC : reset des 4 DDS | |
74 // PARAM : | |
75 // RETURN : 0 si le reset de la DDS 1 , DDS 2, DDS3 et DDS4 est OK | |
76 //============================================================================== | |
77 int DDS4xAD9912_Reset(DDS4xAD9912_Data * Instance) | |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
78 { |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
79 int chan, rv; |
0 | 80 |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
81 for (chan = 1; chan < 5; chan++) { |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
82 sprintf(Request, "set;%i;%i", 1, 17); |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
83 rv = DDS4xAD9912_SendCmd(chan, Request); |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
84 if (rv < 0) { |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
85 MessagePopup("DDS Serveur", "DDS4xAD9912 reset failed"); |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
86 return -1; |
0 | 87 } |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
88 Instance->frequency[chan - 1] = 0.0; |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
89 } |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
90 return 0; |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
91 } |
0 | 92 |
93 | |
94 //============================================================================== | |
95 // DDS4xAD9912_SetFreq | |
96 // | |
97 // FUNC : sort une fréquence sur la DDS1 ,DDS2, DDS3 ou DDS4 | |
98 // PARAM : DDSNum contient le numero de la DDS (1, 2 , 3 ou 4) | |
99 // RETURN : 0 si la connexion et l'ecriture sur le serveur TCP/IP sont OK | |
100 //============================================================================== | |
101 int DDS4xAD9912_SetFrequency(DDS4xAD9912_Data * Instance, int DDSNum, double Freq) | |
102 { | |
103 | |
104 double Word=WORD(Freq,Clk) ; | |
105 double reste ; | |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
106 int rv; |
0 | 107 unsigned char b5,b4,b3,b2,b1,b0 ; |
108 | |
109 b5=(unsigned char)(Word/E40); | |
110 b4=(unsigned char)((Word - E40*b5)/E32); | |
111 b3=(unsigned char)((Word - E40*b5 - E32*b4)/E24); | |
112 b2=(unsigned char)((Word - E40*b5 - E32*b4 - E24*b3)/E16); | |
113 b1=(unsigned char)((Word - E40*b5 - E32*b4 - E24*b3 - E16*b2)/E8); | |
114 b0=(unsigned char)((Word - E40*b5 - E32*b4 - E24*b3 - E16*b2 - E8*b1)/1.0); | |
115 reste = (Word - E40*b5 -E32*b4 -E24*b3 -E16*b2 -E8*b1-1.0*b0) ; | |
116 | |
117 sprintf(Request,"set;%i;%i;%i;%i;%i;%i;%i;%i",0,10,b5,b4,b3,b2,b1,b0); | |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
118 rv = DDS4xAD9912_SendCmd(DDSNum, Request) ; |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
119 if (rv < 0) { |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
120 MessagePopup("DDS Serveur", "SetFrequency function failed !"); |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
121 return -1; |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
122 } |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
123 |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
124 sprintf(Request,"set;%i;%i",0,18); |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
125 rv = DDS4xAD9912_SendCmd(DDSNum, Request) ; |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
126 if (rv < 0) { |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
127 MessagePopup("DDS Serveur", "IO_Update function failed !"); |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
128 return -1; |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
129 } |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
130 |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
131 Instance->frequency[DDSNum - 1] = Freq - reste * Clk / E48; |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
132 return 0; |
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
133 } |
0 | 134 |
135 | |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
136 /* |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
137 * ramp DDS frequency from `f1` to `f2` in steps of `fstep` |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
138 * with a delay of 0.01 seoconds after each step |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
139 */ |
118
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
140 int DDS4xAD9912_RampFrequency2(DDS4xAD9912_Data *dds, int channel, double f1, double f2, double fstep) |
0 | 141 { |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
142 const double delay = 0.01; |
0 | 143 |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
144 /* f2 > f1 */ |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
145 while ((f2 - f1) > fstep) { |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
146 f1 += fstep; |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
147 DDS4xAD9912_SetFrequency(dds, channel, f1); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
148 Delay(delay); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
149 } |
0 | 150 |
108
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
151 /* f2 < f1 */ |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
152 while ((f1 - f2) > fstep) { |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
153 f1 -= fstep; |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
154 DDS4xAD9912_SetFrequency(dds, channel, f1); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
155 Delay(delay); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
156 } |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
157 |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
158 /* final adjustment */ |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
159 DDS4xAD9912_SetFrequency(dds, channel, f2); |
54e7b129ecc2
Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
103
diff
changeset
|
160 return 0; |
0 | 161 } |
118
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
162 |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
163 |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
164 /* |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
165 * ramp DDS frequency from the current frequency to `f2` in steps |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
166 * of `fstep` with a delay of 0.01 seoconds after each step |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
167 */ |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
168 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:
112
diff
changeset
|
169 { |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
170 double f1 = DDS4xAD9912_GetFrequency(dds, channel); |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
171 return DDS4xAD9912_RampFrequency2(dds, channel, f1, f2, fstep); |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
172 } |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
173 |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
174 |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
175 double DDS4xAD9912_GetFrequency(DDS4xAD9912_Data *dds, int channel) |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
176 { |
142
fd085d61e4ca
Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
118
diff
changeset
|
177 return dds->frequency[channel - 1]; |
118
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
178 } |
43b35f4aae78
Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
112
diff
changeset
|
179 |