00001 /* 00002 * Copyright (c) 2010, 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 */ 00048 #ifndef ti_sdo_fc_scpy_SCPY_ 00049 #define ti_sdo_fc_scpy_SCPY_ 00050 00051 00052 /* TODO: Uncommenting the below define creates ordering dependencies between 00053 ires_sdma.h and scpy.h (ires_sdma.h needs to be before scpy.h) 00054 Need to figure this out, till then commenting it out. 00055 Warnings appear during build of this library */ 00056 /* #define ti_sdo_fc_ires_NOPROTOCOLREV*/ 00057 00060 00061 #ifdef __cplusplus 00062 extern "C" { 00063 #endif 00064 00065 #include <ti/sdo/fc/ires/sdma/ires_sdma.h> 00066 00067 #define OMAP_DMA_DATA_TYPE_S8 0x00 00068 #define OMAP_DMA_DATA_TYPE_S16 0x01 00069 #define OMAP_DMA_DATA_TYPE_S32 0x02 00070 00071 #define OMAP_DMA_PORT_EMIFF 0x00 00072 00073 #define OMAP_DMA_AMODE_POST_CONST 0x00 00074 #define OMAP_DMA_AMODE_POST_INC 0x01 00075 #define OMAP_DMA_AMODE_POST_SINGLE_INDEX 0x02 00076 #define OMAP_DMA_AMODE_POST_DOUBLE_INDEX 0x03 00077 00081 #define OMAP_DMA_SYNC_MODE_ELEMENT 0x00 00082 #define OMAP_DMA_SYNC_MODE_FRAME 0x01 00083 #define OMAP_DMA_SYNC_MODE_BLOCK 0x02 00084 00085 #define OMAP_DMA_SYNC_TYPE_DEST 0x00 00086 #define OMAP_DMA_SYNC_TYPE_SRC 0x01 00087 00088 00092 typedef struct SCPY_AddrParams { 00093 int addr_mode; 00094 unsigned int addr; 00095 int elem_index; 00096 int frame_index; 00097 } SCPY_AddrParams; 00098 00102 typedef struct SCPY_TransferParams { 00103 int dataType; 00104 int elemCount; 00105 int frameCount; 00106 } SCPY_TransferParams; 00107 00108 /* 00109 * @brief Paramters of transfer 00110 */ 00111 typedef struct SCPY_Params { 00112 SCPY_AddrParams * src; 00113 SCPY_AddrParams * dst; 00114 SCPY_TransferParams * transfer; 00115 } SCPY_Params; 00116 00120 void SCPY_init(); 00121 00125 void SCPY_exit(); 00126 00138 void SCPY_configure(IRES_SDMA_Handle logicalChannel, SCPY_Params * params); 00139 00146 void SCPY_start(IRES_SDMA_Handle logicalChannel); 00147 00154 void SCPY_wait(IRES_SDMA_Handle logicalChannel); 00155 00164 Bool SCPY_complete(IRES_SDMA_Handle logicalChannel); 00165 00166 00167 #ifdef __cplusplus 00168 } 00169 #endif /* extern "C" */ 00170 00172 #endif /* ti_sdo_fc_scpy_SCPY_*/ 00173 /* 00174 * @(#) ti.sdo.fc.scpy; 1, 0, 0,204; 11-2-2010 18:27:50; /db/atree/library/trees/fc/fc-n22x/src/ xlibrary 00175 00176 */ 00177