Framework Components Application Programming Interface (API)  fc-v07
ecpy.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2014, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
73 #ifndef ti_sdo_fc_ecpy_ECPY_
74 #define ti_sdo_fc_ecpy_ECPY_
75 
76 
77 #ifdef __cplusplus
78 extern "C" {
79 #endif
80 
83 
84 #define ti_sdo_fc_ires_NOPROTOCOLREV
86 
87 #define ECPY_GTNAME "ti.sdo.fc.ecpy"
88 
97 #define ECPY_MODNAME "ti.sdo.fc.ecpy"
98 
99 
105 typedef enum ECPY_ParamField16b {
106 
114 
116 
122 typedef enum ECPY_ParamField32b {
123 
128 
130 
141 typedef enum ECPY_TransferType {
142 
149 
164 
177 
191 
195 typedef struct ECPY_Obj *ECPY_Handle;
196 
197 
202 typedef struct ECPY_Params {
203 
206 
208  Void * srcAddr;
209 
211  Void * dstAddr;
212 
214  unsigned short elementSize;
215 
217  unsigned short numElements;
218 
220  unsigned short numFrames ;
221 
227 
233 
240 
247 
248 } ECPY_Params;
249 
250 
282 #if defined(ECPY_CONFIGURE_INLINE) || defined(ECPY_INLINE_ALL)
283 #include <ti/sdo/fc/ecpy/ecpy_configure.h>
284 #else
285 Void ECPY_configure(ECPY_Handle handle, ECPY_Params * restrict params,
286  short transferNo);
287 #endif
288 
320 #if defined(ECPY_DIRECTCONFIGURE_INLINE) || defined(ECPY_INLINE_ALL)
321 #include <ti/sdo/fc/ecpy/ecpy_directconfigure.h>
322 #else
323 Void ECPY_directConfigure(ECPY_Handle handle, ECPY_Params * restrict params,
324  short transferNo);
325 #endif
326 
327 
364 #if defined(ECPY_CONFIGURE16_INLINE) || defined(ECPY_INLINE_ALL)
365 #include <ti/sdo/fc/ecpy/ecpy_configure16.h>
366 #else
367 Void ECPY_configure16(ECPY_Handle handle, ECPY_ParamField16b fieldId,
368  unsigned short value, short transferNo);
369 #endif
370 
409 #if defined(ECPY_DIRECTCONFIGURE16_INLINE) || defined(ECPY_INLINE_ALL)
410 #include <ti/sdo/fc/ecpy/ecpy_directconfigure16.h>
411 #else
412 Void ECPY_directConfigure16(ECPY_Handle handle, ECPY_ParamField16b fieldId,
413  unsigned short value, short transferNo);
414 #endif
415 
453 #if defined(ECPY_CONFIGURE32_INLINE) || defined(ECPY_INLINE_ALL)
454 #include <ti/sdo/fc/ecpy/ecpy_configure32.h>
455 #else
456 Void ECPY_configure32(ECPY_Handle handle, ECPY_ParamField32b fieldId,
457  unsigned int value, short transferNo);
458 #endif
459 
498 #if defined(ECPY_DIRECTCONFIGURE32_INLINE) || defined(ECPY_INLINE_ALL)
499 #include <ti/sdo/fc/ecpy/ecpy_directconfigure32.h>
500 #else
501 Void ECPY_directConfigure32(ECPY_Handle handle, ECPY_ParamField32b fieldId,
502  unsigned int value, short transferNo);
503 #endif
504 
536 #if defined(ECPY_SETFINAL_INLINE) || defined(ECPY_INLINE_ALL)
537 #include <ti/sdo/fc/ecpy/ecpy_setfinal.h>
538 #else
539 Void ECPY_setFinal(ECPY_Handle handle, short transferNo);
540 #endif
541 
573 #if defined(ECPY_DIRECTSETFINAL_INLINE) || defined(ECPY_INLINE_ALL)
574 #include <ti/sdo/fc/ecpy/ecpy_directsetfinal.h>
575 #else
576 Void ECPY_directSetFinal(ECPY_Handle handle, short transferNo);
577 #endif
578 
590 Void ECPY_setDestinationMemoryMode(ECPY_Handle handle, short mode);
591 
628 #if defined(ECPY_START_INLINE) || defined(ECPY_INLINE_ALL)
629 #include <ti/sdo/fc/ecpy/ecpy_start.h>
630 #else
631 Void ECPY_start(ECPY_Handle handle);
632 #endif
633 
634 
677 #if defined(ECPY_DIRECTSTARTEDMA_INLINE) || defined(ECPY_INLINE_ALL)
678 #include <ti/sdo/fc/ecpy/ecpy_directstartedma.h>
679 #else
680 Void ECPY_directStartEdma(ECPY_Handle handle);
681 #endif
682 
686 Void ECPY_directStartQdma(ECPY_Handle handle);
687 
688 
715 #if defined(ECPY_WAIT_INLINE) || defined(ECPY_INLINE_ALL)
716 #include <ti/sdo/fc/ecpy/ecpy_wait.h>
717 #else
718 Void ECPY_wait(ECPY_Handle handle);
719 #endif
720 
753 #if defined(ECPY_DIRECTWAIT_INLINE) || defined(ECPY_INLINE_ALL)
754 #include <ti/sdo/fc/ecpy/ecpy_directwait.h>
755 #else
756 Void ECPY_directWait(ECPY_Handle handle);
757 #endif
758 
774 Void ECPY_activate(ECPY_Handle handle);
775 
789 ECPY_Handle ECPY_createHandle(IRES_EDMA3CHAN2_Handle handle, IALG_Handle alg);
790 
799 Void ECPY_deleteHandle(ECPY_Handle handle);
800 
815 Void ECPY_deactivate(ECPY_Handle handle);
816 
840 Void ECPY_setEarlyCompletionMode(ECPY_Handle handle, short enabled);
841 
845 Void ECPY_init(Void);
846 
850 Void ECPY_exit(Void);
851 
855 typedef Bool (ECPY_PersistentAllocFxn)(IALG_MemRec *memTab, Int numRecs);
856 
860 typedef Void (ECPY_PersistentFreeFxn)(IALG_MemRec *memTab, Int numRecs);
861 
866 typedef Bool (ECPY_ScratchAllocFxn)(IALG_Handle alg, Int scratchId,
867  IALG_MemRec *memTab, Int numRecs);
872 typedef Void (ECPY_ScratchFreeFxn)(Int mutexId, Void *addr, UInt size);
873 
879 
880 
891 typedef struct ECPY_CfgParams {
892 
897 
902 
908 
914 
921 
925 extern __FAR__ ECPY_CfgParams ECPY_CFG_PARAMS;
926 
929 #ifdef __cplusplus
930 }
931 #endif /* extern "C" */
932 
933 
934 #endif /* ti_sdo_fc_ecpy_ECPY_ */
Definition: ecpy.h:111
Void * dstAddr
Definition: ecpy.h:211
Void ECPY_directConfigure32(ECPY_Handle handle, ECPY_ParamField32b fieldId, unsigned int value, short transferNo)
Modify the 32-bit DMA transfer parameter, indicated by the parameter field id, fieldId, of the current channel settings.
Void ECPY_directSetFinal(ECPY_Handle handle, short transferNo)
Indicate that a given transfer will be the last in a sequence of linked transfers.
Void ECPY_directConfigure(ECPY_Handle handle, ECPY_Params *restrict params, short transferNo)
Configure the DMA transfer settings of handle's 'transferNo' transfer. This function always directly ...
Void ECPY_wait(ECPY_Handle handle)
Wait for all data transfers on a logical channel to complete.
Memory records.
Definition: ialg.h:142
ECPY_ScratchFreeFxn * scratchFreeFxn
Scratch Memory free function for all scratch allocated memory in ECPY Handle.
Definition: ecpy.h:913
ECPY_PersistentFreeFxn * freeFxn
Memory free function for all ECPY memory requirements.
Definition: ecpy.h:901
Void ECPY_activate(ECPY_Handle handle)
Activate the given channel.
Algorithm instance object definition.
Definition: ialg.h:159
Definition: ecpy.h:107
short dstFrameIndex
Definition: ecpy.h:246
Definition: ecpy.h:113
Definition: ecpy.h:110
Definition: ecpy.h:163
Void ECPY_init(Void)
Initialize the ECPY module. Called by framework.
Void ECPY_deleteHandle(ECPY_Handle handle)
Delete ECPY_Handle.
struct ECPY_Obj * ECPY_Handle
Handle to "logical" ECPY Channel.
Definition: ecpy.h:195
struct ECPY_Params ECPY_Params
DMA transfer specific parameters. Defines the configuration of a logical channel. ...
Void ECPY_directWait(ECPY_Handle handle)
Wait for all EDMA data transfers submitted to the logical channel via ECPY_directStartEdma to complet...
Definition: ecpy.h:127
Void ECPY_directStartQdma(ECPY_Handle handle)
ECPY_directStartQdma has not been implemented.
ECPY_ScratchAllocFxn * scratchAllocFxn
Scratch Memory allocation function for all shared scratch ECPY handle state.
Definition: ecpy.h:907
Void ECPY_setDestinationMemoryMode(ECPY_Handle handle, short mode)
Indicate the memory space that DMA transfers submitted to the channel associated with the handle will...
Void ECPY_directStartEdma(ECPY_Handle handle)
Submit a single or linked transfer using the most recently 'direct' configured transfer parameter set...
short srcFrameIndex
Definition: ecpy.h:239
ECPY_TransferType
ECPY DMA Transfer Types:
Definition: ecpy.h:141
short dstElementIndex
Definition: ecpy.h:232
Void ECPY_configure16(ECPY_Handle handle, ECPY_ParamField16b fieldId, unsigned short value, short transferNo)
Modify the 16-bit DMA transfer parameter, indicated by the parameter field id, fieldId, of the current channel settings.
The module configuration structure for ECPY. It is set at design time by the system integrator to reg...
Definition: ecpy.h:891
Definition: ecpy.h:108
ECPY_PersistentAllocFxn * allocFxn
Memory allocation function for all ECPY memory requirements.
Definition: ecpy.h:896
ECPY_Handle ECPY_createHandle(IRES_EDMA3CHAN2_Handle handle, IALG_Handle alg)
Create an ECPY Handle using the supplied IRES_EDMA3CHAN handle.
unsigned short elementSize
Definition: ecpy.h:214
Object returned to the algorithm requesting EDMA3 resources.
Definition: ires_edma3Chan.h:679
IRES EDMA3CHAN PROTOCOL Interface Definitions - Allows algorithms to request and receive handles repr...
Void ECPY_configure(ECPY_Handle handle, ECPY_Params *restrict params, short transferNo)
Configures the DMA transfer settings for the transfer=transferNo of the logical channel. Except for transferNo==1, the physical EDMA3 PaRAM associated with the transfer is modified. For transferNo==1 a "shadow" of the PaRAM registers gets configured, so that the configuration of 1st transfer remains persistent following ECPY_startEdma() calls.
Void * srcAddr
Definition: ecpy.h:208
Void ECPY_configure32(ECPY_Handle handle, ECPY_ParamField32b fieldId, unsigned int value, short transferNo)
Modify the 32-bit DMA transfer parameter, indicated by the parameter field id, fieldId, of the current channel settings.
ECPY_ParamField16b
ECPY 16-bit param field structure. These values are passed to ECPY_configure16() to indicate the fiel...
Definition: ecpy.h:105
Void ECPY_start(ECPY_Handle handle)
Submit a single or linked transfer using the most recently configured transfer parameter settings...
Void ECPY_deactivate(ECPY_Handle handle)
Deactivates the given channel.
__FAR__ ECPY_CfgParams ECPY_CFG_PARAMS
Initialization parameters for the ECPY module.
unsigned short numElements
Definition: ecpy.h:217
DMA transfer specific parameters. Defines the configuration of a logical channel. ...
Definition: ecpy.h:202
Void ECPY_setEarlyCompletionMode(ECPY_Handle handle, short enabled)
Setting the TCCMODE (Early or Normal) affects only the 'intermediate transfers' of the linked transfe...
Definition: ecpy.h:176
ECPY_getScratchIdFxn * getScratchIdFxn
Function, when supplied, returns the scratchId associated with the algorithm instance whose handle is...
Definition: ecpy.h:919
Bool( ECPY_ScratchAllocFxn)(IALG_Handle alg, Int scratchId, IALG_MemRec *memTab, Int numRecs)
Scratch Memory allocation function for all shared scratch ECPY handle state.
Definition: ecpy.h:866
ECPY_TransferType transferType
Definition: ecpy.h:205
Definition: ecpy.h:126
Definition: ecpy.h:109
struct ECPY_CfgParams ECPY_CfgParams
The module configuration structure for ECPY. It is set at design time by the system integrator to reg...
Void ECPY_exit(Void)
Finalization of the ECPY module.
Definition: ecpy.h:148
Void( ECPY_ScratchFreeFxn)(Int mutexId, Void *addr, UInt size)
Scratch Memory free function for all scratch allocated memory in ECPY Handle.
Definition: ecpy.h:872
Definition: ecpy.h:112
ECPY_ParamField32b
ECPY 32-bit param field structure. These values are passed to ECPY_configure32() to indicate the fiel...
Definition: ecpy.h:122
unsigned short numFrames
Definition: ecpy.h:220
Definition: ecpy.h:124
Definition: ecpy.h:125
Void( ECPY_PersistentFreeFxn)(IALG_MemRec *memTab, Int numRecs)
Memory deallocation function signature for module configuration.
Definition: ecpy.h:860
Definition: ecpy.h:189
Void ECPY_directConfigure16(ECPY_Handle handle, ECPY_ParamField16b fieldId, unsigned short value, short transferNo)
Modify the 16-bit DMA transfer parameter, indicated by the parameter field id, fieldId, of the current channel settings. This function always directly configures the physical EDMA3 PaRAM's 16-bit half of the 32-bit registered associated with the transfer & field . No shadow is used.
Void ECPY_setFinal(ECPY_Handle handle, short transferNo)
Indicate that a given transfer will be the last in a sequence of linked transfers.
short srcElementIndex
Definition: ecpy.h:226
Bool( ECPY_PersistentAllocFxn)(IALG_MemRec *memTab, Int numRecs)
Memory allocation function signature for module configuration.
Definition: ecpy.h:855
Int( ECPY_getScratchIdFxn)(IALG_Handle alg)
Function, when supplied, returns the scratchId associated with the algorithm instance whose handle is...
Definition: ecpy.h:878
Copyright 2016, Texas Instruments Incorporated