XDAIS  dais-x04
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
idma.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 idma.h
35  *
36  * @brief Declaration of the IDMA interface. (Deprecated)
37  *
38  * @idmaDeprecated
39  *
40  */
41 #ifndef IDMA_
42 #define IDMA_
43 
44 #include "ialg.h"
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /*
51  * ======== IDMA_Handle ========
52  * Handle to "logical" DMA channel.
53  */
54 typedef struct IDMA_Obj *IDMA_Handle;
55 
56 /*
57  * ======== IDMA_ElementSize ========
58  * 8, 16 or 32-bit aligned transfer.
59  */
60 typedef enum IDMA_ElementSize {
61  IDMA_ELEM8, /* 8-bit data element */
62  IDMA_ELEM16, /* 16-bit data element */
63  IDMA_ELEM32 /* 32-bit data element */
65 
66 /*
67  * ======== IDMA_TransferType ========
68  * Type of the DMA transfer.
69  */
70 typedef enum IDMA_TransferType {
71  IDMA_1D1D, /* 1-dimensional to 1-dimensional transfer */
72  IDMA_1D2D, /* 1-dimensional to 2-dimensional transfer */
73  IDMA_2D1D, /* 2-dimensional to 1-dimensional transfer */
74  IDMA_2D2D /* 2-dimensional to 2-dimensional transfer */
76 
77 /*
78  * ======== IDMA_Params ========
79  * DMA transfer specific parameters. Defines the configuration of a
80  * logical channel.
81  */
82 typedef struct IDMA_Params {
83  IDMA_TransferType xType; /* 1D1D, 1D2D, 2D1D or 2D2D */
84  IDMA_ElementSize elemSize; /* Element transfer size */
85  Int numFrames; /* Num of frames for 2D transfers */
86  Int stride; /* Jump in elemSize for 2D transfers */
87 } IDMA_Params;
88 
89 /*
90  * ======== IDMA_ChannelRec ========
91  * DMA record used to describe the logical channels.
92  */
93 typedef struct IDMA_ChannelRec {
94  Int depth; /* Num max (concurrent) queued transfers */
95  Bool dimensions; /* 0 = only 1D transfers, 2D otherwise */
96  IDMA_Handle handle; /* Handle to logical DMA channel */
98 
99 /*
100  * ======== IDMA_Fxns ========
101  * These fxns are used to query/grant the DMA resources requested by
102  * the algorithm at initialization time, and to change these resources
103  * at runtime. All these fxns are implemented by the algorithm, and
104  * called by the client of the algorithm.
105  *
106  * implementationId - unique pointer that identifies the module
107  * implementing this interface.
108  * dmaChangeChannels() - apps call this whenever the logical channels
109  * are moved at runtime.
110  * dmaGetChannelCnt() - apps call this to query algorithm about max
111  * number of logical dma channel requested.
112  * dmaGetChannels() - apps call this to query algorithm about its
113  * dma channel requests at init time, or to get
114  * the current channel holdings.
115  * dmaInit() - apps call this to grant dma handle(s) to the
116  * algorithm at initialization. Algorithm initializes
117  * the instance object.
118  */
119 typedef struct IDMA_Fxns {
122  Int (*dmaGetChannelCnt)(Void);
125 } IDMA_Fxns;
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
131 #endif /* IDMA_ */
132 
Copyright 2013, Texas Instruments Incorporated