AnsweredAssumed Answered

Why use this method to set the hardwaregain cause error?

Question asked by on Oct 13, 2014
Latest reply on Oct 14, 2014 by

I want to use  iio_channel_attr_write() function to set the RX AGC (hardwaregain) in my own program, but the return is a negative number. Who can tell me why?  Thank you.


char *hardwaregain_value = "10";

int gain = 0;


gain = iio_channel_attr_write(iio_device_find_channel(iio_context_find_device(ctx, "ad9361-phy"), "voltage0", "false"), "hardwaregain", hardwaregain_value);

       printf("gain = %d\n", gain);