参考:
[RK3399]移植工具i2c-tools_但行前路 无问西东-CSDN博客
写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