Framework Components Application Programming Interface (API)
fc-u06
Main Page
Modules
Data Structures
Files
Related Pages
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
packages
ti
sdo
fc
edmamgr
edmamgr.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013-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
*/
53
#ifndef ti_sdo_fc_edmamgr_EdmaMgr_
54
#define ti_sdo_fc_edmamgr_EdmaMgr_
55
58
59
#include <stdint.h>
60
#include <string.h>
61
62
#include <
ti/sdo/fc/ecpy/ecpy.h
>
63
#include <
ti/xdais/ires.h
>
64
#include <
ti/sdo/fc/ires/edma3chan/ires_edma3Chan.h
>
65
#include <ti/sdo/fc/edma3/edma3_config.h>
66
67
71
typedef
void
*
EdmaMgr_Handle
;
72
73
75
typedef
struct
{
76
IRES_EDMA3CHAN_Handle
edmaHandle;
77
ECPY_Handle
ecpyHandle;
78
IRES_EDMA3CHAN_ProtocolArgs
edmaArgs;
79
Bool resActive;
80
Bool xferPending;
81
IRES_YieldFxn
yieldFxn;
82
IRES_YieldArgs
yieldArgs;
83
IRES_YieldContext
yieldContext;
84
} EdmaMgr_Channel;
87
#define EdmaMgr_SUCCESS 0
88
#define EdmaMgr_ERROR_INVARG -1
89
#define EdmaMgr_ERROR_INVCFG -2
90
#define EdmaMgr_ERROR_RMANINIT -3
91
#define EdmaMgr_ERROR_INVHANDLE -4
92
#define EdmaMgr_ERROR_FREE -5
116
int32_t EdmaMgr_init
117
(
118
int32_t proc_id,
119
void
*edma3_config
120
);
121
122
134
EdmaMgr_Handle
EdmaMgr_alloc
135
(
136
int32_t max_linked_transfers
137
);
138
139
151
int32_t
EdmaMgr_free
152
(
153
EdmaMgr_Handle
h
154
);
155
156
157
/*
158
* The below declarations are placed here as only a reference
159
* (hence the comment block).
160
*
161
* These functions are defined further below.
162
*/
163
#if defined(EDMAMGR_INLINE_ALL)
164
#include <ti/sdo/fc/edmamgr/edmamgr_xfer.h>
165
#else
166
176
void
EdmaMgr_wait
177
(
178
EdmaMgr_Handle
h
179
);
180
181
197
int32_t
EdmaMgr_copy1D1D
198
(
199
EdmaMgr_Handle
h,
200
void
*restrict src,
201
void
*restrict dst,
202
int32_t num_bytes
203
);
204
224
int32_t
EdmaMgr_copy1D2D
225
(
226
EdmaMgr_Handle
h,
227
void
*restrict src,
228
void
*restrict dst,
229
int32_t num_bytes,
230
int32_t num_lines,
231
int32_t pitch
232
);
233
253
int32_t
EdmaMgr_copy2D1D
254
(
255
EdmaMgr_Handle
h,
256
void
*restrict src,
257
void
*restrict dst,
258
int32_t num_bytes,
259
int32_t num_lines,
260
int32_t pitch
261
);
262
281
int32_t
EdmaMgr_copy2D2D
282
(
283
EdmaMgr_Handle
h,
284
void
*restrict src,
285
void
*restrict dst,
286
int32_t num_bytes,
287
int32_t num_lines,
288
int32_t pitch
289
);
290
311
int32_t
EdmaMgr_copy2D2DSep
312
(
313
EdmaMgr_Handle
h,
314
void
*restrict src,
315
void
*restrict dst,
316
int32_t num_bytes,
317
int32_t num_lines,
318
int32_t src_pitch,
319
int32_t dst_pitch
320
);
321
335
int32_t
EdmaMgr_copy1D1DLinked
336
(
337
EdmaMgr_Handle
h,
338
void
*restrict src[],
339
void
*restrict dst[],
340
int32_t num_bytes[],
341
int32_t num_transfers
342
);
343
359
int32_t
EdmaMgr_copy1D2DLinked
360
(
361
EdmaMgr_Handle
h,
362
void
*restrict src[],
363
void
*restrict dst[],
364
int32_t num_bytes[],
365
int32_t num_lines[],
366
int32_t pitch[],
367
int32_t num_transfers
368
);
369
385
int32_t
EdmaMgr_copy2D1DLinked
386
(
387
EdmaMgr_Handle
h,
388
void
*restrict src[],
389
void
*restrict dst[],
390
int32_t num_bytes[],
391
int32_t num_lines[],
392
int32_t pitch[],
393
int32_t num_transfers
394
);
395
411
int32_t
EdmaMgr_copy2D2DLinked
412
(
413
EdmaMgr_Handle
h,
414
void
*restrict src[],
415
void
*restrict dst[],
416
int32_t num_bytes[],
417
int32_t num_lines[],
418
int32_t pitch[],
419
int32_t num_transfers
420
);
421
439
int32_t
EdmaMgr_copy2D2DSepLinked
440
(
441
EdmaMgr_Handle
h,
442
void
*restrict src[],
443
void
*restrict dst[],
444
int32_t num_bytes[],
445
int32_t num_lines[],
446
int32_t src_pitch[],
447
int32_t dst_pitch[],
448
int32_t num_transfers
449
);
450
467
int32_t
EdmaMgr_copyFast
468
(
469
EdmaMgr_Handle
h,
470
void
*restrict src,
471
void
*restrict dst
472
);
473
491
int32_t
EdmaMgr_copyLinkedFast
492
(
493
EdmaMgr_Handle
h,
494
void
*restrict src[],
495
void
*restrict dst[],
496
int32_t num_transfers
497
);
498
#endif
499
502
#endif
/* ti_sdo_fc_edmamgr_EdmaMgr_ */
Copyright 2014, Texas Instruments Incorporated