/** * @file hv_mw_SystemManager.h * @brief Header file of SystemManager module. * * @verbatim * ============================================================================== * ##### How to use ##### * ============================================================================== * (+) Use hv_mw_SystemManager(...) s a task function handle. * * @endverbatim * * @author HiView SoC Software Team * @version 1.0.0 * @date 2022-08-10 */ #ifndef __SDK_MIDDLEWARE_RUNTIME_SYSTEM_MANAGER_INC_SYSTEM_MANAGER_H__ #define __SDK_MIDDLEWARE_RUNTIME_SYSTEM_MANAGER_INC_SYSTEM_MANAGER_H__ #include "hv_comm_DataType.h" #include "hv_comm_Define.h" #include "hv_vos_Comm.h" typedef struct _SystemManager { HV_VOS_QUEUE_S* xSystemQueue; /*系统主任务接收消息队列,用于接受其他任务、中断发送给System任务的消息*/ HV_VOS_QUEUE_S* xOsdQueue; /*OSD任务接收消息队列,用于接受其他任务、中断发送给OSD任务的消息*/ HV_VOS_QUEUE_S* xEventHubQueue; /*EventHub任务接收消息队列,用于接受其他任务、中断发送给EventHub任务的消息*/ HV_VOS_QUEUE_S* xUrgentQueue; /*Urgent任务接收消息队列,用于接受其他任务、中断发送给Urgent任务的消息*/ #ifdef CONFIG_USER_TYPE_C_ON HV_VOS_QUEUE_S* xTypecQueue; /*Type-c任务接收消息队列,用于接受发送给Type-c任务的消息*/ #endif #ifdef CONFIG_USER_USB_OTA_ON HV_VOS_QUEUE_S* xUsbQueue; /*USB任务接收消息队列,用于接受发送给USB任务的消息*/ #endif HV_VOS_TASK_S* xAmbLightTaskHandle;/*AmbLight任务接收句柄*/ HV_VOS_TASK_S* xUrgentTaskHandle; /*Urgent任务接收句柄*/ HV_VOS_TASK_S* xShellTaskHandle; /*Cli Shell任务接收句柄*/ HV_TIMER_S* pstDatabaseSyncTimer;/*Database and flash data sync timer,同步全局userdata数据到eeprom或者flash*/ }SystemManager; /** * @brief system main init. * @param[in] None. * @return Status, 0-HV_SUCCESS, 1-HV_FAILURE. */ Status Hv_Mw_System_Init( VOID ); /** * @brief create all module task,include eventhubtask systemtask osdtask ...and so on. * @param[in] None. * @return none. */ VOID Hv_Mw_System_TaskCreate( VOID ); /** * @brief create all module Queue,include eventhubQueue OsdQueue systemtaskQueue ...and so on. * @param[in] None. * @return none. */ VOID Hv_Mw_System_AllMessageQueueCreate( VOID ); /** * @brief 返回系统接收消息队列. * @param[in] None. * @return the point of systemQueue. */ HV_VOS_QUEUE_S* Hv_Mw_System_GetSystemQueue( VOID ); /** * @brief 返回OSD接收消息队列. * @param[in] None. * @return the point of OsdQueue. */ HV_VOS_QUEUE_S* Hv_Mw_System_GetOsdQueue( VOID ); #ifdef CONFIG_USER_TYPE_C_ON /** * @brief 返回Type-c接收消息队列. * @param[in] None. * @return the point of TypecQueue. */ HV_VOS_QUEUE_S* Hv_Mw_System_GetTypecQueue( VOID ); #endif #ifdef CONFIG_USER_USB_OTA_ON /** * @brief 返回USB接收消息队列. * @param[in] None. * @return the pointer of UsbQueue. */ HV_VOS_QUEUE_S* Hv_Mw_System_GetUsbQueue( VOID ); #endif /** * @brief 返回EventHub接收消息队列. * @param[in] None. * @return the point of EventHubQueue. */ HV_VOS_QUEUE_S* Hv_Mw_System_GetEventHubQueue( VOID ); /** * @brief 返回Urgent接收消息队列. * @param[in] None. * @return the point of UrgentQueue. */ HV_VOS_QUEUE_S* Hv_Mw_System_GetUrgentQueue( VOID ); /** * @brief SystemTask启动后在for循环前仅运行一次的初始化函数接口. * @param[in] None. * @return none. */ VOID Hv_Mw_System_TaskStartInit( VOID ); /** * @brief SystemTask入口函数. * @param[in] unused. * @return none. */ VOID Hv_Mw_System_TaskHandle( VOID *arg ); /** * @brief Urgent task任务句柄. * @param[in] None. * @return Urgent task任务句柄指针. */ HV_VOS_TASK_S* Hv_Mw_System_UrgentTaskHandle( VOID ); /** * @brief shell task任务句柄. * @param[in] None. * @return shell task任务句柄指针. */ #ifdef HV_SCALER_DEBUG_VERSION HV_VOS_TASK_S* Hv_Mw_System_ShellTaskHandle( VOID ); #endif /** * @brief 系统启动函数,包含任务启动函数,全局中断使能. * @param[in] None. * @return none. */ VOID Hv_Mw_System_TaskAndIrqEnable( VOID ); /** * @brief 设置Database同步定时器启动和停止. * @param[in] bEn. * @return none. */ VOID Hv_Mw_System_SetDatabaseSyncTimerEnable(BOOL bEn); #endif