firmware: add current state query command
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user