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

📄 algmin_new.c

📁 使用CCS信息DSP编程,适用于6713B的启动程序。
💻 C
字号:
/*
 *  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)" */
/*
 *  ======== algmin_new.c ========
 *
 *  Instantiate a 'static' XDAIS algorithm.
 *  Very low overhead method of bringing up an algorithm. No memory heap
 *  usage, no buffer allocations. Initializes algorithm to use buffers
 *  whose alignment, size etc have been preconfigured to match algorithm needs
 */
#include <std.h>

#include <algmin.h>

#pragma CODE_SECTION(ALGMIN_new,           ".text:init")


/*
 *  ======== ALGMIN_new ========
 */
IALG_Handle ALGMIN_new(IALG_Fxns *fxns, IALG_Params *params, 
        Char *algChanBufs[], SmUns numAlgChanBufs)
{
    /* Use a large enough Mem Tab structure for any algorithm */
    IALG_MemRec memTab[ALGMIN_MAXMEMRECS];  
    IALG_Handle alg;
    Int i;
                            
    /*  Initialize algo memory with preconfigured static buffer addresses */
    for (i=0; i<numAlgChanBufs; i++)    /* loop thro num memTab's of algo */
    {
        memTab[i].base = algChanBufs[i];
    }
    
    /* bind handle to algorithm's instance object and function table */
    alg = memTab[0].base;
    alg->fxns = fxns;  
    
    if (fxns->algInit(alg, memTab, NULL, params) == IALG_EOK) {
        return (alg);   /* algInit SUCCESS: return handle to algo */
    }
    else {            
        return (NULL);  /* algInit FAILURE: return NULL */
    }
}

 

⌨️ 快捷键说明

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