docs: Added more detail to iio doc
[contrib/mraa.git] / docs / iio.md
1 iio                             {#iio}
2 ===
3 IIO is the kernel's framework for supporting sensors. 
4 ## Using dummy_iio driver
5 For platforms without IIO hardware the iio_dummy driver can be used. You can add the driver by either rebuilding the kernel with IIO component enabled or just building the IIO modules and load them.
6 You must add the following config fragment. Known to work for kernel 3.19 and later.
7 <pre><code>
8 CONFIG_IIO_DUMMY_EVGEN=m
9 CONFIG_IIO_SIMPLE_DUMMY=m
10 CONFIG_IIO_SIMPLE_DUMMY_EVENTS=y
11 CONFIG_IIO_SIMPLE_DUMMY_BUFFER=y
12 </code></pre>
13 ### Add driver to kernel
14 Boot with new kernel, then load modules
15 <pre><code>
16 $ modprobe iio_dummy
17 $ modprobe iio_dummy_evgen
18 </code></pre>
19 ### Load kernel modules
20 Depending our your kernel config, some of these modules may already be loaded.
21 <pre><code>
22 $ insmod drivers/iio/industrialio.ko
23 $ insmod drivers/iio/kfifo_buf.ko
24 $ insmod drivers/staging/iio/iio_dummy_evgen.ko
25 $ insmod drivers/staging/iio/iio_dummy.ko
26 </code></pre>
27 ## 'RAW' access
28
29 Mraa supports raw access
30
31 ###Channels
32
33 ###Attributes
34
35 ###Events
36
37 ###Triggers
38
39 Activate the trigger in /sys/class/iio
40 $ echo 1 > trigger0/trigger_now
41
42