i2c-test使用说明

7 篇文章 0 订阅
6 篇文章 0 订阅

用法:i2c-test <参数>
参数:

-b <bus number>: Set the bus number for this transaction.  Defaults to 0

-mm : Puts the device in Slave-Recieve mode and reponds to the message request

-mmd : Puts the device in Slave-Recieve mode and show the receive data

--sethost <addr>: Set the host slave address

--gethost: Get the current host slave address for the specified bus

--reset: Reset the I2C controller

--sysreset: Emergency Reset the I2C controller Module

--setspeed <speed>: Set the bus speed

(Supported speed modes are: Standard - 0x64(100Kbits/sec), Fast - 0x190(400Kbits/sec)

--scan: Scan the I2C bus and show the slave addresses

that respond

-s slave: Communicate with the specified slave address in 7-bit format (in

hexadecimal)

Defaults to 0x5a

-d <bytes>: Send any number of data bytes to the specified slave.

Separate hexadecimal data bytes with spaces.  If this

flag is used, it must be the last one on the

command line.

EG: i2c-test -m 1 -d 0x00 0x01 0x02 0x03

-rc count: Read the specified number of bytes.  Defaults to 1

-r: Just read from the specified address, don't do a write.

-w: Just write to the specified address, don't do a read.

-m mode: Send and receive in the specified mode:

0: Write a data byte, then receive a data byte in

   separate operations

1: Combined write and read using repeated start

Default mode is 0

-f: Repeat the specified test forever (stress test mode)

-sbd: Don't display any output unless there is an error

--delay: Specify the delay in milliseconds between tests in run forever mode

--getrecinfo: Get the current recovery info

eg.

i2c-test -b 5 -s 0x62 -m 1 -w -d 0x27 0x7c 0xb3

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大余里

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值