Skip to content

Commit b4e05ec

Browse files
committed
Merge branch 'docs/button_docs' into 'master'
docs(button): fix incorrect API usage See merge request ae_group/esp-iot-solution!1102
2 parents 2779098 + 29161b7 commit b4e05ec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/en/input_device/button.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ In this context:
202202
.event_data.long_press.press_time = 2000,
203203
};
204204
205-
iot_button_register_event_cb(gpio_btn, cfg, BUTTON_LONG_PRESS_START, button_long_press_1_cb, NULL);
205+
iot_button_register_event_cb(gpio_btn, cfg, button_long_press_1_cb, NULL);
206206
207207
cfg.event_data.long_press.press_time = 5000;
208-
iot_button_register_event_cb(gpio_btn, cfg, BUTTON_LONG_PRESS_START, button_long_press_2_cb, NULL);
208+
iot_button_register_event_cb(gpio_btn, cfg, button_long_press_2_cb, NULL);
209209
210210
Dynamically Modifying Default Button Values
211211
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

docs/zh_CN/input_device/button.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ Button 组件支持为多个事件注册回调函数,每个事件都可以注
201201
.event_data.long_press.press_time = 2000,
202202
};
203203
204-
iot_button_register_event_cb(gpio_btn, cfg, BUTTON_LONG_PRESS_START, button_long_press_1_cb, NULL);
204+
iot_button_register_event_cb(gpio_btn, cfg, button_long_press_1_cb, NULL);
205205
206206
cfg.event_data.long_press.press_time = 5000;
207-
iot_button_register_event_cb(gpio_btn, cfg, BUTTON_LONG_PRESS_START, button_long_press_2_cb, NULL);
207+
iot_button_register_event_cb(gpio_btn, cfg, button_long_press_2_cb, NULL);
208208
209209
查询按键事件
210210
^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)