⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssp_cputick.h

📁 abstract rtos
💻 H
字号:
#ifdef __cplusplusextern "C"{#endif#ifndef _SSP_CPUTICK_H_#define _SSP_CPUTICK_H_typedef U64 CPU_TICK_S;#define CPUTICK_ONESECOND   CONFIG_TICKS_PER_SECOND#define CPUTICK_BITALLMASK  0xFFFFFFFF#define CPUTICK_BIT32MASK   0x80000000#define CPUTICK_BIT01MASK   0x00000001#define CPUTICK_BITNMASK(x) (CPUTICK_BITALLMASK << (32 - (x)))extern CPU_TICK_S g_stCpuTickStart;extern U32 g_ulCpuTickBase;extern U64  g_cputAllowed, g_cputStarve;extern CPU_TICK_S g_aTaskCpuTick_Cur [CONFIG_TASK_NUMBER];extern CPU_TICK_S g_aTaskCpuTick_5s  [CONFIG_TASK_NUMBER];extern CPU_TICK_S g_aTaskCpuTick_60s [CONFIG_TASK_NUMBER];extern CPU_TICK_S g_aTaskCpuTick_600s[CONFIG_TASK_NUMBER];extern CPU_TICK_S g_stCpuTickLast_Cur;extern CPU_TICK_S g_stCpuTickLast_5s;extern CPU_TICK_S g_stCpuTickLast_60s;extern CPU_TICK_S g_stCpuTickLast_600s;extern U32 g_aTaskPerformance_Cur [CONFIG_TASK_NUMBER];extern U32 g_aTaskPerformance_5s  [CONFIG_TASK_NUMBER];extern U32 g_aTaskPerformance_60s [CONFIG_TASK_NUMBER];extern U32 g_aTaskPerformance_600s[CONFIG_TASK_NUMBER];U32 m_cputick_init();U32 aos_cputick_get(CPU_TICK_S *pstCpuTick);U32 aos_cputick_start(CPU_TICK_S *pstCpuTick);U32 aos_cputick_total(CPU_TICK_S *pstCpuTick);U32 aos_cputick_getbase(U32 *pulCpuTickBase);U32 aos_cputick_2tick(CPU_TICK_S *pstCpuTick,U32 *pulTick,U32 *pulOddment);U32 aos_cputick_2us(CPU_TICK_S *pstCpuTick,U32 *pulSec,U32 *pulUSec);U32 aos_cputick_lshift2(CPU_TICK_S *pstCpuTick);U32 aos_cputick_rshift2(CPU_TICK_S *pstCpuTick);U32 aos_cputick_div32(CPU_TICK_S *pstCpuTick,U32 ul32bit);U32 aos_cputick_div32revise(CPU_TICK_S *pstCpuTick,U32 ul32bit,U32 *pulReviseVal);U32 aos_cputick_div64(CPU_TICK_S *pDividend,CPU_TICK_S *pDivisor);U32 aos_cputick_mul32(CPU_TICK_S *pstCpuTick,U32 ul32bit);U32 aos_cputick_sub(CPU_TICK_S *pstMinuend,CPU_TICK_S *pstSubtrahend);U32 aos_cputick_add(CPU_TICK_S *pstSummand,CPU_TICK_S *pstAddend);S32 aos_cputick_compare(CPU_TICK_S *pstFirst,CPU_TICK_S *pstSecond);U32 aos_cputick_percent(CPU_TICK_S *pstCpuTick,CPU_TICK_S *pstBase);U32 aos_task_performance(U32 ulType);U32 aos_task_performance_get(U32 ulTaskID,                             U32 *pulPerCur,                             U32 *pulPer5s,                             U32 *pulPer60s,                             U32 *pulPer600s);VOID ppc_get_time(U32 *pulLow,U32 *pulHigh);        #define aos_b64_lshift2(pstCpuTick) \        aos_cputick_lshift2((CPU_TICK_S *)(pstCpuTick))        #define aos_b64_rshift2(pstCpuTick) \        aos_cputick_rshift2((CPU_TICK_S *)(pstCpuTick))        #define aos_b64_div32(pstCpuTick,ul32bit) \        aos_cputick_div32((CPU_TICK_S *)(pstCpuTick),ul32bit)#define aos_b64_div32revise(pstCpuTick,ul32bit,pulReviseVal) \        aos_cputick_div32revise((CPU_TICK_S *)(pstCpuTick),ul32bit,pulReviseVal)#define aos_b64_div64(pDividend,pDivisor) \        aos_cputick_div64((CPU_TICK_S *)(pDividend),(CPU_TICK_S *)(pDivisor))#define aos_b64_mul32(pstCpuTick,ul32bit) \        aos_cputick_mul32((CPU_TICK_S *)(pstCpuTick),ul32bit)#define aos_b64_sub(pstMinuend,pstSubtrahend) \        aos_cputick_sub((CPU_TICK_S *)(pstMinuend),(CPU_TICK_S *)(pstSubtrahend))#define aos_b64_add(pstSummand,pstAddend) \        aos_cputick_add((CPU_TICK_S *)(pstSummand),(CPU_TICK_S *)(pstAddend))#define aos_b64_compare(pstFirst,pstSecond) \        aos_cputick_compare((CPU_TICK_S *)(pstFirst),(CPU_TICK_S *)(pstSecond))        #endif#ifdef __cplusplus}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -