Skip to content

Commit d9b7e92

Browse files
committed
修改I2C延时及BEEP对应的引脚号
1 parent 0922934 commit d9b7e92

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

i2c_aht10_sample.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,12 @@ static void aht10_init(const char *name)
8686
}
8787
else
8888
{
89+
rt_thread_mdelay(2000);
8990
write_reg(i2c_bus, AHT10_NORMAL_CMD, temp);
90-
rt_thread_mdelay(600); /* at least 300 ms */
9191

9292
temp[0] = 0x08;
9393
temp[1] = 0x00;
9494
write_reg(i2c_bus, AHT10_CALIBRATION_CMD, temp);
95-
rt_thread_mdelay(600); /* at least 300 ms */
9695

9796
initialized = RT_TRUE;
9897
}

pin_beep_sample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
/* 引脚编号,通过查看驱动文件drv_gpio.c确定 */
2121
#ifndef BEEP_PIN_NUM
22-
#define BEEP_PIN_NUM 37 /* PB2 */
22+
#define BEEP_PIN_NUM 35 /* PB0 */
2323
#endif
2424
#ifndef KEY0_PIN_NUM
2525
#define KEY0_PIN_NUM 55 /* PD8 */

0 commit comments

Comments
 (0)