Mercurial > hg > fxanalyse
comparison FXAnalyse.c @ 69:94cb4b29bb47
Use cleaned up AD9956 DDS driver functionalities
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Mon, 29 Oct 2012 14:48:24 +0100 |
parents | 0159abc1a9d8 |
children | a945f2b7bef6 |
comparison
equal
deleted
inserted
replaced
68:64a7a1d3d75c | 69:94cb4b29bb47 |
---|---|
134 int KeepCentering = FALSE; | 134 int KeepCentering = FALSE; |
135 double Timetorecenter275K = 3600.0 * 10; | 135 double Timetorecenter275K = 3600.0 * 10; |
136 double Timetorecenter10K = 3600.0 * 3; | 136 double Timetorecenter10K = 3600.0 * 3; |
137 double CenteringTimeBegin275K = 0.0; | 137 double CenteringTimeBegin275K = 0.0; |
138 double CenteringTimeBegin10K = 0.0; | 138 double CenteringTimeBegin10K = 0.0; |
139 | |
140 | |
141 int DDSFox_Set(DDSParameter *DDS, double Frequency, double SweepRate) | |
142 { | |
143 DDS->Frequency = Frequency; | |
144 DDS->SweepRate = SweepRate; | |
145 | |
146 DDSFox_SetFreq(DDS); | |
147 DDSFox_SetDf(DDS); | |
148 | |
149 return 0; | |
150 } | |
151 | |
152 | |
153 int DDSFox_SetSweepRate(DDSParameter *DDS, double SweepRate) | |
154 { | |
155 DDS->SweepRate = SweepRate; | |
156 DDSFox_SetDf(DDS); | |
157 return 0; | |
158 } | |
159 | 139 |
160 | 140 |
161 muParserHandle_t initMathParser() | 141 muParserHandle_t initMathParser() |
162 { | 142 { |
163 muParserHandle_t parser = mupCreate(); | 143 muParserHandle_t parser = mupCreate(); |
229 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, frequency); | 209 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, frequency); |
230 GetCtrlVal(MainPanel, PANEL_DDS4, &frequency); | 210 GetCtrlVal(MainPanel, PANEL_DDS4, &frequency); |
231 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 4, frequency); | 211 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 4, frequency); |
232 | 212 |
233 // initialyze 1x AD9956 DDS box | 213 // initialyze 1x AD9956 DDS box |
234 strcpy(DDS1xAD9956.ip, "145.238.205.58"); | 214 DDSFox_Initialize(&DDS1xAD9956, "145.238.205.58", 6665, DEDRIFT_DDS_FREQUENCY); |
235 DDS1xAD9956.Port = 6665; | |
236 DDS1xAD9956.Profil = 7; // configuration profile: single freq=0, sweep=7 | |
237 DDS1xAD9956.Clock = 200000000; | |
238 DDS1xAD9956.Frequency = DEDRIFT_DDS_FREQUENCY; | |
239 DDS1xAD9956.Delta_T = 0.01; | |
240 DDS1xAD9956.SweepRate = 0.0; | |
241 DDS_Initialize(&DDS1xAD9956); | |
242 | 215 |
243 Ch1 = Ch2 = Ch3 = Ch4 = 0.0; | 216 Ch1 = Ch2 = Ch3 = Ch4 = 0.0; |
244 | 217 |
245 GetCtrlVal(MainPanel, PANEL_N1CHOICE, &N1); | 218 GetCtrlVal(MainPanel, PANEL_N1CHOICE, &N1); |
246 GetCtrlVal(MainPanel, PANEL_N2CHOICE, &N2); | 219 GetCtrlVal(MainPanel, PANEL_N2CHOICE, &N2); |