XDAIS  dais-x04
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
idma2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006-2013, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
33 /*
34  * @file idma2.h
35  *
36  * @brief Declaration of the IDMA2 interface. (Deprecated)
37  *
38  * @idmaDeprecated
39  */
40 
41 #ifndef IDMA2_
42 #define IDMA2_
43 
44 #include "ialg.h"
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /*
51  * ======== IDMA2_Handle ========
52  * Handle to "logical" DMA channel.
53  */
54 typedef struct IDMA2_Obj *IDMA2_Handle;
55 
56 #if defined(_54_) || defined(_55_)
57 typedef Void (*IDMA2_AdrPtr)();
58 #define IDMA2_ADRPTR(addr) ((IDMA2_AdrPtr)((LgUns)addr<<1))
59 #else
60 typedef Void * IDMA2_AdrPtr;
61 #endif
62 
63 /*
64  * ======== IDMA2_ElementSize ========
65  * 8, 16 or 32-bit aligned transfer.
66  */
67 typedef enum IDMA2_ElementSize {
68  IDMA2_ELEM8, /* 8-bit data element */
69  IDMA2_ELEM16, /* 16-bit data element */
70  IDMA2_ELEM32 /* 32-bit data element */
72 
73 /*
74  * ======== IDMA2_TransferType ========
75  * Type of the DMA transfer.
76  */
77 typedef enum IDMA2_TransferType {
78  IDMA2_1D1D, /* 1-dimensional to 1-dimensional transfer */
79  IDMA2_1D2D, /* 1-dimensional to 2-dimensional transfer */
80  IDMA2_2D1D, /* 2-dimensional to 1-dimensional transfer */
81  IDMA2_2D2D /* 2-dimensional to 2-dimensional transfer */
83 
84 /*
85  * ======== IDMA2_Params ========
86  * DMA transfer specific parameters. Defines the configuration of a
87  * logical channel.
88  */
89 typedef struct IDMA2_Params {
90  IDMA2_TransferType xType; /* 1D1D, 1D2D, 2D1D or 2D2D */
91  IDMA2_ElementSize elemSize; /* Element transfer size */
92  Uns numFrames; /* Num of frames for 2D transfers */
93  Int srcElementIndex; /* In 8-bit bytes */
94  Int dstElementIndex; /* In 8-bit bytes */
95  Int srcFrameIndex; /* Jump in 8-bit bytes for 2D transfers */
96  Int dstFrameIndex; /* Jump in 8-bit bytes for 2D transfers */
97 } IDMA2_Params;
98 
99 /*
100  * ======== IDMA2_ChannelRec ========
101  * DMA record used to describe the logical channels.
102  */
103 typedef struct IDMA2_ChannelRec {
104  IDMA2_Handle handle; /* Handle to logical DMA channel */
105  Int queueId; /* Selects the serialization queue */
107 
108 /*
109  * ======== IDMA2_Fxns ========
110  * These fxns are used to query/grant the DMA resources requested by
111  * the algorithm at initialization time, and to change these resources
112  * at runtime. All these fxns are implemented by the algorithm, and
113  * called by the client of the algorithm.
114  *
115  * implementationId - unique pointer that identifies the module
116  * implementing this interface.
117  * dmaChangeChannels() - apps call this whenever the logical channels
118  * are moved at runtime.
119  * dmaGetChannelCnt() - apps call this to query algorithm about max
120  * number of logical dma channel requested.
121  * dmaGetChannels() - apps call this to query algorithm about its
122  * dma channel requests at init time, or to get
123  * the current channel holdings.
124  * dmaInit() - apps call this to grant dma handle(s) to the
125  * algorithm at initialization. Algorithm initializes
126  * the instance object.
127  */
128 typedef struct IDMA2_Fxns {
131  Int (*dmaGetChannelCnt)(Void);
134 } IDMA2_Fxns;
135 
136 #ifdef __cplusplus
137 }
138 #endif
139 
140 #endif /* IDMA2_ */
141 
Copyright 2013, Texas Instruments Incorporated