AnsweredAssumed Answered

AD9361 TIA calibration

Question asked by freezees on Aug 23, 2016
Latest reply on Sep 6, 2016 by larsc

Dear ADI

I have a question about "ad9361_rx_tia_calib" this function.

what's the definition of DIV_ROUND_CLOSEST(x , y)?

Is it x/y or (x+y)/2/y ?

Base on equation 41 and table 54 in "AD9361_Register_Map_v2.8C", it should be x/y.

However, I found a definition in util.h which described as below.

#define DIV_ROUND_CLOSEST(x, divisor) (((x) + (divisor) / 2) / (divisor))

so.. which one is correct?


thank you