edma3_common.h
来自「vicp做为dm6446上的硬件加速器」· C头文件 代码 · 共 392 行 · 第 1/2 页
H
392 行
/******************************************************************************
**+-------------------------------------------------------------------------+**
**| **** |**
**| **** |**
**| ******o*** |**
**| ********_///_**** |**
**| ***** /_//_/ **** |**
**| ** ** (__/ **** |**
**| ********* |**
**| **** |**
**| *** |**
**| |**
**| Copyright (c) 1998-2006 Texas Instruments Incorporated |**
**| ALL RIGHTS RESERVED |**
**| |**
**| Permission is hereby granted to licensees of Texas Instruments |**
**| Incorporated (TI) products to use this computer program for the sole |**
**| purpose of implementing a licensee product based on TI products. |**
**| No other rights to reproduce, use, or disseminate this computer |**
**| program, whether in part or in whole, are granted. |**
**| |**
**| TI makes no representation or warranties with respect to the |**
**| performance of this computer program, and specifically disclaims |**
**| any responsibility for any damages, special or consequential, |**
**| connected with the use of this program. |**
**| |**
**+-------------------------------------------------------------------------+**
******************************************************************************/
/** \file edma3_common.h
\brief EDMA3 Common header provides generic defines/typedefs and
debugging info.
This file contains the generic defines and typedefs and the debugging
info that are common across interfaces of EDMA Res Mgr and EDMA Driver
and visible to the application.
(C) Copyright 2006, Texas Instruments, Inc
\version
0.2.0 Anuj Aggarwal - Created
0.2.1 Anuj Aggarwal - Modified it for more run time
configuration.
- Made EDMA3 package OS
independent.
0.2.2 Anuj Aggarwal - Critical section handling code
modification. Uses semaphore and
interrupts disabling mechanism
for resource sharing.
0.3.0 Anuj Aggarwal - Renamed EDMA3_DVR to EDMA3_DRV
- IPR bit clearing in RM ISR
issue fixed.
- Sample application made generic
0.3.1 Anuj Aggarwal - Added DMA/QDMA Channel to TCC
mapping, to fix QDMA missed
event issue.
0.3.2 Anuj Aggarwal - Added support for POLL mode
- Added a new API to modify the
CC Register.
1.0.0 Anuj Aggarwal - Fixed resource allocation related
bugs.
1.0.0.1 Anuj Aggarwal - Fixed spurious missed event
generation related bug.
1.0.0.2 Anuj Aggarwal - Made the EDMA3 package RTSC
compliant.
1.0.0.3 Anuj Aggarwal - Changed the directory structure
as per RTSC standard.
1.01.00.01 Anuj Aggarwal - a) Added new APIs to allocate
logical channels
b) Created EDMA3 config files
for different platforms
c) Misc changes
1.02.00.01 Anuj Aggarwal - a) Added DM6467 support
b) Fixed some MRs
1.03.00.01 Anuj Aggarwal - a) Added non-RTSC PJT files
b) IOCTL Interface added.
c) Fixed some MRs.
1.04 Anuj Aggarwal - a) Added new IOCTLs and APIs.
b) Number of maximum Resource
Manager Instances is configurable.
c) Header files modified to have
extern "C" declarations.
*/
#ifndef _EDMA3_COMMON_H_
#define _EDMA3_COMMON_H_
#ifdef __cplusplus
extern "C" {
#endif
/** define to enable/disable Resource Manager debug messages*/
#define EDMA3_RM_DEBUG
#undef EDMA3_RM_DEBUG
/** define to enable/disable EDMA3 Driver debug messages*/
#define EDMA3_DRV_DEBUG
#undef EDMA3_DRV_DEBUG
/** Debug mechanism used for Resource Manager */
#ifdef EDMA3_RM_DEBUG
#include <stdio.h>
#define EDMA3_RM_PRINTF printf
#endif
/** Debug mechanism used for EDMA Driver */
#ifdef EDMA3_DRV_DEBUG
#include <stdio.h>
#define EDMA3_DRV_PRINTF printf
#endif
/** Defines for boolean variables */
#ifndef TRUE
/** TRUE */
#define TRUE (1u)
/** FALSE */
#define FALSE (0u)
#endif
/** Define for NULL values*/
#ifndef NULL
#define NULL 0u
#endif
/** EDMA3_RM Result - return value of a function */
typedef int EDMA3_RM_Result;
/** EDMA3_DRV Result - return value of a function */
typedef int EDMA3_DRV_Result;
/** EDMA3 Resource Manager Result OK */
#define EDMA3_RM_SOK (0u)
/** EDMA3 Driver Result OK */
#define EDMA3_DRV_SOK (0u)
/**
* EDMA3 Resource Manager Handle.
* It will be returned from EDMA3_RM_open() and will be used to call
* other Resource Manager APIs.
*/
typedef void *EDMA3_RM_Handle;
/**
* EDMA3 Driver Handle.
* It will be returned from EDMA3_DRV_open() and will be used to call
* other EDMA3 Driver APIs.
*/
typedef void *EDMA3_DRV_Handle;
/**
* OS specific Semaphore Handle.
* Used to acquire/free the semaphore, used for sharing of resources
* among multiple users.
*/
typedef void *EDMA3_OS_Sem_Handle;
/** Blocking call without timeout */
#define EDMA3_OSSEM_NO_TIMEOUT (-1)
/**
* Defines used to support the maximum resources supported
* by the EDMA3 controller. These are used to allocate the maximum
* memory for different data structures of the EDMA3 Driver and Resource
* Manager.
*/
/** Maximum EDMA3 Controllers on the SoC */
#define EDMA3_MAX_EDMA3_INSTANCES (1u)
/** Maximum DMA channels supported by the EDMA3 Controller */
#define EDMA3_MAX_DMA_CH (64u)
/** Maximum QDMA channels supported by the EDMA3 Controller */
#define EDMA3_MAX_QDMA_CH (8u)
/** Maximum PaRAM Sets supported by the EDMA3 Controller */
#define EDMA3_MAX_PARAM_SETS (512u)
/** Maximum Logical channels supported by the EDMA3 Package */
#define EDMA3_MAX_LOGICAL_CH (EDMA3_MAX_DMA_CH + \
EDMA3_MAX_PARAM_SETS + \
EDMA3_MAX_QDMA_CH)
/** Maximum TCCs (Interrupt Channels) supported by the EDMA3 Controller */
#define EDMA3_MAX_TCC (64u)
/** Maximum Event Queues supported by the EDMA3 Controller */
#define EDMA3_MAX_EVT_QUE (8u)
/** Maximum Transfer Controllers supported by the EDMA3 Controller */
#define EDMA3_MAX_TC (8u)
/** Maximum Shadow Regions supported by the EDMA3 Controller */
#define EDMA3_MAX_REGIONS (8u)
/**
* Maximum Words (4-bytes region) required for the book-keeping information
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?