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

📄 tsktest.c

📁 在TI公司TMS320F28XX系列DSP上应用BIOS的编程例子
💻 C
字号:
/*
 *  Copyright 2002 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) DSP/BIOS 4.80.208 12-06-02 (barracuda-l19)" */
/*
 *  ======== tsktest.c =======
 *  In this example, 3 tasks have been created with the Configuration
 *  Tool.  Each task has a computation loop consisting of a LOG_printf()
 *  followed by a TSK_yield().  This causes a round robin scheduling for
 *  these tasks of equal priority.
 */

#include <std.h>

#include <log.h>
#include <tsk.h>

#include "tsktestcfg.h"

#define NLOOPS  5

Void task(Arg id_arg);  /* Function for tasks created with Config Tool */ 

/*
 *  ======== main ========
 */
Void main()
{
}

/*
 *  ======== task ========
 */
Void task(Arg id_arg)
{
    Int     id = ArgToInt (id_arg);
    Int     i;
    
    for (i = 0; i < NLOOPS ; i++) 
    {
        LOG_printf(&trace, "Loop %d: Task %d Working", (Arg)i, (Arg)id);
//        TSK_yield();
    }
    LOG_printf(&trace, "Task %d DONE", (Arg)id);
}

⌨️ 快捷键说明

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