UP 优化key库

This commit is contained in:
JiXieShi
2024-06-23 14:14:35 +08:00
parent 8bf40f0d9c
commit 58afcd9d81
3 changed files with 16 additions and 21 deletions

View File

@@ -77,21 +77,14 @@ void Get_Key(void *pVoid) {
key_init(&k6, SIM_Key_SET, 1, SIM_KEY_SET);
key_init(&k7, SIM_Key_RESET, 1, SIM_KEY_RESET);
key_attach(&k1, KEY_ALL_EVENT, Key_Call_E);
key_attach(&k2, KEY_ALL_EVENT, Key_Call_E);
key_attach(&k3, KEY_ALL_EVENT, Key_Call_E);
key_attach(&k4, KEY_ALL_EVENT, Key_Call_E);
key_attach(&k5, KEY_ALL_EVENT, Key_Call_E);
key_attach(&k6, KEY_ALL_EVENT, Key_Call_E);
key_attach(&k7, KEY_ALL_EVENT, Key_Call_E);
key_attach(&k1, KEY_ALL_EVENT, Key_Call_E, true);
key_attach(&k2, KEY_ALL_EVENT, Key_Call_E, true);
key_attach(&k3, KEY_ALL_EVENT, Key_Call_E, true);
key_attach(&k4, KEY_ALL_EVENT, Key_Call_E, true);
key_attach(&k5, KEY_ALL_EVENT, Key_Call_E, true);
key_attach(&k6, KEY_ALL_EVENT, Key_Call_E, true);
key_attach(&k7, KEY_ALL_EVENT, Key_Call_E, true);
key_start(&k1);
key_start(&k2);
key_start(&k3);
key_start(&k4);
key_start(&k5);
key_start(&k6);
key_start(&k7);
while (1) {
// 每5ms调用一次key_ticks函数
key_ticks();