annotate DDS4xAD9912.h @ 166:fdd2f8fd7714

Minor cleanup
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Thu, 13 Feb 2014 19:17:32 +0100
parents fd085d61e4ca
children d96f0b04f7fe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
1 //==============================================================================
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
2 //
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
3 // Title: DDS4xAD9912.h
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
4 // Purpose:
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
5 //
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
6 // Created on: by Volodimer Laurent, modified by YLC
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
7 // Copyright: syrte. All Rights Reserved.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
8 //
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
9 //==============================================================================
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
10
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
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
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
13
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
14 #ifdef __cplusplus
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
15 extern "C" {
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
16 #endif
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
17
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
18 //==============================================================================
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
19 // Include files
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
20
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
21 #include "cvidef.h"
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
22
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
23 //==============================================================================
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
24 // Defines
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
25
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
26 #define Adress "145.238.205.55"
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
27 #define Port1 6665
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
28 #define Port2 6666
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
29 #define Port3 6667
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
30 #define Port4 6668
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
31 #define Clk 1000000000
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
32 #define E48 281474976710656.0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
33 #define E40 1099511627776.0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
34 #define E32 4294967296.0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
35 #define E24 16777216.0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
36 #define E16 65536.0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
37 #define E8 256.0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
38
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
39 //==============================================================================
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
40 // Macros
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
41
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
42 #define WORD(Freq,Clk) pow(2,48)*(Freq/Clk)
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
43
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
44 // DDS4xAD9912_Data : the data of crypto class DDS4xAD9912
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
45
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
46 typedef struct {
142
fd085d61e4ca Rework data logging
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 118
diff changeset
47 double frequency[4];
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
48 } DDS4xAD9912_Data ;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
49
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
50 //==============================================================================
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
51 // Variables
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
52
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
53 char Request[255];
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
54 char Response[255];
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
55 unsigned int hConv;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
56
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
57
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
58 //==============================================================================
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
59 // Functions
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
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
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
66
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
67
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
68 #ifdef __cplusplus
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
69 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
70 #endif
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
71
108
54e7b129ecc2 Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 0
diff changeset
72 #endif
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
73