📄 csl_psc.h
字号:
/* ==========================================================================
* Copyright (c) Texas Instruments Inc. 2004, 2005
*
* Use of this software is controlled by the terms and conditions found
* in the license agreement under which this software has been supplied
* provided
* ==========================================================================
*/
/** \mainpage PSC CSL 3.x
*
* \section Introduction
*
* \subsection xxx Purpose and Scope
* The purpose of this document is to identify a set of common CSL APIs for
* the PSC 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 PSC module. While other cases
* this list of APIs may not be sufficient to cover all the features of a
* particular PSC Module. The CSL developer should use his discretion designing
* new APIs or extending the existing ones to cover these.
*
* \subsection aaa Terms and Abbreviations
* -# CSL: Chip Support Library
* -# API: Application Programmer Interface
*
* \subsection References
* -# CSL 3.x Design Specification Document
*
*/
/** \file csl_psc.h
\brief PSC functional layer API header file
\date June 1, 2005
\author Lawrence Ronk
*/
#ifndef _CSL_PSC_H_
#define _CSL_PSC_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <cslr.h>
#include <csl_error.h>
#include <csl_sysData.h>
#include <csl_types.h>
#include <cslr_psc.h>
/*********************************************************************
PSC marco declarations
**********************************************************************/
/** Number of Power Domains */
#define CSL_PSC_NUM_PD (2)
/** Number of Modules */
#define CSL_PSC_NUM_MD (41)
/*********************************************************************
PSC enum typedef Declarations
**********************************************************************/
/** \brief Power Domain ID's */
typedef enum {
/** Always On Power Domain */
CSL_PSC_PD_ALWAYSON = (0),
/** DSP Power Domain */
CSL_PSC_PD_DSP = (1)
} CSL_PscPdId;
/** \brief Power Domain States (ON or OFF) */
typedef enum {
/** Power Domain OFF State */
CSL_PSC_PD_STATE_OFF = CSL_PSC_PDCTL_NEXT_POWER_OFF,
/** Power Domain ON State */
CSL_PSC_PD_STATE_ON = CSL_PSC_PDCTL_NEXT_POWER_ON
} CSL_PscPdState;
/** \brief Module ID's */
typedef enum {
CSL_PSC_MD_VPSSMSTR = (0),
CSL_PSC_MD_VPSSSLV = (1),
CSL_PSC_MD_EDMA1 = (2),
CSL_PSC_MD_EDMA2 = (3),
CSL_PSC_MD_EDMA3 = (4),
CSL_PSC_MD_EMAC = (5),
CSL_PSC_MD_EMACCTRL = (6),
CSL_PSC_MD_MDIO = (7),
CSL_PSC_MD_IEEE1394 = (8),
CSL_PSC_MD_USB = (9),
CSL_PSC_MD_ATA = (10),
CSL_PSC_MD_VLYNQ = (11),
CSL_PSC_MD_HPI = (12),
CSL_PSC_MD_DDREMIF = (13),
CSL_PSC_MD_AEMIF = (14),
CSL_PSC_MD_MMCSD = (15),
CSL_PSC_MD_MEMSTICK = (16),
CSL_PSC_MD_MCBSP = (17),
CSL_PSC_MD_I2C = (18),
CSL_PSC_MD_UART0 = (19),
CSL_PSC_MD_UART1 = (20),
CSL_PSC_MD_UART2 = (21),
CSL_PSC_MD_SPI = (22),
CSL_PSC_MD_PWM0 = (23),
CSL_PSC_MD_PWM1 = (24),
CSL_PSC_MD_PWM2 = (25),
CSL_PSC_MD_GPIO = (26),
CSL_PSC_MD_TIMER0 = (27),
CSL_PSC_MD_TIMER1 = (28),
CSL_PSC_MD_TIMER2 = (29),
CSL_PSC_MD_SYSCTRL = (30),
CSL_PSC_MD_ARM = (31),
CSL_PSC_MD_BUS1 = (32),
CSL_PSC_MD_BUS2 = (33),
CSL_PSC_MD_BUS3 = (34),
CSL_PSC_MD_BUS4 = (35),
CSL_PSC_MD_BUS5 = (36),
CSL_PSC_MD_BUS6 = (37),
CSL_PSC_MD_BUS7 = (38),
CSL_PSC_MD_DSP = (39),
CSL_PSC_MD_IMCOP = (40)
} CSL_PscMdId;
/** \brief Module States (SwRstDisable, SyncReset, Disable, or Enable) */
typedef enum {
/** SwRstDisable State */
CSL_PSC_MD_STATE_SWRSTDISABLE = CSL_PSC_MDCTL_NEXT_SWRSTDISABLE,
/** SyncReset State */
CSL_PSC_MD_STATE_SYNCRST = CSL_PSC_MDCTL_NEXT_SYNCRESET,
/** Disable State */
CSL_PSC_MD_STATE_DISABLE = CSL_PSC_MDCTL_NEXT_DISABLE,
/** Enable State */
CSL_PSC_MD_STATE_ENABLE = CSL_PSC_MDCTL_NEXT_ENABLE
} CSL_PscMdState;
/** \brief PSC Interrupt Enable/Disable Config */
typedef enum {
/** Interrupt Disable */
CSL_PSC_INT_DISABLE = 0,
/** Interrupt Enable */
CSL_PSC_INT_ENABLE = 1
} CSL_PscIntEnable;
/** \brief PSC Interrupt Active Status (Not Active / Active ) */
typedef enum {
/** Interrupt is not active */
CSL_PSC_INT_NOT_ACTIVE = 0,
/** Interrupt is active */
CSL_PSC_INT_ACTIVE = 1
} CSL_PscIntActive;
/** \brief PSC Reset Status (Not Active / Active ) */
typedef enum {
/** Reset is not done */
CSL_PSC_RESET_NOT_DONE = 0,
/** Reset is done */
CSL_PSC_RESET_DONE = 1
} CSL_PscResetDone;
/** \brief PSC Module Clock Status (Not Active / Active ) */
typedef enum {
/** Module clock is off */
CSL_PSC_MD_CLK_OFF = CSL_PSC_MDSTAT_MCKOUT_CLK_OFF,
/** Module clock is on */
CSL_PSC_MD_CLK_ON = CSL_PSC_MDSTAT_MCKOUT_CLK_ON
} CSL_PscMdClkActive;
/*********************************************************************
PSC Control Commands (Enumerated)
**********************************************************************/
/** \brief PSC Control Commands
*
* This is the set of commands that can be passed to
* \a CSL_pscHwControl() with an optional type-casted
* argument. The argument to be passed with each enumeration
* (if any) is specified next to the enumeration.
*/
typedef enum {
CSL_PSC_CMD_DSP_PWR_ON, /**< \brief Do sequence to power on the DSP
\param void
\return CSL_SOK */
CSL_PSC_CMD_DSP_PWR_OFF, /**< \brief Do sequence to power off the DSP
\param void
\return CSL_SOK */
CSL_PSC_CMD_DSP_LRESET_ASSERT, /**< \brief Assert DSP Local Reset
\param void
\return CSL_SOK */
CSL_PSC_CMD_DSP_LRESET_DEASSERT, /**< \brief De-assert DSP Local Reset
\param void
\return CSL_SOK */
CSL_PSC_CMD_MD_STATE_CFG, /**< \brief Put specified module(s) into specified state(s)
\param CSL_PscMdCfg
\return CSL_SOK */
CSL_PSC_CMD_MD_STATE_CFG_ALL, /**< \brief Put all modules into specified states
\param CSL_PscMdCfg
\return CSL_SOK */
CSL_PSC_CMD_MD_STATE_ENABLE_ALL, /**< \brief Put all modules into the ENABLE state
\param CSL_PscMdCfg
\return CSL_SOK */
CSL_PSC_CMD_MD_STATE_ENABLE, /**< \brief Put specified module(s) into the ENABLE state
\param CSL_PscMdCfg
\return CSL_SOK */
CSL_PSC_CMD_MD_STATE_DISABLE, /**< \brief Put specified module(s) into the DISABLE state
\param CSL_PscMdCfg
\return CSL_SOK */
CSL_PSC_CMD_PD_INT_CFG, /**< \brief Configure (Enable/Disable) specified Power Domain interrupt(s)
\param CSL_PscPdCfg
\return CSL_SOK */
CSL_PSC_CMD_PD_INT_CLR, /**< \brief Clear specified Power Domain interrupt(s)
\param CSL_PscPdList
\return CSL_SOK */
CSL_PSC_CMD_MD_INT_CFG, /**< \brief Configure (Enable/Disable) specified Module interrupt(s)
\param CSL_PscMdCfg
\return CSL_SOK */
CSL_PSC_CMD_MD_INT_CLR, /**< \brief Clear specified Module interrupt(s)
\param CSL_PscMdList
\return CSL_SOK */
CSL_PSC_CMD_INT_EVAL /**< \brief Force interrupt evaluation by writing the Interrupt Evaluation Bit
\param void
\return CSL_SOK */
} CSL_PscHwControlCmd;
/*********************************************************************
PSC Queries (Enumerated)
**********************************************************************/
typedef enum {
CSL_PSC_QUERY_PID, /**< \brief Returns Peripheral Identification informmation
\param void
\return CSL_SOK */
CSL_PSC_QUERY_GET_PD_CFG, /**< \brief Returns Power Domain config
\param CSL_PscPdCfg
\return CSL_SOK */
CSL_PSC_QUERY_GET_MD_CFG, /**< \brief Returns Module config, i.e. Module stat(s) and interrupt config(s)
\param CSL_PscMdCfg
\return CSL_SOK */
CSL_PSC_QUERY_INT_PEND_STATUS, /**< \brief Returns the contents of the PSC Interrupt Pending Registers
\param CSL_PscPdIntStatus
\return CSL_SOK */
CSL_PSC_QUERY_PD_INT_STATUS, /**< \brief Returns the current state of the Power Domain interrut status bits(s)
\param CSL_PscPdIntStatus
\return CSL_SOK */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -