/* Motenpoche 
 *
 * (c) 2023 Daniele Lacamera <root@danielinux.net>
 *
 *
 * Motenpoche is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Motenpoche is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
 *
 */
#ifndef UI_H_INCLUDED
#define UI_H_INCLUDED
#include "hardware/i2c.h"
#include "fsm.h"

#define UI_EV_SCROLL_UP     (1 << 0)
#define UI_EV_SCROLL_DN     (1 << 1)
#define UI_EV_KEY_PRESS     (1 << 2)
#define UI_EV_BUTTON_OK     (1 << 3)
#define UI_EV_BUTTON_BACK   (1 << 4)


void ui_init(i2c_inst_t *i2c);
void ui_task(void);
void ui_event_cb(enum vault_state old_st, enum vault_state st);
void ui_event(uint32_t ev);
void ui_key_button(void);

void ui_back_button(void);

void ui_confirm_button(void);
void ui_rot_up(void);

void ui_rot_down(void);


#endif
