Re: Fwd: iio_trigger doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/20/2012 02:44 PM, Denis Ciocca wrote:
>> Yes, you need a buffer. The trigger won't be activated until the buffer is
>> active. To activate the buffer you need to select at least one scan element
>> in the scan_elements subfolder of you IIO device, then set the buffer size
>> by writing to buffer/length and finally write a 1 to buffer/enable. Now you
>> should see your acc_trigger_handler being called.
> 
> I don't understand what you mean with:
> "select at least one scan element in the scan_elements subfolder"
> I have seen the adis16240 accelerometer driver for example but I don't saw
> anything about scan element. Can you be more specific?

So each channel has a scan index. And for each channel you can enable
whether the channel should be sampled in buffered mode or not. There is a
sysfs file for each channel which allows you to do this in the scan_elements
subfolder. In order to start sampling you have to enable at least one
scan_element by writing a 1 to its enable attribute.

- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux