Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 24325

adf4351.c adf4351_set_freq() routine

$
0
0

Hello,

 

There is a line of code in adf4351_set_freq() that does not seem correct. It is as follows:

tmp = freq * (uint64_t)st->r1_mod + (st->fpfd > 1);

 

frequency is multipled by the modulus value then added with (st->fpfd > 1) and stored in tmp variable. (st->fpfd > 1) will evaluate to 1 which will add as 1 Hz to tmp. It seems that (st->fpfd > 1) is not needed.

 

Any feedback would be appreciated. Thanks.

-Tom


Viewing all articles
Browse latest Browse all 24325