#pragma once

#define FUN_GEN_FOCUS_MAX 6U
#define PWM_GEN_FOCUS_MAX 4U
#define MAX_FREQ 1000000U
#define MAX_VOLT_POS 360
#define MAX_VOLT_NEG 0
#define MAX_PHAS 360
#define MAX_DUTY 100

typedef enum
{
    FALSE,
    TRUE
} bool_t;

typedef enum
{
    GEN_FG_TYPE,
    GEN_PWM_TYPE,
    GEN_TYPE_MAX
} GEN_type_t;

typedef enum
{
    DDS_CH1,
    DDS_CH2,
    DDS_CH3,
    DDS_CH_MAX,
} DDS_channel_t;

typedef enum
{
    PWM_CH1,
    PWM_CH2,
    PWM_CH3,
    PWM_CH_MAX,
} PWM_channel_t;

typedef enum
{
    CHANNEL1,
    CHANNEL2,
    CHANNEL3,
    CHANNEL4,
    CHANNEL5,
    CHANNEL6,
    CHANNEL_MAX
} GEN_channel_t;

typedef enum
{
    GEN_SIN,
    GEN_TRI,
    GEN_SQR,
    GEN_WAVE_MAX,
} GEN_wave_t;

typedef enum
{
    LAY_MAIN,
    LAY_FREQ,
    LAY_AMPL,
    LAY_OFFS,
    LAY_PHAS,
    LAY_DUTY,
    LAY_WAVE,
    LAY_STATE_MAX
} STATE_layout_t;

typedef enum
{
    BTN_MAIN_FG,
    BTN_MAIN_PWM,
    BTN_FREQ,
    BTN_FREQ_MIN,
    BTN_FREQ_MAX,
    BTN_AMPL,
    BTN_OFFS,
    BTN_PHAS,
    BTN_DUTY,
    BTN_WAVE,
    BTN_STATE_MAX
} STATE_button_t;

typedef enum
{
    DISP_BTN_1,
    DISP_BTN_2,
    DISP_BTN_3,
    DISP_BTN_4,
    DISP_BTN_5,
    DISP_BTN_MAX,
} LAY_dispBtn_t;

typedef enum
{
    UPDATE_CHANNEL = 1,
    UPDATE_GRAPH = 2,
    UPDATE_VALUE = 4,
    UPDATE_BUTTON = 8,
    UPDATE_ALL = 15,
} LAY_update_t;

typedef enum
{
    FREQ_LINK1 = 1,
    FREQ_LINK2 = 2,
    AMPL_LINK1 = 4,
    AMPL_LINK2 = 8,
    OFFS_LINK1 = 16,
    OFFS_LINK2 = 32,
    PHAS_LINK1 = 64,
    PHAS_LINK2 = 128,
} GEN_linkMask_t;

typedef enum
{
    MCU_CS1,
    MCU_CS2,
    MCU_CS3,
    MCU_CS4,
    MCU_CS_MAX,
} MCU_cs_count_t;