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

📄 csl_edma.h

📁 ccs下对dm6446的测试程序
💻 H
📖 第 1 页 / 共 5 页
字号:
typedef enum {
    CSL_EDMA_CMD_REGION_INTERRUPT_CLEAR,     /**< (Arg: @a #CSL_BitMask32*)
                                              *    Clears the specified pending
                                              *    interrupt(BitMask) at shadow
                                              *     Level
                                              */
    CSL_EDMA_CMD_REGION_INTERRUPT_ENABLE,    /**< (Arg: @a #CSL_BitMask32*)
                                              *    Enables specified interrupt
                                              *    (BitMask) at Shadow region
                                              *    Level
                                              */
    CSL_EDMA_CMD_REGION_INTERRUPT_DISABLE,   /**< (Arg: @a #CSL_BitMask32*)
                                              *    Disables specified interrupt
                                              *    (BitMask) at Shadow region
                                              *    Level
                                              */
    CSL_EDMA_CMD_REGION_INTERRUPT_EVAL       /**< (Arg: #None)Interrupt
                                              *   Evaluation asserted at Shadow
                                              *   Region level
                                              */
}CSL_EdmaHwRegionControlCmd;

/** @brief SHADOW REGION Level Queries
*
*
*/

typedef enum {
    CSL_EDMA_QUERY_REGION_INTERRUPT_PENDSTATUS /**< (Arg: @a #CSL_BitMask32*)
                                                *   Return pend status(BitMask)
                                                *   of specified interrupt */
}CSL_EdmaHwRegionStatusQuery;

/** @brief CHANNEL Commands
*
*
*/
typedef enum {
    CSL_EDMA_CMD_CHANNEL_ENABLE,         /**< (Arg: #None)Enables specified Channel */
    CSL_EDMA_CMD_CHANNEL_DISABLE,  /**< (Arg: #None)Disables specified Channel*/
    CSL_EDMA_CMD_CHANNEL_SET,      /**< (Arg: #None)Manually sets the Channel
                                    *   Event, NA for QDMA
                                    */
    CSL_EDMA_CMD_CHANNEL_CLEAR     /**< (Arg: #None)Manually clears the Channel
                                    *   Event, NA for QDMA
                                    */
}CSL_EdmaHwChannelControlCmd;

/** @brief CHANNEL Queries
*
*
*/
typedef enum  {
    CSL_EDMA_QUERY_CHANNEL_SETUP  /**< (Arg: @a #CSL_EdmaHwChannelSetup*)Returns
                                   *    the Channel Setup
                                   */
}CSL_EdmaHwChannelStatusQuery;

/** @brief Enumeration for Param Setup Stage.
*
*
*/
typedef enum  {
    CSL_EDMA_PARAM_BASIC,  /**< It is mandatory for all parameter entries to be
                            *   setup with this argument passed to the Param
                            *   Setup API
                            */
    CSL_EDMA_PARAM_LINK,   /**< When the Param Setup API is invoked with this
                            *   argument the Link field of the specified
                            *   parameter entry is updated
                            */
    CSL_EDMA_PARAM_CHAIN   /**< When the Param Setup API is invoked with this
                            *   argument the Tcc field of the specified parameter
                            *   entry is updated with the Channel number of
                            *   specified Channel
                            */
}CSL_EdmaParamSetupStage;

/**
@}
*/
/** @addtogroup CSL_EDMA_DATASTRUCT
* @{ */


/** @brief Module specific context information.
    This is a dummy handle.
 */
typedef void *CSL_EdmaContext;

/** @brief Module Parameter specific context information.
    This is a dummy handle.
 */
typedef void *CSL_EdmaModuleParam;

/** @brief Module Object
    This is a dummy structure.
 */
typedef void *CSL_EdmaObj;

/** @brief Edma Region Object Structure
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaRegionOpen()
 *  The CSL_edmaRegionOpen().
 */

typedef struct CSL_EdmaRegionObj {
    CSL_EdmaccShadowRegsOvly shregs; /**<Pointer to the Shadow Region Registers*/
    Int                region;           /**< Region number of the handle */
    Int                edmaNum;          /**< Edma Module number */
}CSL_EdmaRegionObj;

/** \brief this is a pointer to @a CSL_GpioObj and is passed as the first
 *         parameter to all GPIO CSL APIs 
 */
typedef struct CSL_EdmaRegionObj *CSL_EdmaRegionHandle;

/** CSL Parameter Entry Handle
 *
 */
typedef volatile CSL_EdmaccParamentryRegs *CSL_EdmaParamHandle;
/** @brief Edma ParamSetup Structure
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaParamSetup().
 *  This structure is used to program the Param Entry for EDMA/QDMA.
 *  The macros can be used to assign values to the fields of the structure.
 */
typedef struct CSL_EdmaParamSetup {
    Uint32          option;              /**< Options */
    Uint32          srcAddr;             /**< Specifies the source address */
    Uint32          aCntbCnt;            /**< Lower 16 bits are A Count
                                    *   Upper 16 bits are B Count
                                    */
    Uint32          dstAddr;             /**< Specifies the destination address */
    Uint32          srcDstBidx;          /**< Lower 16 bits are source b index
                                    *   Upper 16 bits are destination b index
                                    */
    Uint32          linkBcntrld;   /**< Lower 16 bits are link of the next param
                                    *   entry Upper 16 bits are b count reload
                                    */
    Uint32          srcDstCidx;          /**< Lower 16 bits are source c index
                                    *   Upper 16 bits are destination c index
                                    */
    Uint32          cCnt;                /**< C count */
    Uint8           triggerWord;   /**< Trigger Word. For normal EDMA Channel
                                    *   parameter entries this should be set to
                                    *   CSL_EDMA_TRIGWORD_NONE else for QDMA
                                    *   parameter entries this should beset to
                                    *   CSL_EDMA_TRIGWORD_DEFAULT/Number of the
                                    *   trigger word i.e 0-6
                                              */
} CSL_EdmaParamSetup;


/** @brief Edma Object Structure
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaChannelOpen()
 *  The CSL_edmaChannelOpen() updates all the members of the data structure
 *  and returns the objects address as a @a #CSL_EdmaChanHandle. The
 *  @a #CSL_EdmaChanHandle is used in all subsequent function calls.
 */

typedef struct CSL_EdmaChanObj {
    CSL_EdmaccRegsOvly      ccregs;  /**< Pointer to the Edma Channel Controller
                                      *   module register Overlay structure
                                      */
    Int                     region;  /**< Region number to which the channel
                                      *   belongs to
                                      */
    Int                     edmaNum; /**< EDMA instance whose channel is being
                                      *   requested
                                      */
    Int                     chaNum;              /**< Channel Number being requested */
} CSL_EdmaChanObj;
/** @brief Edma Channel Setup
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaHwChannelSetup()
 */

typedef struct CSL_EdmaHwChannelSetup {
    CSL_EdmaEventQueue que;                      /**< Que number for the channel */
    Uint16  paramEntry;       /**< Parameter entry mapping for the channel. This
                               *   may not be initialized for Edma channels on
                               *   devices that do not have CHMAPEXIST. But must
                               *   always be initialised for Qdma channels on
                               *   every device
                               */
    Uint8   triggerWord;      /**< Trigger word for the QDMA channels. This is
                               *   not required to be initialised for EDMA
                               *   channels
                                                      */
} CSL_EdmaHwChannelSetup;

/** EDMA Module Handle
 *  All module level API calls must be made with this handle.
 */
typedef volatile CSL_EdmaccRegs *CSL_EdmaHandle;
/** CSL Channel Handle
 *  All channel level API calls must be made with this handle.
 */
typedef struct CSL_EdmaChanObj *CSL_EdmaChanHandle;

#if CSL_EDMA_MEMPROTECT
/** @brief Edma Memory Protection Fault Error Status
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaGetMemoryFaultError()
 *  / CSL_edmaGetHwStatus() with the relevant command. This is relevant only is
 *  MPEXIST is present for a given device.
 */
typedef struct CSL_EdmaMemFaultStatus {
    Uint32           addr;                   /**< Memory Protection Fault Address */
    CSL_BitMask16    errorMask;              /**< Bit Mask of the Errors */
    Uint16           fid;                    /**< Faulted ID */
}CSL_EdmaMemFaultStatus;
#endif
/** @brief Edma Controller Error Status.
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaGetControllerError()
 *  /CSL_edmaGetHwStatus().
 */
typedef struct CSL_EdmaccStatus {
    CSL_BitMask16    errorMask;              /**< Bit Mask of the Queue Threshold Errors */
    Bool             exceedTcc;   /**< Whether number of permissible outstanding
                                   *   Tcc's is exceeded
                                   */
}CSL_EdmaccStatus;

/** @brief Edma Query Structure for querying region specific
 *  attributes.
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaGetHwStatus
 *  with the relevant command.
 */
typedef struct CSL_EdmaCmdQueryRegion {
    Int              region;                 /**< This field needs to be initialized
                                    *   by the user before issuing the
                                    *   query/command
                                    */
    CSL_BitMask32    cmdQueryVal;  /**< This needs to be filled by the user in
                                    *   case of issuing a COMMAND or it will be
                                    *   filled in by the CSL when used with a
                                    *   QUERY
                                    */
}CSL_EdmaCmdQueryRegion;
/** @brief Edma Command Structure for setting region specific
 *  attributes.
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaGetHwStatus
 *  when
 */


typedef struct CSL_EdmaCmdDmaRegion {
    Int   region;                /**< This field needs to be initialiazed
                                  *   by the user before issuing the command
                                  *   specifying the region for which attributes
                                  *   need to be set
                                  */
    CSL_BitMask32     drae;      /**< DRAE Setting for the region  */
    CSL_BitMask32     draeh;     /**< DRAEH Setting for the region */
}CSL_EdmaCmdDmaRegion;


/** @brief Edma Command Structure used for setting Event Queue priority level
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaHwControl API.
 */


typedef struct CSL_EdmaCmdQuePriority {
    CSL_EdmaEventQueue         que;   /**< Specifies the Queue that needs a
                                       *   priority change
                                       */
    CSL_EdmaEventQueuePri      pri;              /**< Queue priority */
}CSL_EdmaCmdQuePriority;

/** @brief Edma Command Structure used for setting Event Queue to Transfer
 *  Controller mapping an object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaHwControl API.
 */


typedef struct CSL_EdmaCmdQueTc {
    CSL_EdmaEventQueue         que;    /**< Specifies the Queue that needs a
                                        *   change to the Tc mapped
                                        */
    CSL_EdmaTc                 tc;               /**< Transfer controller number mapped */
}CSL_EdmaCmdQueTc;


/** @brief Edma Command Structure used for setting Event Queue threshold level
 *
 *  An object of this type is allocated by the user and
 *  its address is passed as a parameter to the CSL_edmaHwControl API.
 */
typedef struct CSL_EdmaCmdQueueThr {
    CSL_EdmaEventQueue         que;        /**< Specifies the Queue that needs a
                                            *   change in the threshold setting
                                            */
    CSL_EdmaEventQueueThr      threshold;        /**< Queue threshold setting */
}CSL_EdmaCmdQueThr;

/** @brief This will have the base-address information for the module
 *  instance
 */
typedef struct {
    CSL_EdmaccRegsOvly  regs;                   /**< Base-address of the peripheral registers */
} CSL_EdmaModuleBaseAddress;

/** @brief Edma Region parameter structure used for opening a shadow handle
 */
typedef struct {
    Int16 regionNum;                            /**< Specifies the region number to be opened*/
} CSL_EdmaRegionParam;

/** @brief Edma Channel parameter structure used for opening a channel
 */
typedef struct {
    Int regionNum;                              /**< Region Number */
    Int chaNum;                                 /**< Channel number */
} CSL_EdmaChannelParam;
/**
@}
*/

/**
@addtogroup CSL_EDMA_FUNCTION_MODULE
@{
*/


/**************************************************************************\
* EDMA global function declarations
\**************************************************************************/
/** ===========================================================================
 *   @n@b   CSL_edmaInit
 *
 *  @b Description
 *  @n This is EDMA module's init function. This initializes the context Object
 *     variables.
 *
 *  <b> Usage Constraints: </b>
 *  CSL system initialization must be successfully completed by invoking
 *  @a CSL_sysInit() before calling this function. This function should be
 *  called before using any of the CSL APIs
 *
 *   @b Arguments
     @verbatim
            pContext        Context information for the instance. Should be NULL
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK - Always returns
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n  None

⌨️ 快捷键说明

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