Skip to content

Commit b604e39

Browse files
committed
[更新]更新示例代码注释
1 parent ce5ea2d commit b604e39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pin_beep_sample.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ static void pin_beep_sample(void)
5151

5252
/* 按键0引脚为输入模式 */
5353
rt_pin_mode(KEY0_PIN_NUM, PIN_MODE_INPUT_PULLUP);
54-
/* 绑定中断,上升沿模式,回调函数名为beep_on */
54+
/* 绑定中断,下降沿模式,回调函数名为beep_on */
5555
rt_pin_attach_irq(KEY0_PIN_NUM, PIN_IRQ_MODE_FALLING, beep_on, RT_NULL);
5656
/* 使能中断 */
5757
rt_pin_irq_enable(KEY0_PIN_NUM, PIN_IRQ_ENABLE);
5858

5959
/* 按键1引脚为输入模式 */
6060
rt_pin_mode(KEY1_PIN_NUM, PIN_MODE_INPUT_PULLUP);
61-
/* 绑定中断,上升沿模式,回调函数名为beep_off */
61+
/* 绑定中断,下降沿模式,回调函数名为beep_off */
6262
rt_pin_attach_irq(KEY1_PIN_NUM, PIN_IRQ_MODE_FALLING, beep_off, RT_NULL);
6363
/* 使能中断 */
6464
rt_pin_irq_enable(KEY1_PIN_NUM, PIN_IRQ_ENABLE);

0 commit comments

Comments
 (0)