LINUX INDUSTRIAL I/O SUBSYSTEM
来源:互联网 发布:太阳线直销软件 编辑:程序博客网 时间:2024/06/08 17:53
LINUX INDUSTRIAL I/O SUBSYSTEM
http://wiki.analog.com/software/linux/docs/iio/iio
IIO OVERVIEW
- The Industrial I/O subsystem is intended to provide support for devices that in some sense are analog to digital or digital to analog convertors (ADCs, DACs).
- Devices that fall into this category are:
- ADCs
- Accelerometers
- Gyros
- IMUs
- Capacitance to Digital Converters (CDCs)
- Pressure Sensors
- Color, Light and Proximity Sensors
- Temperature Sensors
- Magnetometers
- DACs
- DDS (Direct Digital Synthesis)
- PLLs (Phase Locked Loops)
- Variable/Programmable Gain Amplifiers (VGA, PGA)
- The overall aim is to fill the gap between the somewhat similar hwmon and input subsystems.
- Hwmon is very much directed at low sample rate sensors used in applications such as fan speed control and temperature measurement.
- Input is, as it's name suggests focused on human interaction input devices.:
- Keyboard
- Mouse
- Touch Screen
- Joystick
- In some cases there is considerable overlap between these and IIO.
- A typical device falling into the IIO category would be connected via SPI or I2C.
- However typical DMA operated devices such as ones connected to a high speed synchronous serial (McBSP, SPORT) or high speed synchronous parallel (EPI, PPI) or FPGA peripherals are also subject to this subsystem.
- Since latter ones unlike SPI or I2C are not generally abstracted by Linux bus drivers they are subject to processor platform dependent implementations.
IIO SUBSYSTEM OVERVIEW
Functionality of IIO
- Basic device registration and handling
- Polled access to device channels via sysfs.
- Event chrdevs
- These are similar to input in that they provide a route to user space for hardware triggered events. Such events include threshold detectors, free-fall detectors and more complex action detection. The events themselves are currently very simple with merely an event code and a timestamp. Any data associated with the event must be accessed via polling.
- Hardware ring buffer support
- Some recent sensors have included fifo / ring buffers on the sensor chip.
- These greatly reduce the load on the host CPU by buffering relatively large numbers of data samples based on an internal sampling clock.
- Each ring buffer typically has an event chrdev (similar to the more general ones above) to pass on events such as buffer 50% full and an access chrdev via which the raw data it self may be read back.
- Trigger and software ring buffer (kfifo) support
Trigger and software ring buffer support
- In many data analysis applications it is useful to be able to capture data based on some external signal (trigger).
- These triggers might be a
- data ready signal
- gpio line connected to some external system
- on processor periodic interrupt.
- User space reading a specific file in sysfs.
- A single trigger many initialize data capture or reading from a number of sensors.
- These triggers are used in iio to fill software ring buffers acting in a very similar fashion to the hardware buffers described above.
- Triggers can be completely unrelated to the sensor itself
Standalone trigger drivers
Industrial I/O Subsystem In-Kernel Interfaces
The IIO subsystem can act as a layer under other elements of the kernel providing a means of obtaining ADC type readings or of driving DAC type signals. The functionality supported will grow as use cases arise.
IIO Ring Buffer / kfifo
- IIO uses a ring buffer also called circular buffer which is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end.
- This structure is well suited for buffering data streams. These buffers are typically used to solve the producer-consumer problem. In some applications it is desired for the producer (e.g., an ADC) to overwrite old data if the consumer (e.g., the User Space Application) is unable to momentarily keep up. But typically the buffer is sized to provide adequate space so that this circumstance should never happen.
POINTERS
- IIO mailing list: linux [dash] iio [at] vger [dot] kernel [dot] org
- IIO Documentation
- IIO Utils Main Page
- IIO test and visualization demo application
- IIO Command Server
- Pointers and good books
Need Help?
- Analog Devices Linux Device Drivers Help Forum
- Ask a Question
0 0
- LINUX INDUSTRIAL I/O SUBSYSTEM
- The Linux USB Input Subsystem, Part I
- The Linux USB Input Subsystem, Part I
- The Linux USB Input Subsystem, Part I
- Linux I/O及 I/O Cache
- linux file I/O
- Linux I/O端口
- Linux I/O体系结构
- Linux I/O函数
- Linux file I/O
- Linux I/O资源
- Linux设备I/O
- Linux I/O scheduler
- Linux I/O资源
- Linux I/O调度
- Linux I/O调度
- Linux I/O复用
- Linux I/O调度
- Shell常用处理字符串方法
- Mac下配置svn服务器
- 使用WITH AS提高性能简化嵌套SQL
- A Minimum Volume Covering Approach with a Set of Ellipsoids
- 【POJ3657】【USACO 2008 Jan Gold】 1.Haybale Guessing 二分答案,并查集check
- LINUX INDUSTRIAL I/O SUBSYSTEM
- eclipse中查看Android源码
- Android 仿美团网,大众点评购买框悬浮效果之修改版
- HEVC熵解码代码分析—代码解码流程(2)
- AnimationUtils.loadAnimation animation-list
- 蓝桥杯试题集 基础练习 特殊的数字
- Robotium解析xml生成html样式的报告
- ORACLE—005:创建JOB(二)
- 橙子引擎携多款精品TV游戏诚意呈献 2014智能电视游戏品牌峰会