view DDSBes.h @ 67:0159abc1a9d8

Fix slope measurement For the update algorithm to work correclty the slope measurement must be updated before the mean measurement. Other code is affected by the same issue.
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Mon, 29 Oct 2012 14:48:08 +0100
parents d9aae7d7f2c6
children
line wrap: on
line source

//
// 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__ */