|
|
@@ -31,7 +31,7 @@ static struct button* head_handle = NULL;
|
|
|
*/
|
|
|
void button_init(struct button* handle, uint8_t(*pin_level)(void), uint8_t active_level)
|
|
|
{
|
|
|
- memset(handle, sizeof(struct button), 0);
|
|
|
+ memset(handle, 0, sizeof(struct button));
|
|
|
handle->event = (uint8_t)NONE_PRESS;
|
|
|
handle->hal_button_Level = pin_level;
|
|
|
handle->button_level = handle->hal_button_Level();
|