usrwdbtaskdsp.c

来自「IXP425的BSP代码」· C语言 代码 · 共 88 行

C
88
字号
/* usrWdbTaskDsp.c - optional DSP support for the task WDB agent *//* Copyright 1998-2000 Wind River Systems, Inc. *//*modification history--------------------01a,16nov00,zl	 written based on usrWdbTaskFpp.c*//*DESCRIPTIONThis library configures the task mode WDB agent's DSP support.*//* externals */extern FUNCPTR	wdbTaskDspRegsSet;extern FUNCPTR	wdbTaskDspRegsGet;extern BOOL     wdbTgtHasDsp (void);/* forward static declarations */static STATUS	_wdbTaskDspRegsSet (WDB_CTX * pContext, char * pRegSet);static STATUS	_wdbTaskDspRegsGet (WDB_CTX * pContext, char ** ppRegSet);/******************************************************************************** _wdbTaskDspRegsSet - set a tasks DSP regs*/static STATUS _wdbTaskDspRegsSet    (    WDB_CTX *    pContext,    char *       pRegSet    )    {    WIND_TCB * pTcb = taskTcb (pContext->contextId);    if ((pTcb == NULL) || (pTcb->pDspContext == NULL))        return (ERROR);    bcopy (pRegSet, (char *)(pTcb->pDspContext), sizeof (DSP_CONTEXT));    return (OK);    }/******************************************************************************** _wdbTaskDspRegsGet - Get a tasks DSP regs*/static STATUS _wdbTaskDspRegsGet    (    WDB_CTX *           pContext,    char **             ppRegSet    )    {    WIND_TCB * pTcb = taskTcb (pContext->contextId);    if ((pTcb == NULL) || (pTcb->pDspContext == NULL))        return (ERROR);    *ppRegSet = (char *) pTcb->pDspContext;    return (OK);    }/******************************************************************************** wdbTaskDspInit - initialize DSP support** This routine initializes DSP support for the task mode agent.** NOMANUAL*/void wdbTaskDspInit (void)    {    /* install task mode DSP get/set routines */    if (wdbTgtHasDsp())	{	wdbTaskDspRegsSet = _wdbTaskDspRegsSet;	wdbTaskDspRegsGet = _wdbTaskDspRegsGet;	}    }

⌨️ 快捷键说明

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