/**
 * @file hv_comm_Event.h
 * @brief Header file of mute module.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 *
 * @endverbatim
 *
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2022-08-23
 */

#ifndef __SDK_COMMON_EVENT_INC_EVENT_H__
#define __SDK_COMMON_EVENT_INC_EVENT_H__

#include "hv_comm_DataType.h"
#include "hv_comm_Define.h"

#define HV_DPRX_INT_EVENT_MAX_SIZE  20

/*定义必须和PM51中WakeUPType保持一致*/
typedef enum _PowerOnReasonType
{
    POWER_ON_REASON_TYPE_POWER_ON      = 0,
    POWER_ON_REASON_TYPE_HDMI_CABLE    = 1,
    POWER_ON_REASON_TYPE_DP_CABLE      = 2,
    POWER_ON_REASON_TYPE_TYPE_C_CABLE  = 3,

    POWER_ON_REASON_UP_TYPE_HDMI_TMDS  = 4,
    POWER_ON_REASON_UP_TYPE_HDMI_CEC   = 5,
    POWER_ON_REASON_TYPE_DP_AUX        = 6,
    POWER_ON_REASON_TYPE_TYPE_C_CC_CMD = 7,

    POWER_ON_REASON_TYPE_KEY           = 8,
    POWER_ON_REASON_TYPE_IR            = 9,
    POWER_ON_REASON_DP_GPIO            = 10,

    POWER_ON_REASON_TYPE_POWER_OFF     = 11,
}PowerOnReasonType;

typedef enum _PowerEventId
{
    POWER_EVENT_ID_ON_FIRST_ENTER_STATE      = 0,   /*第一次切换到新状态的辅助事件，状态机自动添加，可以处理也可以忽略*/
    POWER_EVENT_ID_POWER_ON                  = 1,   /*上电启动的eventhub从51传到system的上电消息，携带上电原因，如果是typec唤醒则等待TYPEC解析出具体的上电原因*/
    POWER_EVENT_ID_APP_TIME_OUT_OR_NO_SIGNAL = 2,   /*无信号待机或者OSD APP定时器超时待机*/
    POWER_EVENT_ID_SIGNAL_NORMAL             = 3,   /*在待机状态下突然接收到了信号，退出待机事件*/
    POWER_EVENT_ID_POWER_OFF_KEY             = 4,   /*按电源Key，产生的关机事件*/
    POWER_EVENT_ID_STSTEM_STANDBY_READY      = 5,   /*系统已准备好，可以进入待机 或关机*/
#ifdef CONFIG_USER_TYPE_C_ON     
    POWER_EVENT_ID_TYPE_C_DETAIL_PD_DONE     = 6,   /*typec唤醒则等待TYPEC解析出具体的上电原因--充电*/
    POWER_EVENT_ID_TYPE_C_DETAIL_VDM_DONE    = 7,   /*typec唤醒则等待TYPEC解析出具体的上电原因--DP模式*/
    POWER_EVENT_ID_TYPE_C_PLUG_OUT           = 8,   /*TypeC拔出事件*/
#endif    
    POWER_EVENT_ID_INVALID                   = 9,
}PowerEventId;
/***********************SettingParamId define begin************************************************/
typedef enum _SettingParamId
{
    SETTING_PARAM_ID_BRIGHTNESS                         = 0,
    SETTING_PARAM_ID_CONTRAST                           = 1,
    SETTING_PARAM_ID_SHARPNESS                          = 2,
    SETTING_PARAM_ID_COLOR_TEMPERATURE                  = 3,
    SETTING_PARAM_ID_HDR_SWITCH                         = 4,
    SETTING_PARAM_ID_ASPECT_RATIO                       = 5,
    SETTING_PARAM_ID_PXP_CONFIG                         = 6,
    SETTING_PARAM_ID_HDMI_VER                           = 7,
    SETTING_PARAM_ID_DP_VER                             = 8,
    SETTING_PARAM_ID_MAIN_SOURCE                        = 9,
    SETTING_PARAM_ID_SUB_SOURCE                         = 10,
    SETTING_PARAM_ID_PXP_AUDIO_SOURCE                   = 11,
    SETTING_PARAM_ID_VOLUME                             = 12,
    SETTING_PARAM_ID_AUDIO_TIME_DELAY                   = 13,
    SETTING_PARAM_ID_FREE_SYNC_SWITCH                   = 14,
    SETTING_PARAM_ID_DATA_PATH_RECONFIG                 = 15,
    SETTING_PARAM_ID_PIP_SUB_WINDOW_POSITION_RECONFIG   = 16,
    SETTING_PARAM_ID_PIP_SUB_WINDOW_SIZE_RECONFIG       = 17,
    SETTING_PARAM_ID_VIDEO_AUTO_SELECT_SOURCE_SWITCH    = 18,
    SETTING_PARAM_ID_MAGNIFY_GLASS_SWITCH               = 19,
    SETTING_PARAM_ID_MAGNIFY_GLASS_SET_RATIO            = 20,
    SETTING_PARAM_ID_MAGNIFY_GLASS_SET_POS              = 21,
    SETTING_PARAM_ID_MAGNIFY_GLASS_SET_SIZE             = 22,

    SETTING_PARAM_ID_HUE_BY_R                           = 23,
    SETTING_PARAM_ID_HUE_BY_G                           = 24,
    SETTING_PARAM_ID_HUE_BY_B                           = 25,
    SETTING_PARAM_ID_HUE_BY_C                           = 26,
    SETTING_PARAM_ID_HUE_BY_M                           = 27,
    SETTING_PARAM_ID_HUE_BY_Y                           = 28,
    SETTING_PARAM_ID_SAT_BY_R                           = 29,
    SETTING_PARAM_ID_SAT_BY_G                           = 30,
    SETTING_PARAM_ID_SAT_BY_B                           = 31,
    SETTING_PARAM_ID_SAT_BY_C                           = 32,
    SETTING_PARAM_ID_SAT_BY_M                           = 33,
    SETTING_PARAM_ID_SAT_BY_Y                           = 34,
    SETTING_PARAM_ID_LUM_BY_R                           = 35,
    SETTING_PARAM_ID_LUM_BY_G                           = 36,
    SETTING_PARAM_ID_LUM_BY_B                           = 37,
    SETTING_PARAM_ID_LUM_BY_C                           = 38,
    SETTING_PARAM_ID_LUM_BY_M                           = 39,
    SETTING_PARAM_ID_LUM_BY_Y                           = 40,

    SETTING_PARAM_ID_MAIN_OR_SUB_SOURCE_SWAP            = 41,
    SETTING_PARAM_ID_VIDEO_HFLIP                        = 42,
    SETTING_PARAM_ID_VIDEO_VFLIP                        = 43,
    SETTING_PARAM_ID_AUTO_UPDATE_EDID_WHILE_SEARCH_SRC  = 44,

    SETTING_PARAM_ID_INP_PATTERN_FRAME_RATE             = 45,
    SETTING_PARAM_ID_MAIN_MONTAGE                       = 46,
    SETTING_PARAM_ID_MAIN_OVER_SCAN                     = 47,
    SETTING_PARAM_ID_BRIGHT_FRAME                       = 48,
    SETTING_PARAM_ID_PRO_ESPORT_SWITCH                  = 49,
}SettingParamId;
/***********************SettingParamId define end************************************************/


/***********************SystemEvent define begin************************************************/
typedef enum _SystemRevEventType
{
    SYSTEM_REV_EVENT_TYPE_POWER        = 0,
    SYSTEM_REV_EVENT_TYPE_OSD_SETTING  = 1,
    SYSTEM_REV_EVENT_TYPE_CHANNEL      = 2,
    SYSTEM_REV_EVENT_TYPE_INPUTPORT    = 3,
    SYSTEM_REV_EVENT_TYPE_PANEL        = 4,
    SYSTEM_REV_EVENT_TYPE_TIMER        = 5,
    SYSTEM_REV_EVENT_TYPE_DDCCI        = 6,
}SystemRevEventType;

typedef struct _SystemEvent
{
    SystemRevEventType  enEventType;
    USHORT16            usEventId;
    UCHAR8              ucPortIndex;
    UCHAR8              ucChannelType;
    UINT32              uiValue;
    UCHAR8*             buffer;
}__attribute__((aligned(4)))SystemEvent;

/***********************SystemEvent define end************************************************/

/***********************Channel define begin*********************************************/
typedef enum _ChanelEventId
{
    CHANNEL_EVENT_ID_ON_FIRST_ENTER_STATE           = 0,
    CHANNEL_EVENT_ID_START                          = 1,
    CHANNEL_EVENT_ID_PERIOD_SEARCH_TIME_OUT         = 2,
    CHANNEL_EVENT_ID_CONFIG_CHECK_AV_STABLE         = 3,

    /* ---------InputPort ==> Channel Begin--------- */
    CHANNEL_EVENT_ID_TIMING_CHANGE                  = 4,
    CHANNEL_EVENT_ID_COLOR_CHANGE                   = 5,
    CHANNEL_EVENT_ID_SIGNAL_LOSS                    = 6,
    CHANNEL_EVENT_ID_PLUG_OUT                       = 7,
    CHANNEL_EVENT_ID_TIMING_STABLE                  = 8,

    /* Only Used for AMD, NVIDA, And HF-VRR. */
    CHANNEL_EVENT_ID_RCV_VRR_INFO                   = 9,
    /* HF-VSI 中携带的ALLM更改时候通知 ;
       uiValue == 1 表示进入ALLM模式 ;
       uiValue == 0 表示退出ALLM模式 ;
       自动低延时模式；
    */
    CHANNEL_EVENT_ID_ALLM_MODE_CHANGE               = 10,
    /* Value is xType, 0 表示关闭HDR，非0表示开启HDR */
    CHANNEL_EVENT_ID_HDR_CHANGED                    = 11,
    /* ---------InputPort ==> Channel End--------- */
    CHANNEL_EVENT_ID_PXP_ENABLE                     = 12,
    CHANNEL_EVENT_ID_PXP_DISABLE                    = 13,
    CHANNEL_EVENT_ID_SUB_PXP_DISABLE                = 14,
    CHANNEL_EVENT_ID_MAGNIFY_ENABLE                 = 15,
    CHANNEL_EVENT_ID_MAGNIFY_DISABLE                = 16,
    CHANNEL_EVENT_ID_SUB_MAGNIFY_DISABLE            = 17,
    CHANNEL_EVENT_ID_HDR_SWITCH                     = 18,
    CHANNEL_EVENT_ID_DATA_PATH_RECONFIG             = 19,
    CHANNEL_EVENT_ID_NO_SIGNAL_CHECK_TIMER          = 20,
    CHANNEL_EVENT_ID_MUTE_STATE_NORMAL              = 21,
    CHANNEL_EVENT_ID_MUTE_CHECK_TIMER_OUT           = 22,
    CHANNEL_EVENT_ID_AUDIO_MUTE_STATE_CHANGE        = 23,
    CHANNEL_EVENT_ID_AUDIO_MUTE_CHECK_TIMER_OUT     = 24,
    CHANNEL_EVENT_ID_SET_ASPECT_RATIO               = 25,
    CHANNEL_EVENT_ID_RESELECT_VIDEO_SRC             = 26,
    CHANNEL_EVENT_ID_MAIN_SUB_SOURCE_SWAP           = 27,
    CHANNEL_EVENT_ID_BURN_IN_PERIOD_CHECK_TIMER     = 28,

    CHANNEL_EVENT_ID_FREE_SYNC_SWITCH               = 29,
    CHANNEL_EVENT_ID_MUTE_STATE_ABNORMAL            = 30,

    CHANNEL_EVENT_ID_AUDIO_FS_CHANGE                = 31,
    CHANNEL_EVENT_ID_AV_WATCHDOG                    = 32,
    CHANNEL_EVENT_ID_NO_SIGNAL_TO_SEARCH            = 33,
    CHANNEL_EVENT_ID_PRO_ESPORT_SWITCH              = 34,
}ChanelEventId;

typedef struct _ChannelEvent
{
    USHORT16            usEventId;
    USHORT16            usValue;    /*RX 给DPU发送消息portindex赋值给value,为了减少Queue占用RAM资源，复用了value*/
    ChannelType         enChannelType;
}__attribute__((aligned(4)))ChannelEvent;
/***********************ChannelEvent define end*********************************************/

/***********************InputPortEvent define begin*********************************************/
typedef struct
{
    UCHAR8   ucSize;
    USHORT16 usEventList[HV_DPRX_INT_EVENT_MAX_SIZE];
}__attribute__((aligned(4)))DpRxIntEventList;

typedef enum _InputPortEventId
{
    /*HDMI start*/
    InputPortEventId_HDMI_IdleStart           = 0,
    InputPortEventId_HDMI_OnFirstEnterState   = 1,
    InputPortEventId_HDMI_VersionChange       = 2,
    InputPortEventId_HDMI_IntGen              = 3,
    InputPortEventId_HDMI_EnteredDispaly      = 4,
    InputPortEventId_HDMI_ExitDisplay         = 5,
    InputPortEventId_HDMI_HpdSetLow           = 6,
    
    InputPortEventId_HDMI_PllChange           = 7,
    InputPortEventId_HDMI_ClockStable         = 8,
    InputPortEventId_HDMI_ClockUnStable       = 9,
    InputPortEventId_HDMI_5VPlugIn            = 10,
    InputPortEventId_HDMI_5VPlugOut           = 11,
    InputPortEventId_HDMI_HpdSetHigh          = 12,
    InputPortEventId_HDMI_TimingChange        = 13,
    InputPortEventId_HDMI_TimingStable        = 14,
    InputPortEventId_HDMI_CDOrCFOrVICChange   = 15,
    InputPortEventId_HDMI_RatioChange         = 16,
    InputPortEventId_HDMI_RRChange            = 17,
    InputPortEventId_HDMI_CECRecvData         = 18,
    InputPortEventId_HDMI_FRLRateChange       = 19,
    InputPortEventId_HDMI_GCPAVMutePacket     = 20,
    InputPortEventId_HDMI_AudioPacketChange   = 21,
    InputPortEventId_HDMI_AVIPacketChange     = 22,
    InputPortEventId_HDMI_VSIPacketRcv        = 23,
    InputPortEventId_HDMI_VSIPacketChange     = 24,
    InputPortEventId_HDMI_DRMPacketChange     = 25,
    InputPortEventId_HDMI_DRMPacketRCV        = 26,
    InputPortEventId_HDMI_AudioResetFifo      = 27,
    InputPortEventId_HDMI_AudioCTSOrNChang    = 28,
    InputPortEventId_HDMI_AudioStable         = 29,
    InputPortEventId_HDMI_DecodeError         = 30,
    InputPortEventId_HDMI_SPDChsChanged       = 31,
    InputPortEventId_HDMI_SPDRcved            = 32,
    InPutPortEventId_HDMI_VRRSwitch           = 33,    /* Value 0: Close, Value 1: Open, used for Update EDID for VRR */
    InputPortEventId_HDMI_EdidUpdateDone      = 34,    /* Value 0: update Failed, 1: update success */
    InputPortEventId_HDMI_PDNewEntry          = 35,
    InputPortEventId_HDMI_PDUnderOverFlow     = 36,
    InputPortEventId_HDMI_PhyConf             = 37,
    InputPortEventId_HDMI_StandbyDDC          = 38,
    InputPortEventId_HDMI_EMPPacketRcv        = 39,
    InputPortEventId_HDMI_PktErrForHdcp       = 40,
    InputPortEventId_HDMI_GcpCDChg            = 41,
    InputPortEventId_HDMI_FastLocked          = 42,
    InputPortEventId_HDMI_TrainDone           = 43,
    InputPortEventId_HDMI_AudioFifoStart      = 44,
    InputPortEventId_HDMI_Max                 = 45,
    //InputPortEventId_HDMI_Max                 = 48,
    /*HDMI end*/

    /*DP start*/
    InputPortEventId_DP_IdleStart             = 81,
    InputPortEventId_DP_OnFirstEnterState     = 82,
    InputPortEventId_DP_Interrupt             = 83,
    InputPortEventId_DP_CableDisconnect       = 84,
    InputPortEventId_DP_CableConnect          = 85,
    InputPortEventId_DP_TrainingDone          = 86,
    InputPortEventId_DP_TrainingFail          = 87,
    InputPortEventId_DP_VideoStream           = 88,
    InputPortEventId_DP_TimingChange          = 89,
    InputPortEventId_DP_ColorChange           = 90,
    InputPortEventId_DP_HdrChange             = 91,
    InputPortEventId_DP_SdpRecv               = 92,
    InputPortEventId_DP_VsyncEvent            = 93,
    InputPortEventId_DP_VbIdAudioMuteFlag     = 94,
    InputPortEventId_DP_TimerOut              = 95,
    InputPortEventId_DP_UpdateEdid            = 96,
    InputPortEventId_DP_VersionChange         = 97,
    InPutPortEventId_DP_VrrSwitch             = 98, /* Value 0: Close, Value 1: Open, used for Update EDID for VRR */
    InputPortEventId_DP_Mccs                  = 99,
    InputPortEventId_DP_CableInt              = 100,
    InputPortEventId_DP_VrrChange             = 101,
    InputPortEventId_DP_AdaptiveSyncStart     = 102,
    InputPortEventId_DP_AdaptiveSyncEnd       = 103,
    InputPortEventId_DP_Sdp2DepthThro         = 104,
    InputPortEventId_DP_WriteTimingIgnore     = 105,
    InputPortEventId_DP_WakeUp                = 106,
    InputPortEventId_DP_AudioMuteChg          = 107,
    InputPortEventId_DP_AudioStart            = 108,
    InputPortEventId_DP_MAX,
    /*DP end*/
    InputPortEventId_HDCP_IntGen              = 200
    
}InputPortEventId;
/***********************InputPortEvent define end*********************************************/

/***********************OsdEvent define begin************************************************/
typedef enum _OsdEventId
{
    OSD_EVENT_KEY_PRESS,
    OSD_EVENT_KEY_HOLD,
    OSD_EVENT_KEY_RELEASE,
    OSD_EVENT_KEY_DOUBLE_CLICK,
    OSD_EVENT_IR_KEY,
    OSD_EVENT_IR_REPEAT_KEY,
    OSD_EVENT_KEY_MAX,
    OSD_EVENT_SHOW_LOGO = OSD_EVENT_KEY_MAX,
    OSD_EVENT_POWER_ON,
    OSD_EVENT_POWER_OFF,
    OSD_EVENT_POWER_STANDBY,
    OSD_EVENT_LOCK,
    OSD_EVENT_SIGNAL_READY,
    OSD_EVENT_SIGNAL_STATE_CHANGE,
    OSD_EVENT_SIGNAL_PARAM_CHANGE,
    OSD_EVENT_SIGNAL_TIMING_NOT_SUPPORT,
    OSD_EVENT_SIGNAL_PLUG_IN,
    OSD_EVENT_SIGNAL_PLUG_OUT,
    OSD_EVENT_SYNC,
    OSD_EVENT_ANIMITION,
    OSD_EVENT_MCCS,
    OSD_EVENT_FACTORY_ENTER,
    OSD_EVENT_FACTORY_EXIT,
    OSD_EVENT_FACTORY_AGING_REFRESH,
    OSD_EVENT_FACTORY_AGING_EXIT,
    OSD_EVENT_USB_OTA,
    OSD_EVENT_HIDE_ALL,
    OSD_EVENT_TEST,
    OSD_EVENT_CUSTOM1,
    OSD_EVENT_CUSTOM2,
    OSD_EVENT_CUSTOM3,
    OSD_EVENT_MAX,
} OsdEventId;

/***********************DDCCI Event define begin************************************************/
typedef enum _DDCCIEventId
{
    DDCCI_EVENT_RCV,   /* Host --> Monitor */
    DDCCI_EVENT_SND,   /* Monitor --> Host */
    DDCCIEVENT_MAX,
} DDCCIEventId;

typedef enum _OsdEvtKeyValue
{
    OSDEVT_KEY_UP,
    OSDEVT_KEY_DOWN,
    OSDEVT_KEY_LEFT,
    OSDEVT_KEY_RIGHT,
    OSDEVT_KEY_ENTER,
    OSDEVT_KEY_EXIT,
    OSDEVT_KEY_POWER,
    OSDEVT_KEY_HOTKEY1,
    OSDEVT_KEY_HOTKEY2,
    OSDEVT_KEY_HOTKEY3,
    OSDEVT_KEY_CUSTOM1,
    OSDEVT_KEY_CUSTOM2,
    OSDEVT_KEY_CUSTOM3,
    OSDEVT_KEY_CUSTOM4,
    OSDEVT_KEY_CUSTOM5,
    OSDEVT_KEY_NONE,
    OSDEVT_KEY_MAX = OSDEVT_KEY_NONE,
} OsdEvtKeyValue;

typedef struct _OsdEvent
{
    USHORT16           usEventId;
    USHORT16           usValue;
} __attribute__((aligned(4)))OsdEvent;
/***********************OsdEvent define end************************************************/

/***********************Event define begin************************************************/
typedef USHORT16 EventId;

typedef enum _EventHubRevMsgId
{
    EVENT_HUB_REV_MSG_ID_ENTER_STANDBY,
    EVENT_HUB_REV_MSG_ID_ENTER_POWEROFF,
    EVENT_HUB_REV_MSG_ID_BOOTUP_TOPM,
    EVENT_HUB_REV_MSG_ID_PMLED_OFF,
    EVENT_HUB_REV_MSG_ID_PMLED_ON,
    EVENT_HUB_REV_MSG_ID_PMLED_BREATH,
    EVENT_HUB_REV_MSG_ID_PMLED_ON1,
    EVENT_HUB_REV_MSG_ID_PMLED_ON2,
    EVENT_HUB_REV_MSG_ID_PMLED_ON3,

    EventHubRevMsgId_Max,
}EventHubRevMsgId;

typedef struct _Event
{
    EventId            usEventId;
    USHORT16           usValue;
}__attribute__((aligned(4)))Event;
/***********************Event define end************************************************/

/***********************Urgent Event define begin************************************************/
typedef struct _HdcpRxEvent
{
    LinkPortIndex       enPortIndex;
    UINT32              uiHdcpRxEvt;
    UINT32              uiPortMask;
}__attribute__((aligned(4)))HdcpRxEvent;

typedef enum _UrgentRevEventType
{
    URGENT_REV_EVENT_TYPE_HDCP_HDMI,
    URGENT_REV_EVENT_TYPE_HDCP_DP,
    URGENT_REV_EVENT_TYPE_CONTRAST,
    URGENT_REV_EVENT_TYPE_LDC
}UrgentRevEventType;

typedef struct _UrgentEvent
{
    UrgentRevEventType  enEventType;
    USHORT16            usEventId;
    USHORT16            usPortIndex;
    UINT32              uiValue;
    UCHAR8*             ucbuffer;
}__attribute__((aligned(4)))UrgentEvent;

/***********************hdcp Event define end************************************************/

/***********************InputPortEvent Event define begin************************************************/
typedef struct _InputPortEvent
{
    LinkPortIndex       enPortIndex;
    USHORT16            usEventId;
    UCHAR8*             buffer;
}__attribute__((aligned(4)))InputPortEvent;
/***********************InputPortEvent Event define begin************************************************/

/***********************Panel Event define begin************************************************/
typedef struct _PanelEvent
{
    USHORT16            usEventId;
    USHORT16            usValue;
}__attribute__((aligned(4)))PanelEvent;

typedef enum _PanelEventId
{
    PANEL_EVENT_ID_PANEL_POWER_ON         = 0,  /* Panel开始上电 */
    PANEL_EVENT_ID_TRAINING_START         = 1,  /* Panel上电完成，开始training*/
    PANEL_EVENT_ID_BLK_ON                 = 2,  /* 开始传输有效数据，背光上电 */
    PANEL_EVENT_ID_IDLE_PATTERN           = 3,  /* 开始发送IDLE pattern*/
    PANEL_EVENT_ID_BLK_OFF                = 4,  /* 关闭背光*/
    PANEL_EVENT_ID_DATA_OFF               = 5,  /* 关闭数据*/
    PANEL_EVENT_ID_POWER_OFF              = 6,  /* Panel断电*/
    PANEL_EVENT_ID_CHECK_TRAINING_STATUS  = 7,  /* 等待panel training ok*/
    PANEL_EVENT_ID_EDP_BACK_LIGHT         = 8,  /* EDP_BACK_LIGHT*/
    PANEL_EVENT_ID_SPI_BACK_LIGHT         = 9,  /* SPI_BACK_LIGHT*/
    PANEL_EVENT_ID_ON_FIRST_ENTER_STATE   = 10,
}PanelEventId;

/***********************Panel Event define end************************************************/

/***********************TypecEvent define begin************************************************/

#ifdef CONFIG_USER_TYPE_C_ON
typedef enum _TypecEventId
{
    TYPEC_EVENT_GO,
    TYPEC_EVENT_REPLUG,
    TYPEC_EVENT_STOP,
    TYPEC_EVENT_MAX,
} TypecEventId;

typedef struct _TypecEvent
{
    USHORT16           usEventId;
    USHORT16           usValue;
} __attribute__((aligned(4)))TypecEvent;
#endif

/***********************Typec Event define end************************************************/


/***********************USB Event define begin************************************************/

#if (defined(CONFIG_USER_USB_OTA_ON) || defined(CONFIG_USER_USB_BILLBOARD_ON) || defined(CONFIG_USER_USB_HID_ON))
typedef enum _UsbEventId
{
    USB_EVENT_DETECT_PORT               = 0,    //触发端口检测，预留
    USB_EVENT_NORMAL_UPGRADE            = 1,    //启动交互式升级
    USB_EVENT_UPGRADE_CONFIRM           = 2,    //用户“确认”要执行升级
    USB_EVENT_UPGRADE_CANCEL            = 3,    //用户“取消”升级
    USB_EVENT_FORCE_UPGRADE             = 4,    //启动强制升级，收到这个消息则检测U盘并在发现文件后自动更新
    USB_EVENT_FIND_FILE                 = 5,
    USB_EVENT_START_BILLBOARD           = 6,
    USB_EVENT_FULL_BIN_UPGRADE          = 7,    //触发将bin文件完整写入flash的流程，会全擦flash
    USB_EVENT_FULL_BIN_UPGRADE_CONFIRM  = 8,
    USB_EVENT_MAX,
} UsbEventId;

typedef struct _UsbEvent
{
    USHORT16           usEventId;
    USHORT16           usValue;
} __attribute__((aligned(4)))UsbEvent;
#endif

/***********************USB OTA Event define end************************************************/


#endif
