ecpy.h

Go to the documentation of this file.
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  */
00074 #ifndef ti_sdo_fc_ecpy_ECPY_
00075 #define ti_sdo_fc_ecpy_ECPY_
00076 
00077 
00078 #ifdef __cplusplus
00079 extern "C" {
00080 #endif
00081 
00084 
00085 #define ti_sdo_fc_ires_NOPROTOCOLREV
00086 #include <ti/sdo/fc/ires/edma3chan/ires_edma3Chan.h>
00087 
00088 #define ECPY_GTNAME "ti.sdo.fc.ecpy"
00089 
00098 #define ECPY_MODNAME "ti.sdo.fc.ecpy"
00099 
00100 
00106 typedef enum ECPY_ParamField16b {
00107 
00108     ECPY_PARAMFIELD_ELEMENTSIZE =  8,
00109     ECPY_PARAMFIELD_NUMELEMENTS = 10 ,
00110     ECPY_PARAMFIELD_ELEMENTINDEX_SRC = 16,
00111     ECPY_PARAMFIELD_ELEMENTINDEX_DST = 18,
00112     ECPY_PARAMFIELD_FRAMEINDEX_SRC =  24,
00113     ECPY_PARAMFIELD_FRAMEINDEX_DST =  26,
00114     ECPY_PARAMFIELD_NUMFRAMES = 28
00115 
00116 } ECPY_ParamField16b;
00117 
00123 typedef enum ECPY_ParamField32b {
00124 
00125     ECPY_PARAMFIELD_SRCADDR = 4,
00126     ECPY_PARAMFIELD_DSTADDR = 12,
00127     ECPY_PARAMFIELD_ELEMENTINDEXES = 16,
00128     ECPY_PARAMFIELD_FRAMEINDEXES = 24
00129 
00130 } ECPY_ParamField32b;
00131 
00142 typedef enum ECPY_TransferType {
00143 
00149     ECPY_1D1D,
00150 
00164     ECPY_1D2D,
00165 
00177     ECPY_2D1D,
00178 
00190     ECPY_2D2D
00191 } ECPY_TransferType;
00192 
00196 typedef struct ECPY_Obj *ECPY_Handle;
00197 
00198 
00203 typedef struct ECPY_Params {
00204 
00206     ECPY_TransferType transferType;
00207 
00209     Void *         srcAddr;
00210 
00212     Void *         dstAddr;
00213 
00215     unsigned short elementSize;
00216 
00218     unsigned short numElements;
00219 
00221     unsigned short numFrames ;
00222 
00227     short srcElementIndex;
00228 
00233     short dstElementIndex;
00234 
00240     short srcFrameIndex;
00241 
00247     short dstFrameIndex;
00248 
00249 } ECPY_Params;
00250 
00251 
00274 Void ECPY_configure(ECPY_Handle handle, ECPY_Params * restrict params,
00275     short transferNo);
00276 
00299 Void ECPY_directConfigure(ECPY_Handle handle, ECPY_Params * restrict params,
00300     short transferNo);
00301 
00302 
00339 #if defined(ECPY_CONFIGURE16) || defined(ECPY_INLINE_ALL)
00340 #include <ti/sdo/fc/ecpy/ecpy_configure16.h>
00341 #else
00342 Void ECPY_configure16(ECPY_Handle handle, ECPY_ParamField16b fieldId,
00343         unsigned short value, short transferNo);
00344 
00383 Void ECPY_directConfigure16(ECPY_Handle handle, ECPY_ParamField16b fieldId,
00384         unsigned short value, short transferNo);
00385 #endif
00386 
00424 #if defined(ECPY_CONFIGURE32_INLINE) || defined(ECPY_INLINE_ALL)
00425 #include <ti/sdo/fc/ecpy/ecpy_configure32.h>
00426 #else
00427 Void ECPY_configure32(ECPY_Handle handle, ECPY_ParamField32b fieldId,
00428         unsigned int value, short transferNo);
00429 
00468 Void ECPY_directConfigure32(ECPY_Handle handle, ECPY_ParamField32b fieldId,
00469         unsigned int value, short transferNo);
00470 #endif
00471 
00494 #if defined(ECPY_SETFINAL_INLINE) || defined(ECPY_INLINE_ALL)
00495 #include <ti/sdo/fc/ecpy/ecpy_setfinal.h>
00496 #else
00497 Void ECPY_setFinal(ECPY_Handle handle, short transferNo);
00498 
00521 Void ECPY_directSetFinal(ECPY_Handle handle, short transferNo);
00522 #endif
00523 
00535 Void ECPY_setDestinationMemoryMode(ECPY_Handle handle, short mode);
00536 
00564 Void ECPY_start(ECPY_Handle handle);
00565 
00566 
00600 Void ECPY_directStartEdma(ECPY_Handle handle);
00601 
00605 Void ECPY_directStartQdma(ECPY_Handle handle);
00606 
00607 
00634 #if defined(ECPY_WAIT_INLINE) || defined(ECPY_INLINE_ALL)
00635 #include <ti/sdo/fc/ecpy/ecpy_wait.h>
00636 #else
00637 Void ECPY_wait(ECPY_Handle handle);
00638 #endif
00639 
00672 #if defined(ECPY_DIRECTWAIT_INLINE) || defined(ECPY_INLINE_ALL)
00673 #include <ti/sdo/fc/ecpy/ecpy_directwait.h>
00674 #else
00675 Void ECPY_directWait(ECPY_Handle handle);
00676 #endif
00677 
00693 Void ECPY_activate(ECPY_Handle handle);
00694 
00708 ECPY_Handle ECPY_createHandle(IRES_EDMA3CHAN2_Handle handle, IALG_Handle alg);
00709 
00718 Void ECPY_deleteHandle(ECPY_Handle handle);
00719 
00734 Void ECPY_deactivate(ECPY_Handle handle);
00735 
00759 Void ECPY_setEarlyCompletionMode(ECPY_Handle handle, short enabled);
00760 
00764 Void ECPY_init(Void);
00765 
00769 Void ECPY_exit(Void);
00770 
00774 typedef Bool (ECPY_PersistentAllocFxn)(IALG_MemRec *memTab, Int numRecs);
00775 
00779 typedef Void (ECPY_PersistentFreeFxn)(IALG_MemRec *memTab, Int numRecs);
00780 
00785 typedef Bool (ECPY_ScratchAllocFxn)(IALG_Handle alg, Int scratchId,
00786                                     IALG_MemRec *memTab, Int numRecs);
00791 typedef Void (ECPY_ScratchFreeFxn)(Int mutexId, Void *addr, UInt size);
00792 
00797 typedef Int  (ECPY_getScratchIdFxn)(IALG_Handle alg);
00798 
00799 
00810 typedef struct ECPY_CfgParams {
00811 
00815     ECPY_PersistentAllocFxn * allocFxn;
00816 
00820     ECPY_PersistentFreeFxn * freeFxn;
00821 
00826     ECPY_ScratchAllocFxn * scratchAllocFxn;
00827 
00832     ECPY_ScratchFreeFxn * scratchFreeFxn;
00833 
00838     ECPY_getScratchIdFxn *getScratchIdFxn;
00839 } ECPY_CfgParams;
00840 
00844 extern __FAR__ ECPY_CfgParams ECPY_CFG_PARAMS;
00845 
00848 #ifdef __cplusplus
00849 }
00850 #endif /* extern "C" */
00851 
00852 
00853 #endif /* ti_sdo_fc_ecpy_ECPY_ */
00854 
00855 /*
00856  *  @(#) ti.sdo.fc.ecpy; 1, 0, 1,3; 4-16-2012 00:00:35; /db/atree/library/trees/fc/fc-q08/src/ xlibrary
00857 
00858  */
00859 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated