78 #include <epicsTypes.h> 86 #include <epicsExport.h> 103 int main (
int argc,
char *argv[]) {
109 epicsUInt32 controlWord = 0;
110 epicsFloat64 DesiredFreq;
111 epicsFloat64 EffectiveFreq;
120 DesiredFreq = strtod (argv[1], &tailPtr);
126 if ((errno ==
OK) && (tailPtr != argv[1])) {
133 if (controlWord == 0) {
134 printf (
"Unable to create a control word for %f MHz.\n", DesiredFreq);
148 printf (
"Control Word = 0x%08X.\n", controlWord);
149 printf (
"Desired Frequency = %f Mhz. Effective Frequency = %f MHz. ",
150 DesiredFreq, EffectiveFreq);
151 printf (
"Error = %5.3f ppm.\n", Error);
162 printf (
"FracSynthControlWord <DesiredFreq>\n");
163 printf (
" Where <DesiredFreq> is the frequency (in MegaHertz)\n");
164 printf (
" that you wish to generate an SY87739L control word for.\n");
epicsShareExtern epicsUInt32 FracSynthControlWord(epicsFloat64 DesiredFreq, epicsFloat64 ReferenceFreq, epicsInt32 debugFlag, epicsFloat64 *Error)
int main(int argc, char *argv[])
#define MRF_FRAC_SYNTH_REF
epicsShareExtern epicsFloat64 FracSynthAnalyze(epicsUInt32 ControlWord, epicsFloat64 ReferenceFreq, epicsInt32 PrintFlag)
Support routines for the Micrel SY87739L Fractional-N Synthesizer.