ecpy.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2013, 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 
00283 #if defined(ECPY_CONFIGURE_INLINE) || defined(ECPY_INLINE_ALL)
00284 #include <ti/sdo/fc/ecpy/ecpy_configure.h>
00285 #else
00286 Void ECPY_configure(ECPY_Handle handle, ECPY_Params * restrict params,
00287     short transferNo);
00288 #endif
00289 
00321 #if defined(ECPY_DIRECTCONFIGURE_INLINE) || defined(ECPY_INLINE_ALL)
00322 #include <ti/sdo/fc/ecpy/ecpy_directconfigure.h>
00323 #else
00324 Void ECPY_directConfigure(ECPY_Handle handle, ECPY_Params * restrict params,
00325     short transferNo);
00326 #endif
00327 
00328 
00365 #if defined(ECPY_CONFIGURE16_INLINE) || defined(ECPY_INLINE_ALL)
00366 #include <ti/sdo/fc/ecpy/ecpy_configure16.h>
00367 #else
00368 Void ECPY_configure16(ECPY_Handle handle, ECPY_ParamField16b fieldId,
00369         unsigned short value, short transferNo);
00370 #endif
00371 
00410 #if defined(ECPY_DIRECTCONFIGURE16_INLINE) || defined(ECPY_INLINE_ALL)
00411 #include <ti/sdo/fc/ecpy/ecpy_directconfigure16.h>
00412 #else
00413 Void ECPY_directConfigure16(ECPY_Handle handle, ECPY_ParamField16b fieldId,
00414         unsigned short value, short transferNo);
00415 #endif
00416 
00454 #if defined(ECPY_CONFIGURE32_INLINE) || defined(ECPY_INLINE_ALL)
00455 #include <ti/sdo/fc/ecpy/ecpy_configure32.h>
00456 #else
00457 Void ECPY_configure32(ECPY_Handle handle, ECPY_ParamField32b fieldId,
00458         unsigned int value, short transferNo);
00459 #endif
00460 
00499 #if defined(ECPY_DIRECTCONFIGURE32_INLINE) || defined(ECPY_INLINE_ALL)
00500 #include <ti/sdo/fc/ecpy/ecpy_directconfigure32.h>
00501 #else
00502 Void ECPY_directConfigure32(ECPY_Handle handle, ECPY_ParamField32b fieldId,
00503         unsigned int value, short transferNo);
00504 #endif
00505 
00537 #if defined(ECPY_SETFINAL_INLINE) || defined(ECPY_INLINE_ALL)
00538 #include <ti/sdo/fc/ecpy/ecpy_setfinal.h>
00539 #else
00540 Void ECPY_setFinal(ECPY_Handle handle, short transferNo);
00541 #endif
00542 
00574 #if defined(ECPY_DIRECTSETFINAL_INLINE) || defined(ECPY_INLINE_ALL)
00575 #include <ti/sdo/fc/ecpy/ecpy_directsetfinal.h>
00576 #else
00577 Void ECPY_directSetFinal(ECPY_Handle handle, short transferNo);
00578 #endif
00579 
00591 Void ECPY_setDestinationMemoryMode(ECPY_Handle handle, short mode);
00592 
00629 #if defined(ECPY_START_INLINE) || defined(ECPY_INLINE_ALL)
00630 #include <ti/sdo/fc/ecpy/ecpy_start.h>
00631 #else
00632 Void ECPY_start(ECPY_Handle handle);
00633 #endif
00634 
00635 
00678 #if defined(ECPY_DIRECTSTARTEDMA_INLINE) || defined(ECPY_INLINE_ALL)
00679 #include <ti/sdo/fc/ecpy/ecpy_directstartedma.h>
00680 #else
00681 Void ECPY_directStartEdma(ECPY_Handle handle);
00682 #endif
00683 
00687 Void ECPY_directStartQdma(ECPY_Handle handle);
00688 
00689 
00716 #if defined(ECPY_WAIT_INLINE) || defined(ECPY_INLINE_ALL)
00717 #include <ti/sdo/fc/ecpy/ecpy_wait.h>
00718 #else
00719 Void ECPY_wait(ECPY_Handle handle);
00720 #endif
00721 
00754 #if defined(ECPY_DIRECTWAIT_INLINE) || defined(ECPY_INLINE_ALL)
00755 #include <ti/sdo/fc/ecpy/ecpy_directwait.h>
00756 #else
00757 Void ECPY_directWait(ECPY_Handle handle);
00758 #endif
00759 
00775 Void ECPY_activate(ECPY_Handle handle);
00776 
00790 ECPY_Handle ECPY_createHandle(IRES_EDMA3CHAN2_Handle handle, IALG_Handle alg);
00791 
00800 Void ECPY_deleteHandle(ECPY_Handle handle);
00801 
00816 Void ECPY_deactivate(ECPY_Handle handle);
00817 
00841 Void ECPY_setEarlyCompletionMode(ECPY_Handle handle, short enabled);
00842 
00846 Void ECPY_init(Void);
00847 
00851 Void ECPY_exit(Void);
00852 
00856 typedef Bool (ECPY_PersistentAllocFxn)(IALG_MemRec *memTab, Int numRecs);
00857 
00861 typedef Void (ECPY_PersistentFreeFxn)(IALG_MemRec *memTab, Int numRecs);
00862 
00867 typedef Bool (ECPY_ScratchAllocFxn)(IALG_Handle alg, Int scratchId,
00868                                     IALG_MemRec *memTab, Int numRecs);
00873 typedef Void (ECPY_ScratchFreeFxn)(Int mutexId, Void *addr, UInt size);
00874 
00879 typedef Int  (ECPY_getScratchIdFxn)(IALG_Handle alg);
00880 
00881 
00892 typedef struct ECPY_CfgParams {
00893 
00897     ECPY_PersistentAllocFxn * allocFxn;
00898 
00902     ECPY_PersistentFreeFxn * freeFxn;
00903 
00908     ECPY_ScratchAllocFxn * scratchAllocFxn;
00909 
00914     ECPY_ScratchFreeFxn * scratchFreeFxn;
00915 
00920     ECPY_getScratchIdFxn *getScratchIdFxn;
00921 } ECPY_CfgParams;
00922 
00926 extern __FAR__ ECPY_CfgParams ECPY_CFG_PARAMS;
00927 
00930 #ifdef __cplusplus
00931 }
00932 #endif /* extern "C" */
00933 
00934 
00935 #endif /* ti_sdo_fc_ecpy_ECPY_ */
00936 
00937 /*
00938  *  @(#) ti.sdo.fc.ecpy; 1, 0, 1,4; 2-7-2013 17:31:15; /db/atree/library/trees/fc/fc-r17/src/ xlibrary
00939 
00940  */
00941 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2013, Texas Instruments Incorporated