view DDSBes.h @ 23:65e277fdf01f

Correct DDS3 frequency adjustement on N3 measurement We need to take into account the phase locked loop divisor factor that links DDS1 frequency change to repetition rate change.
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Fri, 20 Jul 2012 16:50:11 +0200
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__ */