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

📄 csl_ssw.h

📁 dsp在音频处理中的运用
💻 H
📖 第 1 页 / 共 2 页
字号:
/** @mainpage Static Switch (ARM side)** @section Introduction** @subsection xxx Purpose and Scope* The purpose of this document is to identify a set of common CSL APIs for the* Static Switch module across various devices. The CSL developer* is expected to refer to this document while designing APIs for these modules* . Some of the listed APIs may not be applicable to a given Static Switch module.* While in other cases this list of APIs may not be* sufficient to cover all the features of a particular Staitc Switch Module.* The CSL developer should use his discretion in designing* new APIs or extending the existing ones to cover these.*** @subsection aaa Terms and Abbreviations*   -# CSL:  Chip Support Library*   -# API:  Application Programmer Interface*   -# SSW:  Static Switch** @subsection References*    -# CSL-001-DES, CSL 3.x Design Specification DocumentVersion 1.02*    -# SPRS231B, OMAP5912 Applications Processor Data Manual, December 2003 - Revised March 2004** @subsection Assumptions*     The abbreviations SSW, ssw and Ssw have been used throughout this*     document to refer to the Static Switch module*//** @file csl_ssw.h * *    @brief    Header file for functional layer of CSL * *  Description *    - The different enumerations, structure definitions *      and function declarations * *  Modification 1 *    - Modified on: 14/04/2004 *    - Reason: Starting from 5905 sources, created the initial file. * *  @date 14th April, 2004 *    @author Prakash V. Gudnavar */#ifndef _CSL_SSW_H_#define _CSL_SSW_H_#ifdef __cplusplusextern "C" {#endif#include <csl_error.h>#include <csl_types.h>#include <cslr_ssw.h>/**************************************************************************\* SSW global typedef declarations\**************************************************************************//** @brief Enumeration for shared peripherals */typedef enum {    /** Configuration register for shared peripheral UART1 */    CSL_SSW_SHAREDPER_UART1 = 0,    /** Configuration register for shared peripheral UART2 */    CSL_SSW_SHAREDPER_UART2 = 2,    /** Configuration register for shared peripheral UART3 */    CSL_SSW_SHAREDPER_UART3 = 4,    /** Configuration register for shared peripheral MCBSP2 */    CSL_SSW_SHAREDPER_MCBSP2 = 9,    /** Configuration register for shared peripheral I2C1 */    CSL_SSW_SHAREDPER_I2C = 0xA,    /** Configuration register for shared peripheral SPI */    CSL_SSW_SHAREDPER_SPI = 0xB,    /** Configuration register for shared peripheral GPTIMER1 */    CSL_SSW_SHAREDPER_GPTIMER1 = 0xC,    /** Configuration register for shared peripheral GPTIMER2 */    CSL_SSW_SHAREDPER_GPTIMER2 = 0xD,    /** Configuration register for shared peripheral GPTIMER3 */    CSL_SSW_SHAREDPER_GPTIMER3 = 0xE,    /** Configuration register for shared peripheral GPTIMER4 */    CSL_SSW_SHAREDPER_GPTIMER4 = 0xF,    /** Configuration register for shared peripheral GPTIMER5 */    CSL_SSW_SHAREDPER_GPTIMER5 = 0x10,    /** Configuration register for shared peripheral GPTIMER6 */    CSL_SSW_SHAREDPER_GPTIMER6 = 0x11,    /** Configuration register for shared peripheral GPTIMER7 */    CSL_SSW_SHAREDPER_GPTIMER7 = 0x13,    /** Configuration register for shared peripheral GPTIMER8 */    CSL_SSW_SHAREDPER_GPTIMER8 = 0x14,    /** Configuration register for shared peripheral MMCSD2 */    CSL_SSW_SHAREDPER_MMCSD2 = 0x16} CSL_SswSharedPer;/** @brief Enumeration for control commands passed to @a CSL_sswHwControl() * * This is the set of commands that are passed to the @a CSL_sswHwControl() * with an optional argument type-casted to @a void* . The arguments to be * passed with each enumeration if any are specified next to the enumeration */typedef enum {    /** Acquire a shared perpheral(argument type: @a CSL_SswSharedPer) */    CSL_SSW_CMD_ACQUIRE      =		      0,    /** Release a shared perpheral(argument type: @a CSL_SswSharedPer) */    CSL_SSW_CMD_RELEASE     =		      1} CSL_SswHwControlCmd;/** @brief Enumeration for queries passed to @a CSL_sswGetHwStatus() * * This is used to get the status of different operations or to get the * existing setup of SSW. The arguments to be passed with each * enumeration if any are specified next to the enumeration */typedef enum {    /** Get current h/w setup parameters (response type: @a CSL_SswHwSetup *) */    CSL_SSW_QUERY_CURRENT_HWSETUP	=		      0} CSL_SswHwStatusQuery;/** @brief Structure that is used to setup the Static Switch * * This structure is used to setup or obtain the existing setup of * SSW using @a CSL_sswHwSetup() & @a CSL_sswGetHwStatus() functions * respectively. */typedef struct CSL_SswHwSetup {    /** Ownership of UART1: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  uart1Owned;    /** Ownership of UART2: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  uart2Owned;    /** Ownership of UART3: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  uart3Owned;    /** Ownership of MCBSP2: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  mcbsp2Owned;    /** Ownership of I2C: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  i2cOwned;    /** Ownership of SPI: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  spiOwned;    /** Ownership of GPTIMER1: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  dmtimer1Owned;    /** Ownership of GPTIMER2: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  dmtimer2Owned;    /** Ownership of GPTIMER3: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  dmtimer3Owned;    /** Ownership of GPTIMER4: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  dmtimer4Owned;    /** Ownership of GPTIMER5: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  dmtimer5Owned;    /** Ownership of GPTIMER6: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  dmtimer6Owned;    /** Ownership of GPTIMER7: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  dmtimer7Owned;    /** Ownership of GPTIMER8: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  dmtimer8Owned;    /** Ownership of MMCSD2: 1 ==> ARM owns the peripheral, 0 ==> ARM doesn't own the peripheral */    Bool  mmcsd2Owned;} CSL_SswHwSetup ;/** * @brief   The config-structure * * Used to configure the DMA using CSL_dmaHwSetupRaw(..) */typedef struct  {    Uint32 UART1_CFGREG;    Uint32 UART2_CFGREG;    Uint32 UART3_CFGREG;    Uint32 MCBSP2_CFGREG;    Uint32 I2C_CFGREG;    Uint32 SPI_CFGREG;    Uint32 GPTIMER1_CFGREG;    Uint32 GPTIMER2_CFGREG;    Uint32 GPTIMER3_CFGREG;    Uint32 GPTIMER4_CFGREG;    Uint32 GPTIMER5_CFGREG;    Uint32 GPTIMER6_CFGREG;    Uint32 GPTIMER7_CFGREG;    Uint32 GPTIMER8_CFGREG;    Uint32 MMCSD2_CFGREG;} CSL_SswConfig;/** * @brief   Default values for the config-structure */#define CSL_SSW_CONFIG_DEFAULTS {              \            CSL_SSW_UART1_CFGREG_RESETVAL,  \            CSL_SSW_UART2_CFGREG_RESETVAL,  \            CSL_SSW_UART3_CFGREG_RESETVAL,  \            CSL_SSW_MCBSP2_CFGREG_RESETVAL,  \            CSL_SSW_I2C_CFGREG_RESETVAL,  \            CSL_SSW_SPI_CFGREG_RESETVAL,  \            CSL_SSW_GPTIMER1_CFGREG_RESETVAL,  \            CSL_SSW_GPTIMER2_CFGREG_RESETVAL,  \            CSL_SSW_GPTIMER3_CFGREG_RESETVAL,  \            CSL_SSW_GPTIMER4_CFGREG_RESETVAL,  \            CSL_SSW_GPTIMER5_CFGREG_RESETVAL,  \            CSL_SSW_GPTIMER6_CFGREG_RESETVAL,  \            CSL_SSW_GPTIMER7_CFGREG_RESETVAL,  \            CSL_SSW_GPTIMER8_CFGREG_RESETVAL,  \            CSL_SSW_MMCSD2_CFGREG_RESETVAL  \        }/** @brief This object contains the reference to the instance of SSW opened *  using the @a CSL_sswOpen(). * *  The pointer to this, is passed to all SSW CSL APIs. */typedef struct CSL_SswObj {	/** This is a pointer to the registers of the instance of SSW     *  referred to by this object     */	CSL_SswRegsOvly regs;	/** This is the instance of SSW being referred to by this object  */	CSL_InstNum  	perNum;} CSL_SswObj;typedef struct CSL_SswObj *CSL_SswHandle;/** @brief This will have the base-address information for the peripheral *  instance */typedef struct {	/** Base-address of the Configuration registers of the peripheral	 */	CSL_SswRegsOvly	regs;} CSL_SswBaseAddress;/** @brief Module specific parameters. Present implementation doesn't have *  any module specific parameters. */typedef struct{	/** Bit mask to be used for module specific parameters.         *  The below declaration is just a place-holder for future 	 *  implementation.	 */	CSL_BitMask16   flags;} CSL_SswParam;/** @brief Module specific context information. Present implementation doesn't have *  any Context information. */typedef struct {	/** Context information of SSW.         *  The below declaration is just a place-holder for future 	 *  implementation. 	 */    Uint16	contextInfo;} CSL_SswContext;/**************************************************************************\* SSW global function declarations\**************************************************************************//** @brief Opens the instance of SSW requested. * *  The open call sets up the data structures for the particular instance of

⌨️ 快捷键说明

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