diff DDSBes.h @ 0:d9aae7d7f2c6

Import
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Tue, 03 Jul 2012 10:38:59 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DDSBes.h	Tue Jul 03 10:38:59 2012 +0200
@@ -0,0 +1,50 @@
+//
+// Title:       DDSBes.h
+// Purpose:     header for the Besancon DDS crypto-class
+//
+// Created on:  by YLC
+// Copyright:   syrte. All Rights Reserved.
+//
+//==============================================================================
+
+#ifndef __DDSBES_H__
+#define __DDSBES_H__
+
+#ifdef __cplusplus
+    extern "C" {
+#endif
+
+
+// DDSBes_Data : the data of crypto class DDSBesancon
+
+typedef struct {
+	double ClockFrequency ;		 // in Hz
+	double Frequency ; 			 // the real frequency (in Hz) which is at the DDS output
+	double Amplitude ;
+	} DDSBes_Data ;
+
+
+/************** Member Function Declarations (Private) **************/
+
+static int delai(int t);
+static int Strb_adress(unsigned char ad);
+static int Strb_data(unsigned char da);
+static int Strb_nWrite(void);
+static int Strb_Update(void);
+static int Strb_MReset(void);
+
+
+/************** Member Function Declarations (Public) **************/
+
+extern void DDSBes_Initialize(DDSBes_Data * Instance);
+extern void DDSBes_Close(DDSBes_Data * Instance);
+extern void DDSBes_SetClockFrequency(DDSBes_Data * Instance, double ClockFrequency);
+extern void DDSBes_SetFrequency(DDSBes_Data * Instance, double Frequency); // In Instance->Frequency, the real output frequency is stored
+																		   // (<> from requested frequency due to rounding effect
+extern void DDSBes_SetAmplitude(DDSBes_Data * Instance, int Amplitude);
+
+#ifdef __cplusplus
+    }
+#endif
+
+#endif  /* ndef __DDSBES_H__ */