On 18/11/15 14:38, Marc Titinger wrote:
Basic support or direct IO raw read, with averaging attribute.You have added some new ABI in here, but I'm not seeing any documentation
Values are RAW, INT_PLUS_MICRO (Volt/Ampere/Watt).
Output of iio_info:
iio:device0: ina226
4 channels found:
power3: (input)
1 channel-specific attributes found:
attr 0: raw value: 1.150000
voltage0: (input)
1 channel-specific attributes found:
attr 0: raw value: 0.000003
voltage1: (input)
1 channel-specific attributes found:
attr 0: raw value: 4.277500
current2: (input)
1 channel-specific attributes found:
attr 0: raw value: 0.268000
4 device-specific attributes found:
attr 0: sampling_frequency_available value: 61 120 236...
attr 1: in_averaging_steps value: 4
attr 2: in_calibscale value: 10000
attr 3: in_sampling_frequency value: 1506
Tested with ina226, on BeagleBoneBlack.
Datasheet: http://www.ti.com/lit/gpn/ina226
Signed-off-by: Marc Titinger <mtitinger@xxxxxxxxxxxx>
for averaging_steps. Does this map onto the existing oversampling_ratio?