匿名
未登录
登录
百问网嵌入式Linux wiki
搜索
查看“IIO libiio”的源代码
来自百问网嵌入式Linux wiki
名字空间
页面
讨论
更多
更多
页面选项
Read
查看源代码
历史
←
IIO libiio
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
该页面已被保护以防止编辑和其他操作。
您可以查看与复制此页面的源代码。
''Libiio'' is a complete library which offers tools and an interface to develop an application using [[IIO overview|IIO subsystem]]. == Article purpose == The purpose of this article is to: * briefly introduce the ''libiio'' main features and API * provide few examples, using ''libiio'' tools == Introduction == * ''Libiio'' is a [[IIO_overview#User_space_interface|user space]] library that provides an '''interface''' for user space applications. It is basically a wrapper that resides above the following interfaces: # '''/sys/bus/iio/devices''' sysfs interface (for configuration/setting) # '''/dev/iio/deviceX''' device interface (for data) * ''Libiio'' also provides '''tools''' that can be used for testing * ''Libiio'' design goals: # Interface with the kernel, to access IIO<ref name="IIO overview">[[IIO overview]], IIO subsystem overview</ref> devices # Provide proper data structures and functions to the user application # Support for local and remote backends allowing applications to access the devices when running on a local or a remote machine The full description of the IIO library is provided by the author of the library, see below references: * What is libiio<ref>[https://wiki.analog.com/resources/tools-software/linux-software/libiio https://wiki.analog.com/resources/tools-software/linux-software/libiio], What is libiio</ref>. * About libiio<ref>[https://wiki.analog.com/resources/tools-software/linux-software/libiio_internals https://wiki.analog.com/resources/tools-software/linux-software/libiio_internals], About libiio</ref>. == API description == The API description can be found here: https://analogdevicesinc.github.io/libiio == Tools == ''Libiio'' offers tools such as: * ''iiod'' server daemon * ''iio_info'' to dump attributes root@stm32mp1:~# iio_info Library version: 0.8 (git tag: v0.8) IIO context created with local backend. Backend version: 0.8 (git tag: v0.8) Backend description string: Linux stm32mp1 4.14.0-00004-gafe4a31 #778 SMP PREEMPT Tue Aug 28 14:02:25 CEST 2018 armv7l IIO context has 3 devices: {{highlight|trigger1}}: tim6_trgo 0 channels found: 3 device-specific attributes found: attr 0: sampling_frequency value: 100 attr 1: master_mode value: reset attr 2: master_mode_available value: reset enable update compare_pulse OC1REF OC2REF OC3REF OC4REF {{highlight|iio:device0}}: 48003000.adc:adc@0 (buffer capable) 2 channels found: {{highlight|voltage0}}: (input, index: 0, format: le:U16/16>>0) 3 channel-specific attributes found: attr 0: raw value: 72 attr 1: offset value: 0 attr 2: scale value: 0.044250488 {{highlight|voltage1}}: (input, index: 1, format: le:U16/16>>0) 3 channel-specific attributes found: attr 0: raw value: 1746 attr 1: offset value: 0 attr 2: scale value: 0.044250488 ... * ''iio_readdev''<ref>[https://wiki.analog.com/resources/tools-software/linux-software/libiio/iio_readdev https://wiki.analog.com/resources/tools-software/linux-software/libiio/iio_readdev], iio_readdev</ref> (to read or scan from a device) STM32AP [rc=0]# iio_readdev -t {{highlight|trigger1}} -s 8 -b 8 {{highlight|iio:device0}} {{highlight|voltage0 voltage1}} | hexdump 0000000 0068 055a 0058 0520 00b4 03df 0070 055f 0000010 0096 03d6 0089 038f 0077 05c8 0096 03b3 See also: [[How to use the IIO user space interface]] == Source code == ''Libiio'' can be downloaded on a public github<ref>[https://github.com/analogdevicesinc/libiio https://github.com/analogdevicesinc/libiio], libiio download link </ref>. It can be cloned using git command: <pre>git clone https://github.com/analogdevicesinc/libiio.git</pre> Tools source code can be found under libiio "[https://github.com/analogdevicesinc/libiio/tree/master/tests tests]" directory. == Installation on your target == ''Libiio'' and the tools it provides are embedded by default in [[OpenSTLinux distribution]]. ==References== <references /> <noinclude> [[Category:IIO|1]] {{PublicationRequestId | 9165 | 2018-10-18 | BrunoB}} </noinclude>
该页面使用的模板:
模板:Highlight
(
查看源代码
)
模板:PublicationRequestId
(
查看源代码
)
返回至
IIO libiio
。
导航
导航
WIKI首页
官方店铺
资料下载
交流社区
所有页面
所有产品
MPU-Linux开发板
MCU-单片机开发板
Linux开发系列视频
单片机开发系列视频
所有模块配件
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志