0
点赞
收藏
分享

微信扫一扫

mx8mp 使用i2ctransfer 读取多字节数据


参考:

​​[RK3399]移植工具i2c-tools_但行前路 无问西东

写i2c设备指定寄存器

./i2ctransfer -f -y i2c-no w-num@i2c-addr data-0 data-1 data-2    
1
读取i2c设备多个字节数据

./i2ctransfer -f -y i2c-no w-num@i2c-addr data-0 data-1 data-n r-num    
1
写i2c设备多个字节数据

./i2ctransfer -f -y i2c-no w-num@i2c-addr data-0 data-1 data-2

基于NXP平台如下所示:

i2ctransfer -y -f 1 w2@0x60 0x38 0x0e r1
i2ctransfer -y -f 1 w2@0x60 0x38 0x0f r1
i2ctransfer -y -f 1 w2@0x60 0x35 0x08 r1
i2ctransfer -y -f 1 w2@0x60 0x35 0x09 r1
i2ctransfer -y -f 1 w2@0x60 0x35 0x0a r1
i2ctransfer -y -f 1 w2@0x60 0x35 0x0b r1

举报

相关推荐

0 条评论