/*
 * Copyright 2017-2024 Oleg Borodin <onborodin@gmail.com>
 */

#ifndef BUTTON_H_QWERTY
#define BUTTON_H_QWERTY


typedef struct {
    bool was_pressed;
    bool strokes_ended;
    uint16_t time_counter;
    uint16_t released_time;
    uint8_t push_counter;
} button_t;

extern button_t button;

void button_init(void);
void button_reset(void);
bool button_is_pressed(void);
void button_handle(void);
uint8_t button_get(void);

#endif
