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

📄 csl_rtiaux.h

📁 基于ti tms320c672x下音频开发例子程式
💻 H
📖 第 1 页 / 共 3 页
字号:
/** ============================================================================
 *   @file  csl_rtiAux.h
 *
 *   @path  $(CSLPATH)\dsp\rti\inc
 *
 *   @desc  API header file for the real time interrupt CSL
 */

/*  ============================================================================
 *   Copyright (c) Texas Instruments Inc 2002, 2003, 2004
 *
 *   Use of this software is controlled by the terms and conditions found in the
 *   license agreement under which this software has been supplied.
 *   ===========================================================================
 */

/*  @(#) PSP/CSL 3.00.01.00[5912] (2004-05-15)  */

/* =============================================================================
 *  Revision History
 *  ===============
 *  3-Dec-2004 sd File Created.
 *
 * =============================================================================
 */
#ifndef _CSL_RTIAUX_H_
#define _CSL_RTIAUX_H_

#include <csl_rti.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 *	Status query functions of the real time interrupt
 */

/** ============================================================================
 *   @n@b CSL_rtiGetFrc0Cnt
 *
 *   @b Description
 *   @n Gets the current count value from the FRC0 register
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns current value of the FRC0 register
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            count;

        ...
        count = CSL_rtiGetFrc0Cnt (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetFrc0Cnt (
	CSL_RtiHandle hRti
)
{
    Uint32  count = 0;

    /* Read the current count value from the FRC0 register */
    count = (Uint32)hRti->regs->RTIFRC0;

    return count;
}

/** ============================================================================
 *   @n@b CSL_rtiGetUc0Cnt
 *
 *   @b Description
 *   @n Gets the current count value from the UC0 register
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns current value of the UC0 register
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            count;

        ...
        count = CSL_rtiGetUc0Cnt (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetUc0Cnt (
	CSL_RtiHandle hRti
)
{
    Uint32  count = 0;

    /* Read the current count value from the UC0 register */
    count = (Uint32)hRti->regs->RTIUC0;

    return count;
}

/** ============================================================================
 *   @n@b CSL_rtiGetFrc1Cnt
 *
 *   @b Description
 *   @n Gets the current count value from the FRC1 register
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns current value of the FRC1 register
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            count;

        ...
        count = CSL_rtiGetFrc1Cnt (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetFrc1Cnt (
	CSL_RtiHandle hRti
)
{
    Uint32  count = 0;

    /* Read the current count value from the FRC1 register */
    count = (Uint32)hRti->regs->RTIFRC1;

    return count;
}

/** ============================================================================
 *   @n@b CSL_rtiGetUc1Cnt
 *
 *   @b Description
 *   @n Gets the current count value from the UC1 register
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns current value of the UC1 register
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            count;

        ...
        count = CSL_rtiGetUc1Cnt (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetUc1Cnt (
	CSL_RtiHandle hRti
)
{
    Uint32  count = 0;

    /* Read the current count value from the UC1 register */
    count = (Uint32)hRti->regs->RTIUC1;

    return count;
}

/** ============================================================================
 *   @n@b CSL_rtiGetUc0CapVal
 *
 *   @b Description
 *   @n Get the captured value of Up counter0
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns captured value of Up counter0
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            captValue;

        ...
        captVal = CSL_rtiGetUc0CapVal (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetUc0CapVal (
	CSL_RtiHandle hRti
)
{
    Uint32  captVal = 0;

    /* Read the captured value of Up counter0 */
    captVal = (Uint32)hRti->regs->RTICAUC0;

    return captVal;
}


/** ============================================================================
 *   @n@b CSL_rtiGetFrc0CapVal
 *
 *   @b Description
 *   @n Get the captured value of Free running counter0
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns captured value of Free running counter0
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            captValue;

        ...
        captVal = CSL_rtiGetFrc0CapVal (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetFrc0CapVal (
	CSL_RtiHandle hRti
)
{
    Uint32  captVal = 0;

    /* Read the captured value of Free running counter0 */
    captVal = (Uint32)hRti->regs->RTICAFRC0;

    return captVal;
}

/** ============================================================================
 *   @n@b CSL_rtiGetUc1CapVal
 *
 *   @b Description
 *   @n Get the captured value of Up counter1
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns captured value of Up counter1
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            captValue;

        ...
        captVal = CSL_rtiGetUc1CapVal (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetUc1CapVal (
	CSL_RtiHandle hRti
)
{
    Uint32  captVal = 0;

    /* Read the captured value of Up counter1 */
    captVal = (Uint32)hRti->regs->RTICAUC1;

    return captVal;
}

/** ============================================================================
 *   @n@b CSL_rtiGetFrc1CapVal
 *
 *   @b Description
 *   @n Get the captured value of Free running counter1
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns captured value of Free running counter1
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            captValue;

        ...
        captVal = CSL_rtiGetFrc1CapVal (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetFrc1CapVal (
	CSL_RtiHandle hRti
)
{
    Uint32  captVal = 0;

    /* Read the captured value of Free running counter1 */
    captVal = (Uint32)hRti->regs->RTICAFRC1;

    return captVal;
}

/** ============================================================================
 *   @n@b CSL_rtiGetComp0Cnt
 *
 *   @b Description
 *   @n Get the compare0 register value
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns compare0 register value
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            compCnt;

        ...
        compCnt = CSL_rtiGetComp0Cnt (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetComp0Cnt (
	CSL_RtiHandle hRti
)
{
    Uint32  compCnt = 0;

    /* Read the compare0 register value */
    compCnt = (Uint32)hRti->regs->RTICOMP0;

    return compCnt;
}

/** ============================================================================
 *   @n@b CSL_rtiGetComp1Cnt
 *
 *   @b Description
 *   @n Get the compare1 register value
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *    @n Returns compare1 register value
 *
 *   @b Modifies
 *   @n  None
 *
 *   @b Example
 *   @verbatim
        CSL_RtiHandle     hRti;
        Uint32            compCnt;

        ...
        compCnt = CSL_rtiGetComp1Cnt (hRti);
        ...
     @endverbatim
 * ===========================================================================
 */
 
 static inline
Uint32 CSL_rtiGetComp1Cnt (
	CSL_RtiHandle hRti
)
{
    Uint32  compCnt = 0;

    /* Read the compare1 register value */
    compCnt = (Uint32)hRti->regs->RTICOMP1;

    return compCnt;
}

/** ============================================================================
 *   @n@b CSL_rtiGetComp2Cnt
 *
 *   @b Description
 *   @n Get the compare2 register value
 *
 *   @b Arguments
 *   @verbatim
        hRti     	    Handle to the real time interrupt instance
 *   @endverbatim
 *
 *   <b> Return Value </b>  Uint32
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>

⌨️ 快捷键说明

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