00001 /* 00002 * Copyright (c) 2011, Texas Instruments Incorporated 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 00009 * * Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 00012 * * Redistributions in binary form must reproduce the above copyright 00013 * notice, this list of conditions and the following disclaimer in the 00014 * documentation and/or other materials provided with the distribution. 00015 * 00016 * * Neither the name of Texas Instruments Incorporated nor the names of 00017 * its contributors may be used to endorse or promote products derived 00018 * from this software without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00021 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00022 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00023 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00024 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00025 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00026 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00027 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00028 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00029 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00030 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 * 00032 */ 00047 #ifndef IDMA3_ 00048 #define IDMA3_ 00049 00052 00053 00054 #ifdef __cplusplus 00055 extern "C" { 00056 #endif 00057 00058 #include "ialg.h" 00059 00063 typedef enum IDMA3_MemType { 00064 IDMA3_INTERNAL, 00065 IDMA3_EXTERNAL 00066 } IDMA3_MemType; 00067 00068 00074 typedef struct IDMA3_MemRec { 00075 00077 Void *base; 00078 00080 Uns size; 00081 00086 Uns align; 00087 00089 IDMA3_MemType memType; 00090 00091 } IDMA3_MemRec; 00092 00093 00097 typedef struct IDMA3_Obj *IDMA3_Handle; 00098 00099 00103 typedef struct IDMA3_ProtocolObj *IDMA3_ProtocolHandle; 00104 00105 00115 #define IDMA3_PROTOCOL_NULL ((IDMA3_ProtocolHandle)NULL) 00116 00117 00121 typedef enum IDMA3_Priority { 00122 00123 IDMA3_PRIORITY_URGENT, 00124 IDMA3_PRIORITY_HIGH, 00125 IDMA3_PRIORITY_MEDIUM, 00126 IDMA3_PRIORITY_LOW 00127 00128 } IDMA3_Priority; 00129 00130 00134 typedef struct IDMA3_ChannelRec { 00135 00137 IDMA3_Handle handle; 00138 00143 Int numTransfers; 00144 00149 Int numWaits; 00150 00152 IDMA3_Priority priority; 00153 00162 IDMA3_ProtocolHandle protocol; 00163 00169 Bool persistent; 00170 00171 } IDMA3_ChannelRec; 00172 00173 00180 typedef struct IDMA3_Fxns { 00181 00186 Void *implementationId; 00187 00192 Void (*dmaChangeChannels)(IALG_Handle handle, IDMA3_ChannelRec *chnlRec); 00193 00198 Uns (*dmaGetChannelCnt)(Void); 00199 00204 Uns (*dmaGetChannels)(IALG_Handle handle, IDMA3_ChannelRec *chnlRec); 00205 00210 Int (*dmaInit)(IALG_Handle handle, IDMA3_ChannelRec *chnlRec); 00211 00212 } IDMA3_Fxns; 00213 00214 00239 typedef struct IDMA3_ProtocolObj { 00240 00244 String name; 00245 00250 Void (*getEnvMemRec)(IDMA3_ChannelRec *chnlRec, IDMA3_MemRec *memRec); 00251 00265 Bool (*initHandle)(IDMA3_Handle handle); 00266 00271 Bool (*deInitHandle)(IDMA3_Handle handle); 00272 00273 } IDMA3_ProtocolObj; 00274 00275 00280 typedef struct IDMA3_Obj { 00281 00283 unsigned short numTccs; 00284 00286 unsigned short numPaRams; 00287 00289 unsigned char *tccTable; 00290 00292 Uns *paRamAddr; 00293 00295 unsigned short qdmaChan; 00296 00301 Bool transferPending; 00302 00325 Void *env; 00326 00331 IDMA3_ProtocolHandle protocol; 00332 00334 Bool persistent; 00335 00336 } IDMA3_Obj; 00337 00338 00341 #ifdef __cplusplus 00342 } 00343 #endif 00344 00345 #endif 00346 /* 00347 * @(#) ti.xdais; 1, 2.0, 1,7; 6-14-2011 10:34:31; /db/wtree/library/trees/dais/dais.git/src/ dais-u02 00348 */ 00349