csl_chip.h

来自「dsp在音频处理中的运用」· C头文件 代码 · 共 176 行

H
176
字号
/*****************************************************\ *  Copyright 2003, Texas Instruments Incorporated.  * *  All rights reserved.                             * *  Restricted rights to use, duplicate or disclose  * *  this   code   are  granted   through  contract.  * *                                                   * * "@(#) PSP/CSL  3.0.0.0  (2004-04-06)              *\*****************************************************/#ifndef _CSL_CHIP_H_#define _CSL_CHIP_H_/** * @mainpage CHIP Module * * @section Introduction * * @subsection xxx Purpose and Scope * The purpose of this document is to identify a set of common CSL APIs for the * CHIP Module across various devices. The CSL developer is expected to refer to * this document while designing APIs for these modules. Some of the APIs listed * here may not be applicable to a given ATA module. While in other cases this * list of APIs may not be sufficient cover all the features of a particular * module. The CSL developer should use his/her discretion in designing new APIs * or extending the existing ones to cover these. * * * @subsection aaa Terms and Abbreviations *   -# CSL: Chip Support Library *   -# API: Application Programming Interface * * @subsection References *    -# CSL 3.x Technical Requirements Specification v0.5 (2003/05/14) *    http://www.india.ti.com/CatApps/CSL/3x/csl3x_archTRS.doc *    -# CSL 3.x Design Specification v1.03: *    http://www.india.ti.com/CatApps/CSL/3x/csl3x_design.pdf * * @subsection Assumptions * *//** * @file csl_chip.h * * @brief       CSL functional-layer header file for the CHIP module * * Description *   - Comprises the function declarations for the various APIs and the *   associated enumerations, type and symbol definitions for the CHIP *   module. * * Modification 1 *   - modified on: 2004/04/06 *   - reason: doxygenation * * @date 2004/04/06 * @author RG Kiran */#ifdef __cplusplusextern "C" {#endif#include <cslr_chip.h>#include <csl_types.h>/** * @brief   Enumeration of the ARM system registers * * This enumeration contains the list of registers that can be manipulated * using the CSL_chipReadReg(..) and CSL_chipWriteReg(..) APIs */typedef enum {    CSL_CHIP_REG_CPSR   =   0,    /**< Current Program Status Register */    CSL_CHIP_REG_SPSR   =   1     /**< Saved Program Status Register */} CSL_ChipReg;/** * @brief   CHIP Module Context */typedef struct {	/** Context information of CHIP.     *  The following is only a  place-holder for future implementation. 	 */    Uint16	contextInfo;} CSL_ChipContext;/** * @brief   Initialize the CHIP module * * Any relevant module-specific initialization is performed here. This API * should be called before invoking any other API in the CHIP module. * * @b Example: * @verbatim      if (CSL_chipInit(NULL) != CSL_SOK) {        // module initialization failed! //      }   @endverbatim * * @return  CSL_SOK on success */CSL_Status    CSL_chipInit (	CSL_ChipContext *   pContext    /**< Storage for module context; user may NULL */);/* * @brief   Write to the specified register * * This function could be used to write to the CPSR (Current Program * Status Register) or SPSR (Saved Program Status Register). * The user must indicate the register to write to using the first * parameter. * * <b>Usage Constraints:</b> * The chip must be in a privileged mode (non-User) to be able to write * to the CPSR or SPSR registers. Additionally, SPSR is inaccessible * from "System" or "User" modes. * * @b Example: * @verbatim   prevCPSR = CSL_chipWriteReg(CSL_CHIP_REG_CPSR, 0x00000010);   @endverbatim * * @return  Value of the register before the write*/Uint32    CSL_chipWriteReg (        CSL_ChipReg     reg,  /**< identifies the register */        Uint32      val   /**< value to write */);/* * @brief   Read from specified register * * This function could be used to read the CPSR (Current Program * Status Register) or SPSR (Saved Program Status Register). * The user must indicate the register to read using the first * parameter. * * <b>Usage Constraints:</b> * You cannot read the SPSR from "User" or "System" modes. * * @b Example: * @verbatim   cpsr = CSL_chipReadReg(CSL_CHIP_REG_CPSR);   @endverbatim * * @return  Value of the register read in*/Uint32    CSL_chipReadReg (        CSL_ChipReg     reg /**< identifies the register */);#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

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