comparison DDS4xAD9912.h @ 0:d9aae7d7f2c6

Import
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Tue, 03 Jul 2012 10:38:59 +0200
parents
children 54e7b129ecc2
comparison
equal deleted inserted replaced
-1:000000000000 0:d9aae7d7f2c6
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__
12 #define __DDS42XAD9912_H__
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 {
47 double Frequency1 ;
48 double Frequency2 ;
49 double Frequency3 ;
50 double Frequency4 ;
51 } DDS4xAD9912_Data ;
52
53 //==============================================================================
54 // Variables
55
56 char Request[255];
57 char Response[255];
58 unsigned int hConv;
59
60
61 //==============================================================================
62 // Functions
63
64
65 static int DDS4xAD9912_SendCmd(int DDSNum,char *Buffer) ; // essentially a private function, hence the static scope...
66 int DDS4xAD9912_SetFrequency(DDS4xAD9912_Data * Instance, int DDSNum, double Freq) ;
67 int DDS4xAD9912_Reset(DDS4xAD9912_Data * Instance) ;
68 int DDS4xAD9912_FrequencyRampe ( DDS4xAD9912_Data * Instance,int DDSNum, double Frequin,double Frequout, double Step ) ;
69
70
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif /* ndef __DDS2XAD9858_H__ */
76