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

📄 utl.c

📁 使用在dsp TI DSK6711中 很多controller 的例子
💻 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.

 *

 *  @(#) XDAS 2.51.00 11-29-2003 (xdas-2.50.00.9)

 */

/*

 *  ======== utl.c ========

 */

#include <std.h>

#include <utl.h>

#include <log.h>



static LOG_Obj *stdoutLog = NULL;



/*

 *  ======== UTL_bind ========

 */

Void UTL_bind(LOG_Obj *outLog)

{

    stdoutLog = outLog;

}



/*

 *  ======== UTL_error ========

 */

Void UTL_error(String msg, Arg arg)

{

    /* put message into system log and disable log (to preserve error) */

    LOG_error(msg, arg);

    LOG_disable(LOG_D_system);



    /* loop forever so CPU state is preserved */

    for (;;) {

        UTL_break();

    }

}



/*

 *  ======== UTL_load ========

 */

Void UTL_load(Void *client, UTL_Load *lp)

{

    /* display confirmation of load change */

    if (lp->prev != lp->load && stdoutLog != NULL) {

        lp->prev = lp->load;

        LOG_printf(stdoutLog,

            "%r: new load = %d000 instructions per cycle", client, lp->load);

    }

    

    if (lp->load) {

        UTL_loop(lp->load);

    }

}

⌨️ 快捷键说明

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