栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

嵌入式Linux下 i2c-tool工具的使用方法

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

嵌入式Linux下 i2c-tool工具的使用方法

查看i2c命令集,输入i2c并按两次tab键。

root@imx6ul7d:~# i2c
i2cdetect              i2cget                 i2ctransfer
i2cdetect.i2c-tools    i2cget.i2c-tools       i2ctransfer.i2c-tools
i2cdump                i2cset
i2cdump.i2c-tools      i2cset.i2c-tools
root@imx6ul7d:~#

i2cdetect -l 命令查看有效的i2c列表

root@imx6ul7d:~# i2cdetect -l
i2c-1   i2c             21a4000.i2c                             I2C adapter
i2c-0   i2c             21a0000.i2c                             I2C adapter
root@imx6ul7d:~#

i2cdetect -y 0查看i2c-0下的设备,同理用i2cdetect -y 1可查i2c-1下的设备。以此类推。

root@imx6ul7d:~# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- UU --
10: -- 11 -- -- -- -- -- -- -- -- -- -- -- -- UU --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@imx6ul7d:~#

*UU表示设备地址为0x0e和0x1e的从设备已经被驱动占用,卸载对应的驱动,UU就会变成数据了。

更多参考:
https://www.cnblogs.com/raina/p/12068485.html
https://linuxhint.com/i2c-linux-utilities/

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/887880.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号