1 /*
2 * Copyright 2013 by Texas Instruments Incorporated.
3 *
4 */
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 * ======== skel.h ========
40 */
41 /**
42 * @file ti/sdo/ce/skel.h
43 *
44 * @brief The Codec Engine System Programming Interface (SPI) for
45 * skeleton developers.
46 */
47 /**
48 * @addtogroup ti_sdo_ce_SKEL CE Skeleton SPI
49 */
51 #ifndef ti_sdo_ce_SKEL_
52 #define ti_sdo_ce_SKEL_
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
58 #include <ti/sdo/ce/visa.h>
60 /** @ingroup ti_sdo_ce_SKEL */
61 /*@{*/
63 /**
64 * @brief Prototype for a skeleton's call() implementation
65 *
66 * @param[in] handle A handle to the current skeleton.
67 * @param[in] msg A message sent by the algorithm's stub
68 */
69 typedef VISA_Status (*SKEL_CALLFXN)(VISA_Handle handle, VISA_Msg msg);
71 /**
72 * @brief Prototype for a skeleton's create() API.
73 *
74 * @param[in] reserved Reserved.
75 * @param[in] name Name of the algorithm to create.
76 * @param[in] params Creation parameters for the algorithm.
77 *
78 * @retval NULL Error, unable to create the algorithm.
79 * @retval non-NULL Handle to the successfully created algorithm.
80 */
81 typedef VISA_Handle (*SKEL_CREATEFXN)(Void *reserved, String name,
82 Void *params);
84 /**
85 * @brief Prototype for a skeleton's destroy() API.
86 *
87 * @param[in] handle A handle to the current skeleton.
88 * @param[in] msg A message sent by the algorithm's stub
89 */
90 typedef Void (*SKEL_DESTROYFXN)(VISA_Handle handle);
93 /*
94 * ======== SKEL_Fxns ========
95 */
96 /**
97 * @brief Table of functions defining the interface of a skeleton.
98 */
99 typedef struct SKEL_Fxns {
100 SKEL_CALLFXN call; /**< A skeleton's "call" implementation. */
101 SKEL_CREATEFXN apiCreate; /**< A skeleton's "create" API. */
102 SKEL_DESTROYFXN apiDestroy; /**< A skeleton's "destroy" API. */
103 } SKEL_Fxns;
105 /** @cond INTERNAL */
107 /**
108 * @brief Cache policies for managing i/o buffers.
109 */
110 #define SKEL_LOCALBUFFERINVWB 0
111 #define SKEL_WBINVALL 1
112 #define SKEL_CACHENONE 2
114 /**
115 * @brief Cache policy that will be used by all skeletons for managing
116 * i/o buffers. This is auto-generated by Server.xdt.
117 */
118 extern Int ti_sdo_ce_Server_skelCachingPolicy;
120 #define SKEL_cachingPolicy ti_sdo_ce_Server_skelCachingPolicy
123 /** @endcond */
126 /*@}*/
128 #ifdef __cplusplus
129 }
130 #endif
132 #endif /* _SKEL_ */
133 /*
134 * @(#) ti.sdo.ce; 1, 0, 6,3; 6-13-2013 00:10:04; /db/atree/library/trees/ce/ce-w08/src/ xlibrary
136 */