1. 更新文档
2. 修正KEEPALIVE计数未清空问题
This commit is contained in:
@@ -215,7 +215,7 @@ while (1)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
具体可以参考`example_win32.c`和`test.c`的实现。
|
具体可以参考`example_user.c`和`example_test.c`的实现。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -659,7 +659,7 @@ int ebtn_is_in_process(void);
|
|||||||
|
|
||||||
而当按下保持时间大于`time_click_pressed_max`时,就不会上报`ONCLICK`事件,如下图所示。
|
而当按下保持时间大于`time_click_pressed_max`时,就不会上报`ONCLICK`事件,如下图所示。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
README.vsdx
BIN
README.vsdx
Binary file not shown.
@@ -62,14 +62,14 @@ static void prv_process_btn(ebtn_btn_t *btn, uint8_t old_state, uint8_t new_stat
|
|||||||
btn->click_cnt = 0;
|
btn->click_cnt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start with new on-press */
|
|
||||||
btn->flags |= EBTN_FLAG_ONPRESS_SENT;
|
|
||||||
ebtobj->evt_fn(btn, EBTN_EVT_ONPRESS);
|
|
||||||
|
|
||||||
/* Set keep alive time */
|
/* Set keep alive time */
|
||||||
btn->keepalive_last_time = mstime;
|
btn->keepalive_last_time = mstime;
|
||||||
btn->keepalive_cnt = 0;
|
btn->keepalive_cnt = 0;
|
||||||
|
|
||||||
|
/* Start with new on-press */
|
||||||
|
btn->flags |= EBTN_FLAG_ONPRESS_SENT;
|
||||||
|
ebtobj->evt_fn(btn, EBTN_EVT_ONPRESS);
|
||||||
|
|
||||||
btn->time_change = mstime; /* Button state has now changed */
|
btn->time_change = mstime; /* Button state has now changed */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user