firmware: add current state query command

This commit is contained in:
2019-10-22 09:21:27 +02:00
parent 6bf50707c4
commit aba0476bbe
3 changed files with 46 additions and 16 deletions

View File

@@ -37,7 +37,20 @@ extern "C" {
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
struct ui_state {
uint8_t oldchannel;
enum {
UI_STATE_NORMAL = 0,
UI_STATE_MUTE,
UI_STATE_SHORT,
} state;
uint8_t gain;
uint8_t bboost, tboost;
uint8_t latt, ratt;
};
extern struct ui_state ui_state; // global ui state
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
@@ -54,6 +67,7 @@ extern "C" {
void Error_Handler(void);
void set_input(uint8_t channel);
int get_input();
void set_attenuation(uint8_t left, uint8_t right);
void set_mute(uint8_t mute); //< tries to switch to muted ui state
int is_muted(); //< returns whether the ui is muted