1 /****************************************************************************\\r
2 * (C) Copyright 2009, Texas Instruments, Inc. *\r
3 * *\r
4 * Redistribution and use in source and binary forms, with or without *\r
5 * modification, are permitted provided that the following conditions *\r
6 * are met: *\r
7 * *\r
8 * Redistributions of source code must retain the above copyright *\r
9 * notice, this list of conditions and the following disclaimer. *\r
10 * *\r
11 * Redistributions in binary form must reproduce the above copyright *\r
12 * notice, this list of conditions and the following disclaimer in the *\r
13 * documentation and/or other materials provided with the *\r
14 * distribution. *\r
15 * *\r
16 * Neither the name of Texas Instruments Incorporated nor the names of *\r
17 * its contributors may be used to endorse or promote products derived *\r
18 * from this software without specific prior written permission. *\r
19 * *\r
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *\r
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *\r
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR *\r
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT *\r
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *\r
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *\r
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *\r
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *\r
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *\r
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE *\r
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *\r
31 ****************************************************************************\r
32 * *\r
33 * Target processors : TMS320C66xx *\r
34 * *\r
35 \****************************************************************************/\r
36 /**\r
37 * @file aif2_osal.h\r
38 *\r
39 * @brief \r
40 * This is the sample OS Adaptation layer which is used by the AIF2 low level\r
41 * driver. The OSAL layer can be ported in either of the following \r
42 * manners to a native OS:\r
43 */\r
44 \r
45 #ifndef __AIF2_OSAL_H__\r
46 #define __AIF2_OSAL_H__\r
47 \r
48 \r
49 /** @addtogroup AIF2_LLD_OSAL\r
50 @{ */\r
51 extern void* Osal_aif2Malloc (uint32_t num_bytes);\r
52 \r
53 extern void Osal_aif2Free (void *ptr, uint32_t num_bytes);\r
54 \r
55 extern void Osal_aif2Log ( char *fmt, ... );\r
56 \r
57 extern void Osal_aif2MulticoreSyncBarrier ();\r
58 \r
59 extern void Osal_aif2ResetMulticoreSyncBarrier ();\r
60 \r
61 \r
62 \r
63 /**\r
64 * @brief The macro is used by the AIF2 library to log various\r
65 * messages.\r
66 *\r
67 * <b> Prototype: </b>\r
68 * The following is the C prototype for the expected OSAL API.\r
69 *\r
70 * @verbatim\r
71 void Osal_aif2Malloc( uint32_t num_byte )\r
72 @endverbatim\r
73 *\r
74 * <b> Parameter </b>\r
75 * @n dynamically allocate aifconfighandle ptr.\r
76 *\r
77 * <b> Return Value </b>\r
78 * @n Not applicable.\r
79 */\r
80 #define Aif2_osalMalloc Osal_aif2Malloc\r
81 \r
82 /**\r
83 * @brief The macro is used by the AIF2 library to log various\r
84 * messages.\r
85 *\r
86 * <b> Prototype: </b>\r
87 * The following is the C prototype for the expected OSAL API.\r
88 *\r
89 * @verbatim\r
90 void Osal_aif2Log( char *fmt, ... )\r
91 @endverbatim\r
92 *\r
93 * <b> Parameter </b>\r
94 * @n printf-style format string\r
95 *\r
96 * <b> Return Value </b>\r
97 * @n Not applicable.\r
98 */\r
99 #define Aif2_osalFree Osal_aif2Free\r
100 \r
101 /**\r
102 * @brief The macro is used by the AIF2 library to log various\r
103 * messages. \r
104 *\r
105 * <b> Prototype: </b>\r
106 * The following is the C prototype for the expected OSAL API.\r
107 *\r
108 * @verbatim\r
109 void Osal_aif2Log( char *fmt, ... )\r
110 @endverbatim\r
111 *\r
112 * <b> Parameter </b>\r
113 * @n printf-style format string \r
114 *\r
115 * <b> Return Value </b>\r
116 * @n Not applicable.\r
117 */\r
118 #define Aif2_osalLog Osal_aif2Log\r
119 \r
120 /**\r
121 * @brief This API is called from the AIF2 driver to acquire \r
122 * a barrier lock that will synchronize the configuration of \r
123 * the different core.\r
124 *\r
125 * <b> Prototype: </b>\r
126 * The following is the C prototype for the expected OSAL API.\r
127 *\r
128 * @verbatim\r
129 void Osal_aif2MulticoreSynchro(void)\r
130 @endverbatim\r
131 *\r
132 * <b> Parameter </b>\r
133 * @n\r
134 *\r
135 * <b> Return Value </b>\r
136 * @n Not applicable.\r
137 */\r
138 #define Aif2_osalMulticoreSyncBarrier Osal_aif2MulticoreSyncBarrier\r
139 \r
140 /**\r
141 * @brief This API is called from the AIF2 driver to reset\r
142 * the barrier lock that will synchronize the configuration of\r
143 * the different core.\r
144 *\r
145 * <b> Prototype: </b>\r
146 * The following is the C prototype for the expected OSAL API.\r
147 *\r
148 * @verbatim\r
149 void Osal_aif2MulticoreSynchro(void)\r
150 @endverbatim\r
151 *\r
152 * <b> Parameter </b>\r
153 * @n \r
154 *\r
155 * <b> Return Value </b>\r
156 * @n Not applicable.\r
157 */\r
158 #define Aif2_osalResetMulticoreSyncBarrier Osal_aif2ResetMulticoreSyncBarrier\r
159 \r
160 /**\r
161 @}\r
162 */\r
163 \r
164 #endif /* __AIF2_OSAL_H__ */\r
165 \r