ecpy.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright 2013 by Texas Instruments Incorporated.
00003  *
00004  */
00005 
00006 /*
00007  * Copyright (c) 2012, Texas Instruments Incorporated
00008  * All rights reserved.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  *
00014  * *  Redistributions of source code must retain the above copyright
00015  *    notice, this list of conditions and the following disclaimer.
00016  *
00017  * *  Redistributions in binary form must reproduce the above copyright
00018  *    notice, this list of conditions and the following disclaimer in the
00019  *    documentation and/or other materials provided with the distribution.
00020  *
00021  * *  Neither the name of Texas Instruments Incorporated nor the names of
00022  *    its contributors may be used to endorse or promote products derived
00023  *    from this software without specific prior written permission.
00024  *
00025  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00026  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00027  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00028  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00029  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00032  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00033  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00034  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00035  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036  *
00037  */
00079 #ifndef ti_sdo_fc_ecpy_ECPY_
00080 #define ti_sdo_fc_ecpy_ECPY_
00081 
00082 
00083 #ifdef __cplusplus
00084 extern "C" {
00085 #endif
00086 
00089 
00090 #define ti_sdo_fc_ires_NOPROTOCOLREV
00091 #include <ti/sdo/fc/ires/edma3chan/ires_edma3Chan.h>
00092 
00093 #define ECPY_GTNAME "ti.sdo.fc.ecpy"
00094 
00103 #define ECPY_MODNAME "ti.sdo.fc.ecpy"
00104 
00105 
00111 typedef enum ECPY_ParamField16b {
00112 
00113     ECPY_PARAMFIELD_ELEMENTSIZE =  8,
00114     ECPY_PARAMFIELD_NUMELEMENTS = 10 ,
00115     ECPY_PARAMFIELD_ELEMENTINDEX_SRC = 16,
00116     ECPY_PARAMFIELD_ELEMENTINDEX_DST = 18,
00117     ECPY_PARAMFIELD_FRAMEINDEX_SRC =  24,
00118     ECPY_PARAMFIELD_FRAMEINDEX_DST =  26,
00119     ECPY_PARAMFIELD_NUMFRAMES = 28
00120 
00121 } ECPY_ParamField16b;
00122 
00128 typedef enum ECPY_ParamField32b {
00129 
00130     ECPY_PARAMFIELD_SRCADDR = 4,
00131     ECPY_PARAMFIELD_DSTADDR = 12,
00132     ECPY_PARAMFIELD_ELEMENTINDEXES = 16,
00133     ECPY_PARAMFIELD_FRAMEINDEXES = 24
00134 
00135 } ECPY_ParamField32b;
00136 
00147 typedef enum ECPY_TransferType {
00148 
00154     ECPY_1D1D,
00155 
00169     ECPY_1D2D,
00170 
00182     ECPY_2D1D,
00183 
00195     ECPY_2D2D
00196 } ECPY_TransferType;
00197 
00201 typedef struct ECPY_Obj *ECPY_Handle;
00202 
00203 
00208 typedef struct ECPY_Params {
00209 
00211     ECPY_TransferType transferType;
00212 
00214     Void *         srcAddr;
00215 
00217     Void *         dstAddr;
00218 
00220     unsigned short elementSize;
00221 
00223     unsigned short numElements;
00224 
00226     unsigned short numFrames ;
00227 
00232     short srcElementIndex;
00233 
00238     short dstElementIndex;
00239 
00245     short srcFrameIndex;
00246 
00252     short dstFrameIndex;
00253 
00254 } ECPY_Params;
00255 
00256 
00288 #if defined(ECPY_CONFIGURE_INLINE) || defined(ECPY_INLINE_ALL)
00289 #include <ti/sdo/fc/ecpy/ecpy_configure.h>
00290 #else
00291 Void ECPY_configure(ECPY_Handle handle, ECPY_Params * restrict params,
00292     short transferNo);
00293 #endif
00294 
00326 #if defined(ECPY_DIRECTCONFIGURE_INLINE) || defined(ECPY_INLINE_ALL)
00327 #include <ti/sdo/fc/ecpy/ecpy_directconfigure.h>
00328 #else
00329 Void ECPY_directConfigure(ECPY_Handle handle, ECPY_Params * restrict params,
00330     short transferNo);
00331 #endif
00332 
00333 
00370 #if defined(ECPY_CONFIGURE16_INLINE) || defined(ECPY_INLINE_ALL)
00371 #include <ti/sdo/fc/ecpy/ecpy_configure16.h>
00372 #else
00373 Void ECPY_configure16(ECPY_Handle handle, ECPY_ParamField16b fieldId,
00374         unsigned short value, short transferNo);
00375 #endif
00376 
00415 #if defined(ECPY_DIRECTCONFIGURE16_INLINE) || defined(ECPY_INLINE_ALL)
00416 #include <ti/sdo/fc/ecpy/ecpy_directconfigure16.h>
00417 #else
00418 Void ECPY_directConfigure16(ECPY_Handle handle, ECPY_ParamField16b fieldId,
00419         unsigned short value, short transferNo);
00420 #endif
00421 
00459 #if defined(ECPY_CONFIGURE32_INLINE) || defined(ECPY_INLINE_ALL)
00460 #include <ti/sdo/fc/ecpy/ecpy_configure32.h>
00461 #else
00462 Void ECPY_configure32(ECPY_Handle handle, ECPY_ParamField32b fieldId,
00463         unsigned int value, short transferNo);
00464 #endif
00465 
00504 #if defined(ECPY_DIRECTCONFIGURE32_INLINE) || defined(ECPY_INLINE_ALL)
00505 #include <ti/sdo/fc/ecpy/ecpy_directconfigure32.h>
00506 #else
00507 Void ECPY_directConfigure32(ECPY_Handle handle, ECPY_ParamField32b fieldId,
00508         unsigned int value, short transferNo);
00509 #endif
00510 
00542 #if defined(ECPY_SETFINAL_INLINE) || defined(ECPY_INLINE_ALL)
00543 #include <ti/sdo/fc/ecpy/ecpy_setfinal.h>
00544 #else
00545 Void ECPY_setFinal(ECPY_Handle handle, short transferNo);
00546 #endif
00547 
00579 #if defined(ECPY_DIRECTSETFINAL_INLINE) || defined(ECPY_INLINE_ALL)
00580 #include <ti/sdo/fc/ecpy/ecpy_directsetfinal.h>
00581 #else
00582 Void ECPY_directSetFinal(ECPY_Handle handle, short transferNo);
00583 #endif
00584 
00596 Void ECPY_setDestinationMemoryMode(ECPY_Handle handle, short mode);
00597 
00634 #if defined(ECPY_START_INLINE) || defined(ECPY_INLINE_ALL)
00635 #include <ti/sdo/fc/ecpy/ecpy_start.h>
00636 #else
00637 Void ECPY_start(ECPY_Handle handle);
00638 #endif
00639 
00640 
00683 #if defined(ECPY_DIRECTSTARTEDMA_INLINE) || defined(ECPY_INLINE_ALL)
00684 #include <ti/sdo/fc/ecpy/ecpy_directstartedma.h>
00685 #else
00686 Void ECPY_directStartEdma(ECPY_Handle handle);
00687 #endif
00688 
00692 Void ECPY_directStartQdma(ECPY_Handle handle);
00693 
00694 
00721 #if defined(ECPY_WAIT_INLINE) || defined(ECPY_INLINE_ALL)
00722 #include <ti/sdo/fc/ecpy/ecpy_wait.h>
00723 #else
00724 Void ECPY_wait(ECPY_Handle handle);
00725 #endif
00726 
00759 #if defined(ECPY_DIRECTWAIT_INLINE) || defined(ECPY_INLINE_ALL)
00760 #include <ti/sdo/fc/ecpy/ecpy_directwait.h>
00761 #else
00762 Void ECPY_directWait(ECPY_Handle handle);
00763 #endif
00764 
00780 Void ECPY_activate(ECPY_Handle handle);
00781 
00795 ECPY_Handle ECPY_createHandle(IRES_EDMA3CHAN2_Handle handle, IALG_Handle alg);
00796 
00805 Void ECPY_deleteHandle(ECPY_Handle handle);
00806 
00821 Void ECPY_deactivate(ECPY_Handle handle);
00822 
00846 Void ECPY_setEarlyCompletionMode(ECPY_Handle handle, short enabled);
00847 
00851 Void ECPY_init(Void);
00852 
00856 Void ECPY_exit(Void);
00857 
00861 typedef Bool (ECPY_PersistentAllocFxn)(IALG_MemRec *memTab, Int numRecs);
00862 
00866 typedef Void (ECPY_PersistentFreeFxn)(IALG_MemRec *memTab, Int numRecs);
00867 
00872 typedef Bool (ECPY_ScratchAllocFxn)(IALG_Handle alg, Int scratchId,
00873                                     IALG_MemRec *memTab, Int numRecs);
00878 typedef Void (ECPY_ScratchFreeFxn)(Int mutexId, Void *addr, UInt size);
00879 
00884 typedef Int  (ECPY_getScratchIdFxn)(IALG_Handle alg);
00885 
00886 
00897 typedef struct ECPY_CfgParams {
00898 
00902     ECPY_PersistentAllocFxn * allocFxn;
00903 
00907     ECPY_PersistentFreeFxn * freeFxn;
00908 
00913     ECPY_ScratchAllocFxn * scratchAllocFxn;
00914 
00919     ECPY_ScratchFreeFxn * scratchFreeFxn;
00920 
00925     ECPY_getScratchIdFxn *getScratchIdFxn;
00926 } ECPY_CfgParams;
00927 
00931 extern __FAR__ ECPY_CfgParams ECPY_CFG_PARAMS;
00932 
00935 #ifdef __cplusplus
00936 }
00937 #endif /* extern "C" */
00938 
00939 
00940 #endif /* ti_sdo_fc_ecpy_ECPY_ */
00941 /*
00942  *  @(#) ti.sdo.fc.ecpy; 1, 0, 1,1; 6-12-2013 19:56:41; /db/atree/library/trees/fc/fc-t09/src/ xlibrary
00943 
00944  */
00945 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2013, Texas Instruments Incorporated