Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i2c-tool scan问题 #36

Open
Ghazigq opened this issue Jun 14, 2024 · 1 comment
Open

i2c-tool scan问题 #36

Ghazigq opened this issue Jun 14, 2024 · 1 comment

Comments

@Ghazigq
Copy link

Ghazigq commented Jun 14, 2024

使用的是I2C1 引脚SD1_D3、SD1_D0
package为i2c-tools-latest
使用命令i2c scan i2c1时报错:[E/drv.i2c] xfer finish tiemout
测试发现当msg.len长度是0,就会有该报错
测试代码如下:

struct rt_i2c_msg msg;
msg.addr = AHT10_ADDR;
msg.flags = RT_I2C_WR;
msg.buf = cmd;
msg.len = 0;
rt_i2c_transfer(i2c_bus, &msg, 1);
@unicornx
Copy link
Collaborator

unicornx commented Jul 1, 2024

报告问题时建议提供对应代码的 commit,方便复现问题。

另外,最近 duo-v5.1.0 分支上的 72b59ab 已经对 i2c driver 做了很大的修改,所以你这个问题在最新的 duo-v5.1.0 上是否依然可以复现?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants