Skip to content

Commit d6b4a3b

Browse files
committed
[i2c]命令之间增加延时
1 parent 345797c commit d6b4a3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

i2c_aht10_sample.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ static void aht10_init(const char *name)
8686
}
8787
else
8888
{
89-
rt_thread_mdelay(2000);
9089
write_reg(i2c_bus, AHT10_NORMAL_CMD, temp);
90+
rt_thread_mdelay(400);
9191

9292
temp[0] = 0x08;
9393
temp[1] = 0x00;
9494
write_reg(i2c_bus, AHT10_CALIBRATION_CMD, temp);
95-
95+
rt_thread_mdelay(400);
9696
initialized = RT_TRUE;
9797
}
9898
}

0 commit comments

Comments
 (0)