Files

70 lines
1.6 KiB
C
Raw Permalink Normal View History

2026-03-31 15:46:04 +08:00
2026-05-21 12:19:01 +08:00
/**
******************************************************************************
* @file User\Global\g_runtime.h
* @author
* @version v0.1
* @date 2026-05-21
* @brief
******************************************************************************
*/
2026-03-31 15:46:04 +08:00
#ifndef __GRUNTIME_H
#define __GRUNTIME_H
2026-05-21 12:19:01 +08:00
/* includes ------------------------------------------------------------------*/
2026-03-31 15:46:04 +08:00
#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 */