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

📄 csl_psc.h

📁 TI达芬奇dm644x各硬件模块测试代码
💻 H
📖 第 1 页 / 共 2 页
字号:

  CSL_PSC_QUERY_MD_INT_STATUS, /**< \brief Returns the current state of the Module interrupt status bit(s)
                                 \param CSL_PscMdIntStatus
                                 \return CSL_SOK */

  CSL_PSC_QUERY_MD_DSP_LRESET_DONE, /**< \brief Returns the current state of the DSP Local Reset Done bit
                                 \param CSL_PscResetDone
                                 \return CSL_SOK */

  CSL_PSC_QUERY_MD_MCKOUT /**< \brief Returns the current state of the Module Clock Out bit(s)
                                 \param CSL_PscMdClkStatus
                                 \return CSL_SOK */
} CSL_PscHwStatusQuery;



/*********************************************************************
  PSC struct Declarations
**********************************************************************/


/** \brief  Power Domain Interrupt Enable/Disable Config structure */
typedef struct { 
  /** Interrupt enable for PD Emulation Inhibit interrupt (Emuihb). */
  CSL_PscIntEnable      pscPdEmuihb  ;
} CSL_PscPdIntEnable; 

/** \brief  Module Interrupt Enable/Disable Config structure */
typedef struct { 
  /** Interrupt enable for MD Emulation Inhibit interrupt (Emuihb). */
  CSL_PscIntEnable      pscMdEmuihb  ;
  /** Interrupt enable for MD Emulation Reset interrupt (Emrst).    */
  CSL_PscIntEnable      pscMdEmurst  ;
} CSL_PscMdIntEnable; 


/** \brief  PSC Power Domain Configuration Structure */
typedef struct { 
  /** Array of Power Domain ID(s)                  */ 
  CSL_PscPdId*                    pdId          ;  
  /** Number of Power Domains - array length       */ 
  Uint16                          numPds        ;  
  /** Array of Power Domain State(s)               */   
  CSL_PscPdState*                 pdState       ;  
  /** Array of Power Domain Interrupt Config's     */ 
  CSL_PscPdIntEnable*             pdIntEnable   ;  
  /** Array of current states for all states       */ 
  CSL_PscPdState*  pdStateRecord                ;  
} CSL_PscPdCfg; 

typedef struct { /** \brief  PSC Module Configuration Structure */
  /** Array of Module ID(s)                  */
  CSL_PscMdId*                    mdId          ;  
  /** Number of Modules - array length       */
  Uint16                          numMds        ;
  /** Array of Module State(s)               */
  CSL_PscMdState*                 mdState       ;  
  /** Array of Module Interrupt Config's     */
  CSL_PscMdIntEnable*             mdIntEnable   ;  
  /** Array of current states for all states */
  CSL_PscMdState*  mdStateRecord                ;  
} CSL_PscMdCfg; 

/** \brief  PSC Hardware Setup Structure */
typedef struct CSL_PscHwSetup { 
  /** Power Domain Configuration */
  CSL_PscPdCfg       pscPdCfg;
  /** Module Configuration       */
  CSL_PscMdCfg       pscMdCfg;
  void*              extendSetup; 
} CSL_PscHwSetup;

/** \brief  PSC Interrupt Pending Status Registers structure */
typedef struct { 
  /** Module Interrupt Pending Register #0     */
  Uint32          mdIntPendReg0  ; 
  /** Module Interrupt Pending Register #1     */
  Uint32          mdIntPendReg1  ; 
  /** Power Domain Interrupt Pending Register  */
  Uint32          pdIntPendReg   ; 
  /** External Power Control Interrupt Pending Register */
  Uint32          pdIntPendEpcReg; 
} CSL_PscIntPendRegs; 

/** \brief  PSC Power Domain Interrupt Active structure */
typedef struct { 
  /** Interrupt active status for PD Emuihb */
  CSL_PscIntActive          pscPdIntActiveEmuihb  ;
  /** Interrupt active status for PD EPC    */
  CSL_PscIntActive          pscPdIntActiveEpc     ;
} CSL_PscPdIntActive; 


typedef struct { /** \brief  Power Domain Interrupt Status Structure */
  /** Array of Power Domain ID(s)             */
  CSL_PscPdId*                    pdId         ;  
  /** Array of Interrupt Active status        */
  CSL_PscPdIntActive*             pdIntActive  ;  
  /** Number of Power Domain's - array length */
  Uint16                          numPds       ;  
} CSL_PscPdIntStatus; 


/** \brief  PSC Module Interrupt Active structure */
typedef struct { 
  /** Interrupt active status for MD Emuihb */
  CSL_PscIntActive          pscMdIntActiveEmuihb  ;
  /** Interrupt active status for MD Emurst */
  CSL_PscIntActive          pscMdIntActiveEmurst  ;
} CSL_PscMdIntActive; 


/** \brief  PSC Module Interrupt Status Structure */
typedef struct { 
  /** Array of Module ID(s)            */
  CSL_PscMdId*                    mdId         ;  
  /** Array of Module Active status    */
  CSL_PscMdIntActive*             mdIntActive  ;  
  /** Number of Modules - array length */
  Uint16                          numMds       ;  
} CSL_PscMdIntStatus; 


/** \brief  PSC Module Clock Status Structure */
typedef struct { 
  /** Array of Module ID(s)            */
  CSL_PscMdId*                    mdId         ;  
  /** Array of Module Clock Active status    */
  CSL_PscMdClkActive*             mdClkActive  ;  
  /** Number of Modules - array length */
  Uint16                          numMds       ;  
} CSL_PscMdClkStatus; 


/** \brief  PSC Power Domain List structure */
typedef struct { 
  /** Array of Power Domain(s)               */
  CSL_PscPdId*                    pdId         ;  
  /** Number of Power Domains - array length */
  Uint16                          numPds       ;  
} CSL_PscPdList; 


/** \brief  PSC Module List structure */
typedef struct { 
  /** Array of Module ID(s)            */
  CSL_PscMdId*                    mdId         ;  
  /** Number of Modules - array length */
  Uint16                          numMds       ;  
} CSL_PscMdList; 

/** \brief  PSC Peripheral ID Structure */
typedef struct {
	/** Scheme ID         */
	Uint16        		pIdScheme ;  
	/** Functional ID     */
	Uint16        		pIdFunc   ;  
    /** RTL Version ID    */
    Uint16        		pIdRtl    ;  
    /** Major Revision ID */
    Uint16        		pIdMajor  ;  
    /** Custom Version ID */
    Uint16        		pIdCustom ;  
    /** Minor Revision ID */            
    Uint16        		pIdMinor  ;  
} CSL_PscPeriphId;


/** \brief PSC Object Structure
*
*          This structure is initialized by calling \a CSL_pscOpen()
*          A pointer to this structure must be passed to all PSC CSL APIs.
*  
*/     
typedef struct CSL_PscObj {
  CSL_OpenMode openMode;/** This is the mode in which the CSL instance
                             is opened */
  /** This is a unique identifier to the instance of PSC being referred to 
      by this object */
#if 0
  CSL_Uid      uid;
  /** This is the variable that holds the current state of a resource being 
      shared by current instance of PSC with other peripherals */
  CSL_Xio      xio;
  /** This is a pointer to the registers of the instance of PSC referred to 
      by this object */
#endif
  CSL_PscRegsOvly regs;
  /** This is the instance of PSC being referred to by this object */
  CSL_InstNum  perNum;
} CSL_PscObj;


/** \brief Pointer to @a CSL_PscObj 
*
*           This is a pointer to @a CSL_PscObj.  This pointer is passed 
*           to all PSC CSL API's.  
*/
typedef CSL_PscObj* CSL_PscHandle; 


/** @brief This structure contains the base-address information for the peripheral
 *  instance
 */
typedef struct CSL_PscBaseAddress {
    /** Base-address of the configuration registers of the peripheral
     */
    CSL_PscRegsOvly    regs;
} CSL_PscBaseAddress;

/** @brief Module specific parameters. Present implementation of PLLC
 *  interface CSL doesn't have any module specific parameters.
 */
typedef struct CSL_PscParam {
    /** Bit mask to be used for module specific parameters. The below
     *  declaration is just a place-holder for future implementation.
     */
    CSL_BitMask16   flags;

} CSL_PscParam;



/*****************************************************************************\
          CSL3.x mandatory function prototype definitions
\*****************************************************************************/
CSL_Status CSL_pscInit ( void );

/** This function is used to open a PSC instance.   
 */
CSL_PscHandle CSL_pscOpen ( CSL_PscObj *pPscObj,
                              CSL_InstNum pscNum,
                              CSL_PscParam *pPscParam,
                              CSL_Status *pStatus );

/** This function is used to close a PSC instance. 
 */
CSL_Status  CSL_pscClose ( CSL_PscHandle hPsc );


/** This function is used to setup the PSC hardware
 */
CSL_Status CSL_pscHwSetup ( CSL_PscHandle hPsc,
                             CSL_PscHwSetup *setup );

/** This function is used to get state of hardware setup. 
 */
CSL_Status CSL_pscGetHwSetup ( CSL_PscHandle hPsc,
                                CSL_PscHwSetup *setup );

/** This function is used to control and config the hardware. 
 */
CSL_Status CSL_pscHwControl ( CSL_PscHandle hPsc,
                               CSL_PscHwControlCmd cmd,
                               void *arg );

/** This function is used to read the current device status. 
 */
CSL_Status CSL_pscGetHwStatus ( CSL_PscHandle hPsc,
                                 CSL_PscHwStatusQuery query,
                                 void *response );

#ifdef __cplusplus
}
#endif
	
#endif

⌨️ 快捷键说明

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