![]() |
![]() |
00001 /* 00002 * Copyright (c) 2012, 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 */ 00050 #ifndef IDMA3_ 00051 #define IDMA3_ 00052 00055 00056 00057 #ifdef __cplusplus 00058 extern "C" { 00059 #endif 00060 00061 #include "ialg.h" 00062 00066 typedef enum IDMA3_MemType { 00067 IDMA3_INTERNAL, 00068 IDMA3_EXTERNAL 00069 } IDMA3_MemType; 00070 00071 00077 typedef struct IDMA3_MemRec { 00078 00080 Void *base; 00081 00083 Uns size; 00084 00089 Uns align; 00090 00092 IDMA3_MemType memType; 00093 00094 } IDMA3_MemRec; 00095 00096 00100 typedef struct IDMA3_Obj *IDMA3_Handle; 00101 00102 00106 typedef struct IDMA3_ProtocolObj *IDMA3_ProtocolHandle; 00107 00108 00118 #define IDMA3_PROTOCOL_NULL ((IDMA3_ProtocolHandle)NULL) 00119 00120 00124 typedef enum IDMA3_Priority { 00125 00126 IDMA3_PRIORITY_URGENT, 00127 IDMA3_PRIORITY_HIGH, 00128 IDMA3_PRIORITY_MEDIUM, 00129 IDMA3_PRIORITY_LOW 00130 00131 } IDMA3_Priority; 00132 00133 00137 typedef struct IDMA3_ChannelRec { 00138 00140 IDMA3_Handle handle; 00141 00146 Int numTransfers; 00147 00152 Int numWaits; 00153 00155 IDMA3_Priority priority; 00156 00165 IDMA3_ProtocolHandle protocol; 00166 00172 Bool persistent; 00173 00174 } IDMA3_ChannelRec; 00175 00176 00183 typedef struct IDMA3_Fxns { 00184 00189 Void *implementationId; 00190 00195 Void (*dmaChangeChannels)(IALG_Handle handle, IDMA3_ChannelRec *chnlRec); 00196 00201 Uns (*dmaGetChannelCnt)(Void); 00202 00207 Uns (*dmaGetChannels)(IALG_Handle handle, IDMA3_ChannelRec *chnlRec); 00208 00213 Int (*dmaInit)(IALG_Handle handle, IDMA3_ChannelRec *chnlRec); 00214 00215 } IDMA3_Fxns; 00216 00217 00242 typedef struct IDMA3_ProtocolObj { 00243 00247 String name; 00248 00253 Void (*getEnvMemRec)(IDMA3_ChannelRec *chnlRec, IDMA3_MemRec *memRec); 00254 00268 Bool (*initHandle)(IDMA3_Handle handle); 00269 00274 Bool (*deInitHandle)(IDMA3_Handle handle); 00275 00276 } IDMA3_ProtocolObj; 00277 00278 00283 typedef struct IDMA3_Obj { 00284 00286 unsigned short numTccs; 00287 00289 unsigned short numPaRams; 00290 00292 unsigned char *tccTable; 00293 00295 Uns *paRamAddr; 00296 00298 unsigned short qdmaChan; 00299 00304 Bool transferPending; 00305 00328 Void *env; 00329 00334 IDMA3_ProtocolHandle protocol; 00335 00337 Bool persistent; 00338 00339 } IDMA3_Obj; 00340 00341 00344 #ifdef __cplusplus 00345 } 00346 #endif 00347 00348 #endif 00349 /* 00350 * @(#) ti.xdais; 1, 2.0, 1,1; 6-19-2012 17:57:45; /db/wtree/library/trees/dais/dais-w06/src/ xlibrary 00351 00352 */ 00353