ubitxv6/menu_utils.h

26 lines
822 B
C
Raw Normal View History

2020-02-10 00:01:52 +00:00
#pragma once
2020-04-26 02:46:36 +00:00
#include "button_grid.h"
2020-02-10 01:04:47 +00:00
#include "menu.h"
2020-02-10 00:01:52 +00:00
2020-02-10 00:16:57 +00:00
//Returns true if button was found, false otherwise
2020-04-26 02:46:36 +00:00
bool findPressedButton(const ButtonGrid_t *const button_grid_P,
2020-02-10 00:16:57 +00:00
Button *const button_out,
2020-02-10 01:04:47 +00:00
const Point touch_point);
enum MorsePlaybackType_e : uint8_t {
PlayChar,
PlayText
};
void initSelector(int16_t *const raw_select_val_in_out,
2020-04-26 02:46:36 +00:00
const ButtonGrid_t *const button_grid_P,
const MorsePlaybackType_e play_type);
2020-02-10 01:04:47 +00:00
void adjustSelector(int16_t *const raw_select_val_in_out,
int16_t knob,
2020-04-26 02:46:36 +00:00
const ButtonGrid_t *const button_grid_P,
const MorsePlaybackType_e play_type);
2020-02-10 05:59:15 +00:00
2020-04-26 02:46:36 +00:00
void endSelector(const int16_t raw_select,
const ButtonGrid_t *const button_grid_P);