annotate DDS4xAD9912.h @ 124:bdfc61a8ebee

Add thousands separator to important numeric displays
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Fri, 13 Dec 2013 12:24:00 +0100
parents 43b35f4aae78
children fd085d61e4ca
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 {
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
47 double Frequency1 ;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
48 double Frequency2 ;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
49 double Frequency3 ;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
50 double Frequency4 ;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
51 } DDS4xAD9912_Data ;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
52
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
53 //==============================================================================
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
54 // Variables
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
55
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
56 char Request[255];
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
57 char Response[255];
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
58 unsigned int hConv;
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
59
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
60
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
61 //==============================================================================
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
62 // Functions
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
63
118
43b35f4aae78 Fix N3 measurement. Simply frequnecy ramping functions.
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 108
diff changeset
64 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
65 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
66 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
67 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
68 int DDS4xAD9912_RampFrequency2(DDS4xAD9912_Data *dds, int channel, double f1, double f2, double fstep);
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
69
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
70
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
71 #ifdef __cplusplus
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
72 }
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
73 #endif
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
74
108
54e7b129ecc2 Minimal cleanup of AD9912 DDS driver
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 0
diff changeset
75 #endif
0
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
76