工程提交
This commit is contained in:
59
Core/User/Global/g_runtime.h
Normal file
59
Core/User/Global/g_runtime.h
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
#ifndef __GRUNTIME_H
|
||||
#define __GRUNTIME_H
|
||||
|
||||
|
||||
/* includes ----------------------------------------------------------------------------------------------*/
|
||||
#include "global.h"
|
||||
|
||||
|
||||
|
||||
/* macro ------------------------------------------------------------------------------------------------*/
|
||||
#define Task_combined 8
|
||||
|
||||
|
||||
|
||||
|
||||
/* struct ------------------------------------------------------------------------------------------------*/
|
||||
typedef struct TaskRunTime
|
||||
{
|
||||
uint32_t threads_runtime; // 运行时间
|
||||
uint32_t threads_counter; // 任务计数
|
||||
uint32_t threads_freestack; // 剩余栈空间
|
||||
|
||||
} TaskRunTime;
|
||||
|
||||
|
||||
|
||||
enum Task_ID
|
||||
{
|
||||
HeartBeatTaskID = 0,
|
||||
DownLinkTaskID,
|
||||
UPLinkTaskID,
|
||||
YkcTaskID,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef struct TaskRunTimeTypeDef
|
||||
{
|
||||
TaskRunTime HeartBeatTask;
|
||||
TaskRunTime DownLinkTask;
|
||||
TaskRunTime UPLinkTask;
|
||||
TaskRunTime YkcTask;
|
||||
|
||||
} TaskRunTimeTypeDef;
|
||||
|
||||
|
||||
|
||||
/* Exported functions prototypes ------------------------------------------------------------------------*/
|
||||
uint32_t GetTask_RunTime(uint8_t taskID);
|
||||
uint32_t GetTask_Beatcnt(uint8_t taskID);
|
||||
uint32_t Get_Free_Stack(uint8_t taskID);
|
||||
|
||||
/* Exported constants -----------------------------------------------------------------------------------*/
|
||||
extern TaskRunTimeTypeDef TaskRunTimeStat;
|
||||
|
||||
|
||||
#endif /* __GRUNTIME_H */
|
||||
Reference in New Issue
Block a user