📄 tsktest.c
字号:
#include <std.h>
#include <stdio.h>
#include <log.h>
#include <tsk.h>
#include <mem.h>
#include <csl.h>
#include "tsktestcfg.h"
#define NLOOPS 3
//声明堆
extern int extHeap;
extern int intHeap;
// Function for tasks created with Config Tool
Void task(Arg id_arg);
/*
* ======== main ========
*/
Void main()
{
// MEM_calloc();
}
/*
* ======== task ========
*/
Void task(Arg id_arg)
{
Uint8 i;
Uint8 *pchar = NULL;
Uint8 *pchar1 = NULL;
pchar = (Uint8 *)MEM_calloc(extHeap,64 ,4);
pchar1 = (Uint8 *)MEM_calloc(intHeap,64 ,4);
for (i = 0; i < NLOOPS ; i++)
{
//printf("Loop %d: Task %d Working,", i, id_arg);
LOG_printf(&trace, "Loop %d: Task %d Working,", i, id_arg);
//TSK_deltatime(TSK_self());
TSK_yield();
}
//printf("Task %d DONE", id_arg);
LOG_printf(&trace, "Task %d DONE", id_arg);
//LOG_message("SYS_error called: error id = 0x%x", i);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -