[wip] controllers and display
This commit is contained in:
70
firmware/shared_libs/controllers/ctrl_app.h
Normal file
70
firmware/shared_libs/controllers/ctrl_app.h
Normal file
@@ -0,0 +1,70 @@
|
||||
#pragma once
|
||||
|
||||
#include "disp_layout_types.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t frequency;
|
||||
uint16_t amplitude;
|
||||
uint16_t offset;
|
||||
uint16_t phase;
|
||||
uint8_t duty;
|
||||
uint8_t enabled;
|
||||
} GEN_pwm_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t frequency;
|
||||
uint16_t amplitude;
|
||||
uint16_t offset;
|
||||
uint16_t phase;
|
||||
uint8_t wave;
|
||||
uint8_t enabled;
|
||||
uint8_t connected;
|
||||
} GEN_fg_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GEN_FG_TYPE,
|
||||
GEN_PWM_TYPE,
|
||||
GEN_TYPE_MAX
|
||||
} GEN_type_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GEN_type_t gen_type;
|
||||
void *gen;
|
||||
} GENERATOR_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CHANNEL1,
|
||||
CHANNEL2,
|
||||
CHANNEL3,
|
||||
CHANNEL4,
|
||||
CHANNEL5,
|
||||
CHANNEL6,
|
||||
CHANNEL_MAX
|
||||
} GEN_channel_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t freq_focus_digit;
|
||||
uint8_t ampl_focus_digit;
|
||||
uint8_t offs_focus_digit;
|
||||
uint8_t phas_focus_digit;
|
||||
uint8_t duty_focus_digit;
|
||||
|
||||
GEN_type_t gen_type;
|
||||
void *generator;
|
||||
|
||||
GEN_channel_t curr_channel;
|
||||
LAY_state_t curr_layout;
|
||||
uint8_t isChannelChange;
|
||||
uint8_t isGraphChange;
|
||||
uint8_t isValueChange;
|
||||
uint8_t isButtonChange;
|
||||
uint8_t isButtonBlink;
|
||||
uint8_t timer_blink[LAY_BTN_MAX];
|
||||
|
||||
} APP_data_t;
|
||||
Reference in New Issue
Block a user