diff --git a/multi_button.c b/multi_button.c index 1061e68..9dc8f0e 100644 --- a/multi_button.c +++ b/multi_button.c @@ -143,8 +143,8 @@ void button_handler(struct Button* handle) EVENT_CB(LONG_PRESS_HOLD); } else { //releasd - handle->event = (uint8_t)PRESS_UP; - EVENT_CB(PRESS_UP); + handle->event = (uint8_t)LONG_PRESS_CLICK; + EVENT_CB(LONG_PRESS_CLICK); handle->state = 0; //reset } break; diff --git a/multi_button.h b/multi_button.h index b066ade..de100a8 100644 --- a/multi_button.h +++ b/multi_button.h @@ -26,6 +26,7 @@ typedef enum { DOUBLE_CLICK, LONG_PRESS_START, LONG_PRESS_HOLD, + LONG_PRESS_CLICK, number_of_event, NONE_PRESS }PressEvent;