2022-05-28 02:00:50 +02:00
|
|
|
#ifndef __FT_USER_INPUTS_H
|
|
|
|
#define __FT_USER_INPUTS_H
|
|
|
|
|
|
|
|
#include "events.h"
|
2022-05-29 00:47:46 +02:00
|
|
|
|
2022-05-28 02:00:50 +02:00
|
|
|
#include "stm32g4xx_hal.h"
|
2022-08-17 08:48:09 +02:00
|
|
|
#include "stm32g4xx_hal_gpio.h"
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
GPIO_PinState left;
|
|
|
|
GPIO_PinState right;
|
|
|
|
GPIO_PinState r2d;
|
|
|
|
GPIO_PinState enter;
|
|
|
|
GPIO_PinState enc0a;
|
|
|
|
GPIO_PinState enc0b;
|
|
|
|
GPIO_PinState enc1a;
|
|
|
|
GPIO_PinState enc1b;
|
|
|
|
} ButtonsState;
|
|
|
|
|
|
|
|
ButtonsState get_buttons_state();
|
2022-05-28 02:00:50 +02:00
|
|
|
|
2022-05-29 00:47:46 +02:00
|
|
|
void handle_button_press(const ButtonPressEvent* ev);
|
2022-05-28 02:00:50 +02:00
|
|
|
|
2022-05-29 00:47:46 +02:00
|
|
|
void handle_button_press_mission_select(const ButtonPressEvent* ev);
|
2022-05-28 02:00:50 +02:00
|
|
|
|
2022-05-29 00:47:46 +02:00
|
|
|
#endif // __FT_USER_INPUTS_H
|