fix spelling mistakes

pull/10/head
wildfarmer 6 years ago
parent 807a6cb20a
commit 054e1cca68

@ -69,7 +69,7 @@ PRESS_UP | 按键弹起,每次松开都触发
PRESS_REPEAT | 重复按下触发变量repeat计数连击次数 PRESS_REPEAT | 重复按下触发变量repeat计数连击次数
SINGLE_CLICK | 单击按键事件 SINGLE_CLICK | 单击按键事件
DOUBLE_CLICK | 双击按键事件 DOUBLE_CLICK | 双击按键事件
LONG_RRESS_START | 达到长按时间阈值时触发一次 LONG_PRESS_START | 达到长按时间阈值时触发一次
LONG_PRESS_HOLD | 长按期间一直触发 LONG_PRESS_HOLD | 长按期间一直触发
@ -93,7 +93,7 @@ int main()
button_attach(&btn1, PRESS_REPEAT, BTN1_PRESS_REPEAT_Handler); button_attach(&btn1, PRESS_REPEAT, BTN1_PRESS_REPEAT_Handler);
button_attach(&btn1, SINGLE_CLICK, BTN1_SINGLE_Click_Handler); button_attach(&btn1, SINGLE_CLICK, BTN1_SINGLE_Click_Handler);
button_attach(&btn1, DOUBLE_CLICK, BTN1_DOUBLE_Click_Handler); button_attach(&btn1, DOUBLE_CLICK, BTN1_DOUBLE_Click_Handler);
button_attach(&btn1, LONG_RRESS_START, BTN1_LONG_RRESS_START_Handler); button_attach(&btn1, LONG_PRESS_START, BTN1_LONG_PRESS_START_Handler);
button_attach(&btn2, LONG_PRESS_HOLD, BTN1_LONG_PRESS_HOLD_Handler); button_attach(&btn2, LONG_PRESS_HOLD, BTN1_LONG_PRESS_HOLD_Handler);
button_start(&btn1); button_start(&btn1);

@ -23,7 +23,7 @@ int main()
button_attach(&btn1, PRESS_REPEAT, BTN1_PRESS_REPEAT_Handler); button_attach(&btn1, PRESS_REPEAT, BTN1_PRESS_REPEAT_Handler);
button_attach(&btn1, SINGLE_CLICK, BTN1_SINGLE_Click_Handler); button_attach(&btn1, SINGLE_CLICK, BTN1_SINGLE_Click_Handler);
button_attach(&btn1, DOUBLE_CLICK, BTN1_DOUBLE_Click_Handler); button_attach(&btn1, DOUBLE_CLICK, BTN1_DOUBLE_Click_Handler);
button_attach(&btn1, LONG_RRESS_START, BTN1_LONG_RRESS_START_Handler); button_attach(&btn1, LONG_PRESS_START, BTN1_LONG_PRESS_START_Handler);
button_attach(&btn1, LONG_PRESS_HOLD, BTN1_LONG_PRESS_HOLD_Handler); button_attach(&btn1, LONG_PRESS_HOLD, BTN1_LONG_PRESS_HOLD_Handler);
button_attach(&btn2, PRESS_DOWN, BTN2_PRESS_DOWN_Handler); button_attach(&btn2, PRESS_DOWN, BTN2_PRESS_DOWN_Handler);
@ -31,7 +31,7 @@ int main()
button_attach(&btn2, PRESS_REPEAT, BTN2_PRESS_REPEAT_Handler); button_attach(&btn2, PRESS_REPEAT, BTN2_PRESS_REPEAT_Handler);
button_attach(&btn2, SINGLE_CLICK, BTN2_SINGLE_Click_Handler); button_attach(&btn2, SINGLE_CLICK, BTN2_SINGLE_Click_Handler);
button_attach(&btn2, DOUBLE_CLICK, BTN2_DOUBLE_Click_Handler); button_attach(&btn2, DOUBLE_CLICK, BTN2_DOUBLE_Click_Handler);
button_attach(&btn2, LONG_RRESS_START, BTN2_LONG_RRESS_START_Handler); button_attach(&btn2, LONG_PRESS_START, BTN2_LONG_PRESS_START_Handler);
button_attach(&btn2, LONG_PRESS_HOLD, BTN2_LONG_PRESS_HOLD_Handler); button_attach(&btn2, LONG_PRESS_HOLD, BTN2_LONG_PRESS_HOLD_Handler);
button_start(&btn1); button_start(&btn1);

@ -93,8 +93,8 @@ void button_handler(struct Button* handle)
handle->state = 2; handle->state = 2;
} else if(handle->ticks > LONG_TICKS) { } else if(handle->ticks > LONG_TICKS) {
handle->event = (uint8_t)LONG_RRESS_START; handle->event = (uint8_t)LONG_PRESS_START;
EVENT_CB(LONG_RRESS_START); EVENT_CB(LONG_PRESS_START);
handle->state = 5; handle->state = 5;
} }
break; break;

@ -24,7 +24,7 @@ typedef enum {
PRESS_REPEAT, PRESS_REPEAT,
SINGLE_CLICK, SINGLE_CLICK,
DOUBLE_CLICK, DOUBLE_CLICK,
LONG_RRESS_START, LONG_PRESS_START,
LONG_PRESS_HOLD, LONG_PRESS_HOLD,
number_of_event, number_of_event,
NONE_PRESS NONE_PRESS

Loading…
Cancel
Save