Codec Engine System Programming Interface (SPI)  ce-w08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
visa.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013 by Texas Instruments Incorporated.
3  *
4  */
5 
6 /*
7  * Copyright (c) 2013, Texas Instruments Incorporated
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  *
14  * * Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  *
17  * * Redistributions in binary form must reproduce the above copyright
18  * notice, this list of conditions and the following disclaimer in the
19  * documentation and/or other materials provided with the distribution.
20  *
21  * * Neither the name of Texas Instruments Incorporated nor the names of
22  * its contributors may be used to endorse or promote products derived
23  * from this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
27  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
29  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  *
37  */
38 /*
39  * ======== visa.h ========
40  */
65 #ifndef ti_sdo_ce_VISA_
66 #define ti_sdo_ce_VISA_
67 
68 #include <stddef.h> /* for size_t */
69 
70 #include <ti/sdo/ce/node/node.h>
71 #include <ti/xdais/ialg.h>
72 #include <ti/sdo/ce/Engine.h>
73 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
82 typedef Int VISA_Status;
83 
88 #define VISA_EOK 0
89 
94 #define VISA_ERUNTIME -1
95 
100 #define VISA_EFAIL -2
101 
106 #define VISA_EUNSUPPORTED -3
107 
112 #define VISA_ETIMEOUT -100
113 
118 #define VISA_FOREVER Engine_FOREVER
119 
128 #define VISA_MODNAME "ti.sdo.ce.VISA"
129 
133 typedef struct VISA_Obj *VISA_Handle;
134 
142 typedef struct VISA_MsgHeader {
143  NODE_MsgHeader header;
144  Int cmd;
145  VISA_Status status;
147 
148 /*
149  * ======== VISA_Msg ========
150  */
152 
153 /*
154  * ======== VISA_allocMsg ========
155  */
170 extern VISA_Msg VISA_allocMsg(VISA_Handle visa);
171 
172 /*
173  * ======== VISA_call ========
174  */
192 extern VISA_Status VISA_call(VISA_Handle visa, VISA_Msg *msg);
193 
194 /*
195  * ======== VISA_callAsync ========
196  */
215 extern VISA_Status VISA_callAsync(VISA_Handle visa, VISA_Msg *msg);
216 
217 /*
218  * ======== VISA_wait ========
219  */
240 extern VISA_Status VISA_wait(VISA_Handle visa, VISA_Msg *msg, UInt timeout);
241 
242 /*
243  * ======== VISA_freeMsg ========
244  */
261 extern Void VISA_freeMsg(VISA_Handle visa, VISA_Msg msg);
262 
263 
266 
267 /*
268  * ======== VISA_create ========
269  */
301 extern VISA_Handle VISA_create(Engine_Handle engine, String name,
302  IALG_Params *params, size_t msgSize, String type);
303 
304 /*
305  * ======== VISA_delete ========
306  */
314 extern Void VISA_delete(VISA_Handle visa);
315 
316 
317 /*
318  * ======== VISA_create2 ========
319  */
358 extern VISA_Handle VISA_create2(Engine_Handle engine, String name,
359  IALG_Params *params, Int paramsSize, size_t msgSize, String type);
360 
361 
362 /*
363  * ======== VISA_enter ========
364  */
377 extern Void VISA_enter(VISA_Handle visa);
378 
379 /*
380  * ======== VISA_exit ========
381  */
392 extern Void VISA_exit(VISA_Handle visa);
393 
394 /*
395  * ======== VISA_getAlgHandle ========
396  */
410 extern Ptr VISA_getAlgHandle(VISA_Handle visa);
411 
412 /*
413  * ======== VISA_getAlgorithmHandle ========
414  */
428 extern Ptr VISA_getAlgorithmHandle(VISA_Handle visa);
429 
430 /*
431  * ======== VISA_getAlgFxns ========
432  */
454 extern IALG_Fxns *VISA_getAlgFxns(VISA_Handle visa);
455  /* ingroup */
457 
458 /*
459  * ======== VISA_getAlgMemRecs ========
460  */
491 extern VISA_Status VISA_getAlgMemRecs(VISA_Handle visa, IALG_MemRec *memTab,
492  Int size, Int *numRecs);
493 
494 /*
495  * ======== VISA_getAlgNumRecs ========
496  */
524 extern VISA_Status VISA_getAlgNumRecs(VISA_Handle visa, Int *numRecs);
525 
526 
527 /*
528  * ======== VISA_getContext ========
529  */
548 extern Void VISA_getContext(VISA_Handle visa, UInt32 * pContext);
549 
550 /*
551  * ======== VISA_getCodecClassConfig ========
552  */
569 extern Ptr VISA_getCodecClassConfig(VISA_Handle visa);
570 
571 
572 /*
573  * ======== VISA_getMaxMsgSize ========
574  */
587 extern UInt VISA_getMaxMsgSize(VISA_Handle visa);
588 
589 /*
590  * ======== _VISA_init ========
591  */
601 extern Void _VISA_init(Void);
602 
603 /*
604  * ======== _VISA_exit ========
605  */
615 extern Void _VISA_exit(Void);
616 
617 
618 /*
619  * Semi-internal variable generatd by Settings.xdt - used in the following
620  * inline
621  */
622 extern Bool VISA_checked;
623 
624 /*
625  * ======== VISA_isChecked ========
626  */
640 static inline Bool VISA_isChecked(Void)
641 {
642  return (VISA_checked);
643 }
644 
645 /*
646  * ======== VISA_setContext ========
647  */
664 extern Void VISA_setContext(VISA_Handle visa, UInt32 context);
665 
666 /*
667  * ======== VISA_isLocal ========
668  */
679 extern Bool VISA_isLocal(VISA_Handle visa);
680 
681 #ifdef __cplusplus
682 }
683 #endif
684 
685 #endif
686 /*
687  * @(#) ti.sdo.ce; 1, 0, 6,3; 6-13-2013 00:10:04; /db/atree/library/trees/ce/ce-w08/src/ xlibrary
688 
689  */
690 
Copyright 2013, Texas Instruments Incorporated