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

📄 appthreads.tci

📁 使用CCS信息DSP编程,适用于6713B的启动程序。
💻 TCI
字号:
/*
 *  Copyright 2003 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.
 *  
 */
/* "@(#) ReferenceFrameworks 2.20.00.08 07-18-03 (swat-f02)" */
/*
 *  ======== appThreads.tci ========
 *
 *  Application threads
 */

/* Create a object to hold temporary priority thread variables */
priThreads = {
    intPriAudioproc :1,    /* priority for swiAudioproc* threads */
    intPriSplitJoin :1,    /* priority for swiRxSplit and swiTxJoin threads */
    intPriControl   :1     /* priority for swiControl thread */
}

/* create RxSplit thread */
var swiRxSplit     = tibios.SWI.create( "swiRxSplit" );
swiRxSplit.comment = "Splits mixed-channel pipe frame into separate pipes";
swiRxSplit["fxn"]  = prog.extern( "thrRxSplitRun" );
swiRxSplit.priority= priThreads.intPriSplitJoin;
swiRxSplit.arg0    = 0;
swiRxSplit.mailbox = (1 << (APPNUMCHANNELS + 1)) - 1; 
                         /* APPNUMCHANNELS one-bits in the mailbox above */
 
/* create a processing SWI for each channel */
for (i = 0; i < APPNUMCHANNELS; i++) {
    var swi      = tibios.SWI.create( "swiAudioproc" + i );
    swi.comment  = "SWI processing channel #" + i;
    swi["fxn"]   = prog.extern( "thrAudioprocRun" );
    swi.arg0     = i;
    swi.priority = priThreads.intPriAudioproc;
    swi.mailbox  = 3;  /* binary 011, for the thread's two pipes */
}

/* create TxJoin thread */
var swiTxJoin      = tibios.SWI.create( "swiTxJoin" );
swiTxJoin.comment  = "Joins separate pipe frames into one";
swiTxJoin["fxn"]   = prog.extern( "thrTxJoinRun" );
swiTxJoin.priority = priThreads.intPriSplitJoin;
swiTxJoin.arg0     = 0;
swiTxJoin.mailbox  = (1 << (APPNUMCHANNELS + 1)) - 1; 
                         /* APPNUMCHANNELS one-bits in the mailbox above */

/* create the control thread */
var swiControl      = tibios.SWI.create( "swiControl" );
swiControl.comment  = "Control thread, posted by isrControl";
swiControl["fxn"]   = prog.extern( "thrControlRun" );
swiControl.priority = priThreads.intPriControl;

/* create a CLK object that posts the control thread when appropriate */
var clkControl     = tibios.CLK.create( "clkControl" );
clkControl.comment = "simulates HWI for button presses and such h/w events";
clkControl["fxn"]  = prog.extern( "thrControlIsr" );

/* Delete priThreads object (to minimize namespace pollution) */
delete priThreads;

⌨️ 快捷键说明

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