Framework Components Application Programming Interface (API)  fc-u06
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Macros | Typedefs
EdmaMgr

EDMA3 Functional library. More...

Functions

int32_t EdmaMgr_init (int32_t proc_id, void *edma3_config)
 Initialize EdmaMgr.
EdmaMgr_Handle EdmaMgr_alloc (int32_t max_linked_transfers)
 Allocate an EdmaMgr channel.
int32_t EdmaMgr_free (EdmaMgr_Handle h)
 Frees an EdmaMgr channel.
void EdmaMgr_wait (EdmaMgr_Handle h)
 Wait for transfers to complete.
int32_t EdmaMgr_copy1D1D (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes)
 Perform a single 1D->1D transfer.
int32_t EdmaMgr_copy1D2D (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t pitch)
 Perform a 1D->2D transfer.
int32_t EdmaMgr_copy2D1D (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t pitch)
 Perform a 2D->1D transfer.
int32_t EdmaMgr_copy2D2D (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t pitch)
 Perform a 2D->2D transfer of buffers with the same pitch.
int32_t EdmaMgr_copy2D2DSep (EdmaMgr_Handle h, void *restrict src, void *restrict dst, int32_t num_bytes, int32_t num_lines, int32_t src_pitch, int32_t dst_pitch)
 Perform a 2D->2D transfer of buffers with different pitches.
int32_t EdmaMgr_copy1D1DLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_transfers)
 Perform a group of linked 1D->1D transfers.
int32_t EdmaMgr_copy1D2DLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_lines[], int32_t pitch[], int32_t num_transfers)
 Perform a group of linked 1D->2D transfers.
int32_t EdmaMgr_copy2D1DLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_lines[], int32_t pitch[], int32_t num_transfers)
 Perform a group of linked 2D->1D transfers.
int32_t EdmaMgr_copy2D2DLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_lines[], int32_t pitch[], int32_t num_transfers)
 Perform a group of linked 2D->2D transfers.
int32_t EdmaMgr_copy2D2DSepLinked (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_bytes[], int32_t num_lines[], int32_t src_pitch[], int32_t dst_pitch[], int32_t num_transfers)
 Perform a group of linked 2D->2D transfers with different pitches.
int32_t EdmaMgr_copyFast (EdmaMgr_Handle h, void *restrict src, void *restrict dst)
 Perform a fast copy. This API inherits the transfer configuration of a previous transfer and only modifies the src and dst addresses.
int32_t EdmaMgr_copyLinkedFast (EdmaMgr_Handle h, void *restrict src[], void *restrict dst[], int32_t num_transfers)
 Perform a linked fast copy. This API inherits the transfer configuration of a previous transfer and only modifies the src and dst addresses.

Macros

#define EdmaMgr_SUCCESS   0
#define EdmaMgr_ERROR_INVARG   -1
#define EdmaMgr_ERROR_INVCFG   -2
#define EdmaMgr_ERROR_RMANINIT   -3
#define EdmaMgr_ERROR_INVHANDLE   -4
#define EdmaMgr_ERROR_FREE   -5

Typedefs

typedef void * EdmaMgr_Handle
 Handle to an EdmaMgr instance.

Detailed Description

EDMA3 Functional library.


Function Documentation

int32_t EdmaMgr_init ( int32_t  proc_id,
void *  edma3_config 
)

Initialize EdmaMgr.

@param[in]  proc_id         Processor ID. This ID is used to index into the
                            EDMA3_InstanceInitConfig array pointed to by the
                            ti_sdo_fc_edmamgr_edma3RegionConfig variable.

@param[in]  edma3_config    Optional edma3_config which will override the
                            configuration which is pointed to by
                            ti_sdo_fc_edmamgr_edma3RegionConfig.

@retval     EdmaMgr_SUCCESS         \copybrief EdmaMgr_SUCCESS

Success

Return values:
EdmaMgr_ERROR_INVARGFailure, Invalid Argument
EdmaMgr_ERROR_INVCFGFailure, Invalid Configuration
EdmaMgr_ERROR_RMANINITFailure, RMAN initialization
@remarks    @c edma3_config may be NULL to accept default values.

@remarks    The FC product includes an example (ex23_edmamgr) which
            demonstrates how to set up a @c ti_sdo_fc_edma3RegionConfig
            variable.
EdmaMgr_Handle EdmaMgr_alloc ( int32_t  max_linked_transfers)

Allocate an EdmaMgr channel.

Parameters:
[in]max_linked_transfersMaximum linked transfers
Return values:
NULLFailure to allocate the channel
non-NULLSuccess
Precondition:
EdmaMgr_init() must have first been called.
int32_t EdmaMgr_free ( EdmaMgr_Handle  h)

Frees an EdmaMgr channel.

@param[in]  h       Handle returned from EdmaMgr_alloc().

@retval     EdmaMgr_SUCCESS         \copybrief EdmaMgr_SUCCESS

Success

Return values:
EdmaMgr_ERROR_INVHANDLEFailure, Invalid Handle
EdmaMgr_ERROR_FREEFailure to free a resource
@pre        @c h must be a handle successfully returned from EdmaMgr_alloc().
void EdmaMgr_wait ( EdmaMgr_Handle  h)

Wait for transfers to complete.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
Remarks:
This function waits for all transfers on a specific channel to complete. It is a blocking call.
int32_t EdmaMgr_copy1D1D ( EdmaMgr_Handle  h,
void *restrict  src,
void *restrict  dst,
int32_t  num_bytes 
)

Perform a single 1D->1D transfer.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]srcSource address
[in]dstDestination address
[in]num_bytesNumber of bytes to transfer
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
Remarks:
Perform a single 1D->1D transfer of num_bytes bytes from src address to dst address.
See also:
EdmaMgr_copy1D1DLinked
int32_t EdmaMgr_copy1D2D ( EdmaMgr_Handle  h,
void *restrict  src,
void *restrict  dst,
int32_t  num_bytes,
int32_t  num_lines,
int32_t  pitch 
)

Perform a 1D->2D transfer.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]srcSource address
[in]dstDestination address
[in]num_bytesNumber of bytes to transfer
[in]num_linesNumber of lines
[in]pitchPitch
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
Remarks:
Perform a 1D->2D transfer of num_bytes bytes. The source is one dimensional, and the destination is two dimensional.
After every line of num_bytes is transferred, the src address is incremented by num_bytes and the dst address is incremented by pitch bytes.
int32_t EdmaMgr_copy2D1D ( EdmaMgr_Handle  h,
void *restrict  src,
void *restrict  dst,
int32_t  num_bytes,
int32_t  num_lines,
int32_t  pitch 
)

Perform a 2D->1D transfer.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]srcSource address
[in]dstDestination address
[in]num_bytesNumber of bytes to transfer
[in]num_linesNumber of lines
[in]pitchPitch
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
Remarks:
Perform a 2D->1D transfer of num_bytes bytes. The source is two dimensional, and the destination is one dimensional.
After every line of num_bytes is transferred, the src address is incremented by pitch and the dst address is incremented by num_bytes bytes.
int32_t EdmaMgr_copy2D2D ( EdmaMgr_Handle  h,
void *restrict  src,
void *restrict  dst,
int32_t  num_bytes,
int32_t  num_lines,
int32_t  pitch 
)

Perform a 2D->2D transfer of buffers with the same pitch.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]srcSource address
[in]dstDestination address
[in]num_bytesNumber of bytes to transfer
[in]num_linesNumber of lines
[in]pitchPitch
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
Remarks:
Perform a 2D->2D transfer of num_bytes bytes. The source and destination are two dimensional.
After every line of num_bytes is transferred, the src address and dst address is incremented by pitch bytes.
int32_t EdmaMgr_copy2D2DSep ( EdmaMgr_Handle  h,
void *restrict  src,
void *restrict  dst,
int32_t  num_bytes,
int32_t  num_lines,
int32_t  src_pitch,
int32_t  dst_pitch 
)

Perform a 2D->2D transfer of buffers with different pitches.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]srcSource address
[in]dstDestination address
[in]num_bytesNumber of bytes to transfer
[in]num_linesNumber of lines
[in]src_pitchSource buffer pitch
[in]dst_pitchDestination buffer pitch
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
Remarks:
Perform a 2D->2D transfer of num_bytes bytes. The source and destination are two dimensional.
After every line of num_bytes is transferred, the src address is incremented by src_pitch bytes and the dst address is incremented by dst_pitch bytes.
int32_t EdmaMgr_copy1D1DLinked ( EdmaMgr_Handle  h,
void *restrict  src[],
void *restrict  dst[],
int32_t  num_bytes[],
int32_t  num_transfers 
)

Perform a group of linked 1D->1D transfers.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]src[]Array of source addresses
[in]dst[]Array of destination addresses
[in]num_bytes[]Array of number of bytes to transfer
[in]num_transfersNumber of transfers
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
See also:
EdmaMgr_copy1D1D
int32_t EdmaMgr_copy1D2DLinked ( EdmaMgr_Handle  h,
void *restrict  src[],
void *restrict  dst[],
int32_t  num_bytes[],
int32_t  num_lines[],
int32_t  pitch[],
int32_t  num_transfers 
)

Perform a group of linked 1D->2D transfers.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]src[]Array of source addresses
[in]dst[]Array of destination addresses
[in]num_bytes[]Array of number of bytes to transfer
[in]num_lines[]Array of lines to transfer
[in]pitch[]Array of pitches
[in]num_transfersNumber of transfers
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
See also:
EdmaMgr_copy1D2D
int32_t EdmaMgr_copy2D1DLinked ( EdmaMgr_Handle  h,
void *restrict  src[],
void *restrict  dst[],
int32_t  num_bytes[],
int32_t  num_lines[],
int32_t  pitch[],
int32_t  num_transfers 
)

Perform a group of linked 2D->1D transfers.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]src[]Array of source addresses
[in]dst[]Array of destination addresses
[in]num_bytes[]Array of number of bytes to transfer
[in]num_lines[]Array of lines to transfer
[in]pitch[]Array of pitches
[in]num_transfersNumber of transfers
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
See also:
EdmaMgr_copy2D1D
int32_t EdmaMgr_copy2D2DLinked ( EdmaMgr_Handle  h,
void *restrict  src[],
void *restrict  dst[],
int32_t  num_bytes[],
int32_t  num_lines[],
int32_t  pitch[],
int32_t  num_transfers 
)

Perform a group of linked 2D->2D transfers.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]src[]Array of source addresses
[in]dst[]Array of destination addresses
[in]num_bytes[]Array of number of bytes to transfer
[in]num_lines[]Array of lines to transfer
[in]pitch[]Array of pitches
[in]num_transfersNumber of transfers
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
See also:
EdmaMgr_copy2D2D
int32_t EdmaMgr_copy2D2DSepLinked ( EdmaMgr_Handle  h,
void *restrict  src[],
void *restrict  dst[],
int32_t  num_bytes[],
int32_t  num_lines[],
int32_t  src_pitch[],
int32_t  dst_pitch[],
int32_t  num_transfers 
)

Perform a group of linked 2D->2D transfers with different pitches.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]src[]Array of source addresses
[in]dst[]Array of destination addresses
[in]num_bytes[]Array of number of bytes to transfer
[in]num_lines[]Array of lines to transfer
[in]src_pitch[]Array of source pitches
[in]dst_pitch[]Array of destination pitches
[in]num_transfersNumber of transfers
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
See also:
EdmaMgr_copy2D2DSep
int32_t EdmaMgr_copyFast ( EdmaMgr_Handle  h,
void *restrict  src,
void *restrict  dst 
)

Perform a fast copy. This API inherits the transfer configuration of a previous transfer and only modifies the src and dst addresses.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]srcSource address
[in]dstDestination address
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
A non-linked transfer must have been completed on handle h before calling this function.
See also:
EdmaMgr_copyLinkedFast
int32_t EdmaMgr_copyLinkedFast ( EdmaMgr_Handle  h,
void *restrict  src[],
void *restrict  dst[],
int32_t  num_transfers 
)

Perform a linked fast copy. This API inherits the transfer configuration of a previous transfer and only modifies the src and dst addresses.

Parameters:
[in]hHandle returned from EdmaMgr_alloc().
[in]src[]Array of source addresses
[in]dst[]Array of destination addresses
[in]num_transfersNumber of transfers
Precondition:
h must be a handle successfully returned from EdmaMgr_alloc().
A linked transfer must have been completed on handle h before calling this function.
See also:
EdmaMgr_copyLinkedFast

Macro Definition Documentation

#define EdmaMgr_SUCCESS   0

Success

#define EdmaMgr_ERROR_INVARG   -1

Failure, Invalid Argument

#define EdmaMgr_ERROR_INVCFG   -2

Failure, Invalid Configuration

#define EdmaMgr_ERROR_RMANINIT   -3

Failure, RMAN initialization

#define EdmaMgr_ERROR_INVHANDLE   -4

Failure, Invalid Handle

#define EdmaMgr_ERROR_FREE   -5

Failure to free a resource


Typedef Documentation

typedef void* EdmaMgr_Handle

Handle to an EdmaMgr instance.

Copyright 2014, Texas Instruments Incorporated