|
|
|
@ -129,6 +129,8 @@ void button_handler(struct Button* handle)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
handle->state = 0;
|
|
|
|
handle->state = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}else if(handle->ticks > SHORT_TICKS){ // long press up
|
|
|
|
|
|
|
|
handle->state = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
@ -177,6 +179,7 @@ void button_stop(struct Button* handle)
|
|
|
|
if (entry == handle) {
|
|
|
|
if (entry == handle) {
|
|
|
|
*curr = entry->next;
|
|
|
|
*curr = entry->next;
|
|
|
|
// free(entry);
|
|
|
|
// free(entry);
|
|
|
|
|
|
|
|
return;//glacier add 2021-8-18
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
curr = &entry->next;
|
|
|
|
curr = &entry->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|